Spudmn's Puma board build

All home-built FreeEMS implementations without a forum of their own, usually TA-based.
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Spudmn's Puma board build

Post by jharvey »

Is there a reason why you don't want to post your actual math? For example, what un-required terms did you deem un-required? If you post your math, we can verify where your numbers came from. For now, I know Marco's stuff worked, I don't know that yours will. If I could follow your math to prove or deny that yours is accurate, then I could accept it as a valid solution. I believe Marco simply copied from the TA board, so that would seem to be a long history of success, that you just claimed was wrong.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

jharvey wrote:Is there a reason why you don't want to post your actual math?
I DID!!!
Fred wrote:All the equations are in the PDF
For now, I know Marco's stuff worked, I don't know that yours will.
On some installs! My numbers ARE Freescale's numbers!
If I could follow your math to prove or deny that yours is accurate, then I could accept it as a valid solution.
Freescale recommend it, exactly as in large type above, suggesting that it is not valid is weird or ignorant or intentionally contradictive or something.
I believe Marco simply copied from the TA board
The schematic matches the TA, but my Puma doesn't, and the values above do not either. TA/schem values match the manufacture recommendations better than the above values, but are still sub-optimal.
so that would seem to be a long history of success
Correct!!! But is not the same as the above values.
that you just claimed was wrong.
Wrong!!! I claimed the above values are wrong.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Once again, all I did was run through the calcs as provided by the manufacturer and verify that the answers that they came up with were correct and suited our application, nothing more.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Going into this in a little more detail, the values used by TA
TA wrote:3.3nf 330pF and 3.9k
mean that the zeta (ζ) = 0.582, which is just under 2/3 of what Freescale recommend.

And what Marcos used
nitrousnrg wrote:3.3nF 220pF and 3.3k
results in a zeta of 0.4925 which is even worse.

http://stuff.fredcooke.com/EffectOfZeta ... sponse.png

Image

Anything in the range of 0.707 - 0.9 is pretty good, lower is too loose according to Freescale. Using ζ = 0.707 with a loop bandwidth of 16732.7123kHz and therefore resistor of 3.9k (like the TA) results in a primary cap value of 4.7nF and a secondary of 470pF.

Tightening up even further on the bandwidth to 14176.3257 and a 3.3k resistor with ζ = 0.707 yields cap values of 6.8nF and 680pF.

Lowering the resistor places more load on the PLL mechanism in the MCU and is probably not a good idea and results in larger more impractical capacitor values.

So, to be less stiff about the numbers:

Bandwidth should be not more than 20kHz and not less than 10kHz (half freescale's recommendation), yielding resistor values in the range 2.2k to 4.7k. Zeta should be kept between 0.707 and 0.9 and second capacitor value should be one tenth of the primary one. So, the following combinations are acceptable:

Fc = 9437.77577kHz = 2.2k, ζ = 0.707 = 15nF and 1.5nF (critically damped)
Fc = 9437.77577kHz = 2.2k, ζ = 0.847 = 22nF and 2.2nF (compromise for common values)
Fc = 9437.77577kHz = 2.2k, ζ = 0.900 = 25nF and 2.5nF (good transient response)
Fc = 11583.0169kHz = 2.7k, ζ = 0.707 = 10nF and 1.0nF
Fc = 11583.0169kHz = 2.7k, ζ = 0.858 = 15nF and 1.5nF
Fc = 11583.0169kHz = 2.7k, ζ = 0.900 = 16nF and 1.6nF
Fc = 14176.3257kHz = 3.3k, ζ = 0.707 = 6.8nF and 680pF
Fc = 14176.3257kHz = 3.3k, ζ = 0.857 = 10nF and 1.0nF
Fc = 14176.3257kHz = 3.3k, ζ = 0.900 = 11nF and 1.1nF
Fc = 16732.7123kHz = 3.9k, ζ = 0.707 = 4.9nF and 490pF
Fc = 16732.7123kHz = 3.9k, ζ = 0.835 = 6.8nF and 680pF
Fc = 16732.7123kHz = 3.9k, ζ = 0.900 = 7.9nF and 790pF
Fc = 20162.4084kHz = 4.7k, ζ = 0.707 = 3.3nF and 330pF
Fc = 20162.4084kHz = 4.7k, ζ = 0.836 = 4.7nF and 470pF
Fc = 20162.4084kHz = 4.7k, ζ = 0.900 = 5.4nF and 540pF

Using common capacitor values of 10,15,22,33,47,68 we end up with the following closest to ideal sets of values:

Fc = 9437.77577kHz = 2.2k, ζ = 0.707 = 15nF and 1.5nF (critically damped)
Fc = 9437.77577kHz = 2.2k, ζ = 0.847 = 22nF and 2.2nF (compromise for common values)
Fc = 11583.0169kHz = 2.7k, ζ = 0.707 = 10nF and 1.0nF (critically damped)
Fc = 11583.0169kHz = 2.7k, ζ = 0.858 = 15nF and 1.5nF (compromise for common values)
Fc = 14176.3257kHz = 3.3k, ζ = 0.707 = 6.8nF and 680pF (critically damped) Fred's arbitrary recommendation
Fc = 14176.3257kHz = 3.3k, ζ = 0.857 = 10nF and 1.0nF (compromise for common values)
Fc = 16732.7123kHz = 3.9k, ζ = 0.835 = 6.8nF and 680pF (compromise for common values) Closest to TA values but with tighter damping
Fc = 20162.4084kHz = 4.7k, ζ = 0.707 = 3.3nF and 330pF (critically damped)
Fc = 20162.4084kHz = 4.7k, ζ = 0.836 = 4.7nF and 470pF (compromise for common values) Freescale's recommendation

I'll transfer this to the hardware compliance docs at some point.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Spudmn's Puma board build

Post by jharvey »

It appears your graph is an OO or Libreoffice file. What program/format is that graph and math generated with? When do you plan to post it such that others can view it?

Your .9 zeta seems suspect to me. Typically more overshoot is a result of a steeper ramp. Your .9 zeta claims to get there faster, and with less overshoot. That's not a typical case for a control system. Typically around a 3/4 decay is one of the better balances between a fast response and stable system. A 1/2 decay is a bit more stable, but slower to respond, which results in a sloppier bandwidth.

On your selected/suggested components, if you run the tolerance of the components, what's the limits of zeta? For example, if you run your calcs with a 5% resistor, does zeta stay between .707 and .9. What's the worse you get from tolerance stack up? Same for tolerance of caps, don't forget the additional couple pF of PCB trace capacitance, ect. I did one calc that noted the PCB trace capacitance was about 1.5pF.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

jharvey wrote:It appears your graph is an OO or Libreoffice file. What program/format is that graph and math generated with? When do you plan to post it such that others can view it?
It's from a PDF, the source is irrelevant, really. In fact, the graph isn't particularly relevant either, really. Perhaps I should remove it before it adds more confusion :-)
Your .9 zeta seems suspect to me. Typically more overshoot is a result of a steeper ramp. Your .9 zeta claims to get there faster, and with less overshoot. That's not a typical case for a control system. Typically around a 3/4 decay is one of the better balances between a fast response and stable system. A 1/2 decay is a bit more stable, but slower to respond, which results in a sloppier bandwidth.
Preston said the same thing, but with a bit of pushing realised his mistake :-) This is not amplitude vs frequency, it is phase/error vs time. Think again.
On your selected/suggested components, if you run the tolerance of the components, what's the limits of zeta? For example, if you run your calcs with a 5% resistor, does zeta stay between .707 and .9. What's the worse you get from tolerance stack up? Same for tolerance of caps, don't forget the additional couple pF of PCB trace capacitance, ect. I did one calc that noted the PCB trace capacitance was about 1.5pF.
Good call!

Worst case would be lower than spec resistance and lower than spec capacitance. Or higher and higher, just the same.

Let's take my suggested one with resistor value in the range of 3267 to 3333 and cap value in the range of 6.46 - 7.14 for 5% and 5.78 - 7.82 for 15% (X7R)

3267 lowers the Fc to 14014.9955Hz
3267 with a 5.78nF cap results in a zeta of 0.645
3267 with a 7.82nF cap results in a zeta of 0.750
and
3333 raises the Fc to 14299.5566Hz
3333 with a 5.78nF cap results in a zeta of 0.658
3333 with a 7.82nF cap results in a zeta of 0.765

(btw, all the stuff in the above post should be Hz not kHz...)

So, it would probably be best to select something that splits the difference between our desired zeta range such that the variations are all within it. I think the one i just ran is fine, but perhaps the "close to TA" or freescale ones are better, variations is about 7 - 8%, so both of the others end up bang on 0.9 zeta with high side error and 0.77 with low side error.

I stick with my green numbers :-)

Thanks for making me check, though.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Spudmn's Puma board build

Post by jharvey »

Cool, cool. Is it really important to have the error accurate for every CPU cycle, or on the average? I might wonder if deviation away from the 0 line is as important as having the area under the curve at 0.

Also what might cause an upset? Perhaps when one switches on and off devices from the xtal bus? It looks like they all steady out to a solid frequency after a couple cycles. If that's the case, then if you switch something on repeatably, and if the area under the curve is the key, then you could cause a long term phase drift. I'm not sure if we are that concerned, but it might become a concern if we use it for a USB XTAL. I understand they need a very accurate long term accuracy.

I really don't know, the nitty gritty of the processor just tossing out some concepts about why the values might change from one design to another.

I can see many reasons why it could move faster and have less overshoot. For example if one tunes an engine by changing a 40lb flywheel for a 10lb flywheel. There is less energy stored in the system, so you can approach faster, then stead out quicker. With out knowing how the above math was done, I don't know if it's accurate or not.

Can you also post the limits for the TA card. Can we do that? Do we know the % tol for the TA parts?
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

The main reason would be a shift in the crystal frequency due to temperature change and wrong component selection, but, likely it doesn't matter much, it's still nice to make it right, however. No idea about the TA parts, TA is more or less designed for the bench, though, so I wouldn't expect tight tolerances on them. Thanks for your input! :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

OK, I emailed TA about this and the values are from an old designer who is no longer with them. Given some of the other mistakes that that guy made, I stand by my work today! Just for the record. I'm going to do a TA card errata post in the DIY section with all known niggles, one post each.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Spudmn, remove the 1M/10M resistor, it's in loop controlled mode and is not necessary and possibly counter productive.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply