OK
Things to consider, that chip is a linear regulator.
Which means that it is a lot less efficient at load, the surplus voltage at the current you are drawing is dumped as heat. So if you had a supply of 12V and were regulating to 3v3 at 100 mA you would be burning 8.7V at 100mA, (0.87 Watts) as heat.
The Quiescent (unloaded) figure will be lower but the amount of energy you use loaded is a lot more.
Switch modes are a lot more efficient under load.
The reverse is true of a switchmode regulator that particular device is quoted as being better than 90+ % efficient.
Do the same calc and assume 90% effieciency (well below the spec for that chip) and you will quickly see what I mean.
Do similar calcs for you circuits actual sleep current draw and add on the quiescent current for the regulator.
Re the sleep current for your circuit this will alwyas be much
more than the MCU's quoted minimum in sleep mode as there is much
more current drawn by pullups etc than you MCU's sleep mode
quiescent will ever be. SO that figure is very misleading if taken
in isolation.
Also consider that often for a switch mode to get proper quiescent (as opposed to just running the load down) you need to put it into sleep or disabled mode. Some devices actually have an enable or sleep pin. Check the Datasheet.
Bear in mind then that you are wasting far more power when under
load with a linear regulator than when unloaded, and you circuit
quiescent during sleep is going to be a lot higher than you think.
To get a full grip on this if you wanted to do it theoretically
before buying you would have to work out a power budget in a
spreadsheet and see which one used less power over for say a given
24 hour period.
So for a circuit dropping into sleep mode for 9 seconds in every 10, you would measure with an ammeter the draw during sleep (Or estimate from info you have and the datasheets), and the draw during activity. then do the math. I say use an ammeter because the current draw during sleep is likely to be too low for a bench PSU with inbuilt current metering to accurately show. It is for mine anyway.
Then do the calculations and you will see what I am getting at above.
How much sleep you do versus how mush active time, will bias your
design decision towards one technology or the other.
To do it practically build two identical setups and use one each
of the power supplies from say a battery pack filled with the
batteries from the same batch. Record the voltage profile, or
easier still time which one runs out first. This is the one that
uses least power overall. The benefit of this method is that as it
is an integral of the power drawn, it accurately accounts for the
aggregate peak values. Whereas an ammeter will be a sort of
average (some are claimed to be RMS, but this can be frequency
dependent and RMS only actually works for a pure sine wave)
You could go to the lengths of using an arduino as a recording
power meter, Using a shunt resistor and measuring the current draw
via the volt drop. But it is a lot of fuss. There again you may
like that sort of fuss.
100uA is 0.1mA, so pretty trivial. I wouldn't worry about the difference unless my heliostats were not getting enough power to run.
In trying to optimize things for the sake of it and not quite getting the full implication of a specification you can easily waste more time than a project is worth, and not get the benefit you thought you would. Beware.
Providing your total draw is less than the total power available
to drive it, who cares whether it is the ultimate in one little
bit of the total spec. Engineering is always a compromise. Part of
the challenge in learning engineering is learning to find and
accept a compromise.
"These are not the benefits you are looking for" read in an Obi Wan type voice... LOL
You may do this as a hobbyist, at least once to get a feel for
what i have said above, you will never do it again. Life is too
short. These days having got an intuitive feel for it I only do
the above calcs etc if someone is paying me for my time.
Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
-- www.kirbyand.co.uk an...@kirbyand.co.uk
I don't know if my back of the envelope calculations are correct, but the difference between the MP1584 switching and HT7333-1 linear regulators are dramatic. Assuming a 24V supply to my heliostat, in sleep mode 58 seconds in every minute, active microprocessor + motor drivers 2 seconds in every minute, and WiFi active but no motor drivers 1 minute in every day, I make it (excluding pullup resistors, etc):
average of 3.3mA with MP1584 (70-75% efficient, 100uA quiescent)
average of 15.5mA with HT7333-1 (14% efficient, 2.5uA quiescent)
average of 2.6mA with TPS62177DQCR (87-90% efficient, 4.8uA quiescent)
so I think I'm full circle back to the MP1584 ;) The TI switching regulator is quite a bit more efficient + much lower quiescent current, but the chip is 5x as expensive as the MP1584 for only a 20% improvement in average power usage. With only a 12V input the HT7333-1 still uses ~7.9mA which is over twice the MP1584.
On the other hand the transient response of the linear is generally better. I send the 5V output of my switcher to the linear - if I have fitted on, if not I don't. Links on the pcb don't you know.
True
I have usually assumed that this is directly related to the switching frequency of the switcher. It has got to be difficult (nay impossible) to compensate for transients that are quicker than the cycle time producing the PWM pulse length for a given single pulse for the switcher.
For this reason and others (component size, ripple handling, the frequency of the pulse train should be well above the band of frequencies for the application or you are just adding noise that is not filterable) I have a preference for switchers that operate at the highest frequency possible given the current common, state of the art, of the components used in them. I don't like to sacrifice efficiency. The compromise thing again.
It is a carry over of having to design and build switchers for instrumentation back in the early nineties. They are horrible things to get right, iterative calculations, hand wound pot core inductors, excessive attention to the spec of component details, layout constraints. etc etc etc. And you still need to tweak the inductors by hand a turn (and a bit) at a time.
The ones I did were running at 4Khz, the energy transfer
calculations gave per cycle peak currents that are mind boggling.
4Khz was the highest frequency (above audible) that we could get
away with with the cost effective (production design
considerations) components of the day.
The whistling pot cores used to drive me nuts. Being hand wound
they were not varnish dipped which killed a lot of the whistling.
But fortunately these days we can buy the tiny mpxxxx ones for
pence from aliexpress. I just focus on efficiency/load curves and
frequency in the specs. Life is way too short.
Kirbs
Just to tidy up a last loose end.
I mentioned putting an smpsu into sleep or disabled mode. You need to be careful if it is the only supply to your circuit as you are shutting off power to whatever put it into sleep mode.
Check out the manufacturers data sheet for the smpsu chip/modules we use a lot in projects:-
Pin 2 is an enable signal.
Bearing in mind that if this is the only supply to your circuit, once you pull it low then the switcher will do the minimum quiescent value, which actually looks to be set by the resistive divider between Vin (Pin7), pin 2 and ground.
If you place a small capacitor across R6 in the data sheet and pulse it low with an IO pin. It will shutdown power to whatever it is powering until the RC time constant of R5 and your capacitor, hampered by R6 allows the voltage at pin 2 to rise enough and allows the switcher to startup again.
You could achieve similar for longer periods perhaps by making yourself a monostable circuit to drive pin 2 but you are back at an increased sleep time current draw.
Pin 2 is not broken out on the little boards we use, however it
is possible to solder a flying lead onto it or an adjacent
connected device pad.
On the face of it this looks a little useless.
But depending on how you write your micro controller code you can use this technique to shut everything off (including your micro-controler) for that period.
You must write your micro controller code though to be "Stateless" ie it comes up from power-on/reset measures where it is, calculates where it needs to be next, does it, then goes to sleep by pulsing the smpsu en pin low. Or alternatively you use the micro-controlers eeprom memory if it has it (many atmegas do) to store just enough state to carry forward between power off cycles.
This does look like a lot of work, but consider that micros like the ESP rely on a full reset to wake them up from their sleep mode. You have to wire the rest pin to a wakeup pin to get them to work. The coding has to be the same Stateless or minimalist saved state methodology to work with this.
As ever this is a bunch of stuff to play with and get right, whether it is worth the time/effort versus what you get from it is a compromise that you as the project do'er have to make a judgement call on.
In your own case I think you have pretty much worked it all out anyway and have a solution that works. This last little bit is worth keeping in a back pocket for just in case later on. One of plans A, B or C usually pay off, but it is often worth having a plan Z up your sleeve for just in case.
Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-hackers+unsub...@googlegroups.com.
To post to this group, send email to sheffield-hardware-hackers@googlegroups.com.
Interesting comparison and one to watch out for.
I can definitely confirm all the ones I have bought/used so far
have been the one on the left.
I remember having a conversation with nophead, he had bought what he thought to be the same as one of the ones on the left and found the performance poor and the switching frequency low. I wonder if he got one of those on the right by accident.
Just doing a quick comparison of the connections to the chip by eye (going to be error prone as we can not see the back of the board) it looks like the chip on the right has a completely different pinout to the one on the left. The two connections that jump out are the +in and the wiper contact of the pot. They go to completely different pins.
Looking at the board on the left it has the power Schottky diode I would expect in an SMPSU (SS34) but I can not see a Schottky at all on the board on the right. Leading me to think that if there is one it is stupidly underrated for 2/3A. Or on chip, which is not an MP1584.
http://www.vishay.com/docs/88751/ss32.pdf
This pretty much leads me to think that the device on the right is not actually an MP1584 at all. No idea what it is but certainly not an MP1584.
Well spotted nick and thanks for sharing that. definitely one to watch out for.
Cheers
Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-hackers+unsub...@googlegroups.com.
To post to this group, send email to sheffield-hardware-hackers@googlegroups.com.
Dumb question.
I take it that was with a load on it ??
How did the waveform vary with increased load ??
That is a big ripple.
The switching frequency is set by resistor, wonder if they coped the rest but had the wrong value for the resistor in. Switching at too low a frequency on an inductor chose for higher frequency work will produce ripple but i would expect the waveform to be messier than this one. as the core would be saturating.
The datasheet says that the enable has to be high or floating, I
cant imagine a floating enable being a good idea though and all
the piccys in the data sheet show it with pull up of some sort or
other. Might be worth checking if the enable is actually floating
and pulling it up.
Kirbs
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-hackers+unsubsc...@googlegroups.com.
To post to this group, send email to sheffield-hardware-hackers@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-hackers+unsub...@googlegroups.com.
Yes it certainly looks a lot more plausible from the data sheet.
Good spot.
Internal Schottky or similar then, although looking at the diagram on the internals there is no schottky it uses an active switch configuration (Totem pole or push/pull). Ug Don't fancy that, good Schottkys are usually as quick as you will get. A lot of efficiency is lost in the switching transitions other wise.
Theres that necessary dead band bit between the push/pull changeover that has to be there to prevent shoot through. Plus the t off of the high side plus the t on of the low side. horrible. Their diagram does not show how they achieved this. So it does need taking with a little bit of a pinch of salt. A straight gate/flip-flop drive as the piccy suggests would give horrible shoot through.
Alternatively where they have dead-band the inductor has no
connection for the duration of the dead period.
https://www.maximintegrated.com/en/glossary/definitions.mvp/term/Shoot-Through%20Current/gpk/1040
One of the optional diagrams does show an optional external diode. Which does not look to be on the board in nicks piccy.
Switching frequency is fixed and quite a bit lower: "Fixed 340kHz
Frequency". IMHO so long as the components are up to it higher
frequency is always better.
The standby or shutdown current is very low, 1 uA or so, (as per the conversation about the enable) but the actual operating current is 1.5mA or so.
Think I prefer the MP1584
Kirbs
Agreed, but what about the dead band and switching losses. These are significant losses in a switcher.
If transistors were perfect it would be great, but there not.
Mind you I guess this is why the switching frequency is fixed and low. It is a trade off. You know what the dead-band needs to be then and it will not vary by that much.
Kirbs
BTW liked the last couple of posts Nop.
http://hydraraptor.blogspot.co.uk/
Awesomely detailed as ever. Sorry bout the laser diode. A cautionary tale and one to watch out for. I used to think they were more robust than that.