Constant power supply from erratic source. Any suggestions?

lauriet

Member
Hi.
I have built a picaxe-based project into a model railway wagon, using 9volts on the rails (to suit a motor) regulated on board down to 5volts for the electronics. Obviously the supply pickup is tenuous, even with very clean track, so I have adapted a battery phone charger to take over during interruptions to supply. This works effectively, but is inconvenient as a button cell has to be removed when not in use.
I have tried a supercapacitor instead, but cannot get a useful result, mainly, I imagine, because it's not that simple. Also the motor voltage and component size are problems (space is VERY tight).

Can anyone point me at any useful techniques, data, circuits or processes, for covering small breaks in supply (small fractions of a second), that are small, simple and integrated?
If so, I'd be very grateful.
 

Dippy

Moderator
This is tricky for any of us to provide a 100% solution.

The problem you have is not just loss-of-power but also the noise and crackles during contact and during the disconnection/reconnection of power.
So, shoving a lonely fat capacitor across the input is unlikely to give a good reliable result.

Do any of our suggestions have to work with the regulator you use at the moment?
Or can we suggest things from scratch?
 

BeanieBots

Moderator
As Dippy states, impossible to say without knowing more.
The 'obvious' solution is a supercap, so please be more specific why that option did not work for you.
We need to know what current your circuit pulls and what voltage range you can tollerate.
Another option might be a rechargeable button cell but I doubt the cell plus charging circuit would be any smaller than a supercap.
There might be scope for a circuit which totally disconnects a button cell when no power has been applied for X period of time.
Plenty of options, but without more details, hard to say.
If you can work at lower voltage there would be more scope for capacitor options such as smaller supercaps.
Maybe a memory backup cap but that would depend on your power requirements.
 

lauriet

Member
This is wide open to any suggestion, it's currently just a tinkering project, using up an 08M I have.

Eventually it might turn into a model steam tram, using 6v or 12v motors, a different picaxe chip and whatever track voltage suits. I hope to conceal the electronics, so size is a premium. Early days right now; it works but could be better.
 

srnet

Senior Member
And where you say 'electronics' what sort of electronics, and in particular how much current are you using ?
 

BeanieBots

Moderator
If I were doing it:-
Diode - supercap.
Supercap - switchmode supply - your circuit.
That will utilise the energy stored in the cap in the most efficient manner allowing the smallest cap possible and probably be the smallest design.
In order to design such a circuit you NEED to know the power requirement of the circuit and the maximum duration of the power outage.
If the power requirement is very low, then diode - memory backup cap - linear regulator of as low a voltage as you can get away with will be the most minimal design.
 

KeithRB

Senior Member
Instead of a diode, you might need a full-wave (bridge) rectifier so that things won't short if you turn the train around. If it is a low current device, you might try putting in rechargeable batteries and recharging when there is enough voltage present.
 

Dippy

Moderator
And , how much space is there?

Questions:
1. Current required?
2. Space?
3. Any special circuit requirements? (e.g. ADC).
4. Proximity to motor?
5. Has motor got any suppressor on it?

For a tiddly circuit, I'd test;
Diode/bridge > Choke*> Low ESR // Ceramic > Linear > Low ESR//Ceramic decouple > PICAXE+decouple.
+ motor suppression if needed. And careful wiring.
*maybe diff choke.


And then get a bag of bits and play around.


I don't have a train set; is the 'lectric on the tracks crudely rectified AC or nice DC?
Are power supplies 'stiff' (ooer Matron) or floppy?





Come on OP :)
Give us your first thoughts before you get too many posts - otherwise you'll never read them all.
 

lauriet

Member
Apologies for absence - multimeter died - I've got another one somewhere ....

Using the 10A range of the meter (that bit still works) it showed .08A draw, I'll check that when I can find the other meter.
The track supply is regulated 9v and I'm VERY careful to put this prototype on the right way round (so far). It does have diode protection.
The picaxe is supplied by a 5v regulator circuit from that (as in manual 1), the motor uses the full 9v, and is suppressed.
Space is ridiculously limited, so simplicity is the aim; I'll have to use smd components on any next versions, but I have found a 1F 22v supercap, which I could disguise as the boiler, which just gets it over the interruptions, so I'll pursue that avenue.
Currently the supercap is just bodged across the pickups; I hope to refine the performance once I know what I'm doing, but this component seems capable of providing the solution.
The loss of contact can only be described as 'momentary'; I was a little surprised how little backup the supercap provided, but will brush up on the mathematics today to understand that (this is a bit new to me). And chokes. I really don't understand chokes. Yet.

Once I've found that multimeter ...
 

hippy

Ex-Staff (retired)
My understanding of such supplies ( not that I have any practical experience of them ) is full diode bridge, reservoir cap, 5V regulator or zener to the micro, motors & Co powered by a separate bridge rectified supply, not the 5V which would quickly drain the cap.

With the micro drawing only mA the cap should keep it going through any brownout of sensible duration - I recently ran an 08M2 on a 330uF cap alone infrequently pulsing a LED for over 20 seconds before it died though that was mainly NAP commands.
 

SAborn

Senior Member
Look in the third draw down for the multimeter (everyting ends up in the third draw down its a given fact!)

You dont need a super cap, just enough filtering to get you past 330uf on the input side to the Vreg, if you dont filter the input to the reg you will have a hell of a time filtering the output to the reg.
Basic theory is to fix the problem prior to the Vreg, and then there is minor capacitors needed after the Vreg.

In layman terms it looks that you are trying to arrest the horse after it has bolted, the best solution is to remove the cause prior to the horse bolting (add pre filtering before the reg)
 

MartinM57

Moderator
Sound like your super cap is trying to drive the train motor when the rail supply dies - you need to isolate it. Time for a circuit diagram please, not just random component names :D
 

Dippy

Moderator
BB's idea (I think) and mine agree in principle with SABorn.
And if you tap off with the diode that will cover Martin's point.


These things can be so variable that the best option is to buy the components we have suggested and have a play.
Unless, there is something more complex than you have mentioned then the BEST solution is to take our advice thus far and have a go.
Then, if it still plays up, you will have to do some measurements (i.e. work) and tell us where it failed.
Otherwise you will get a dozen variations on the same basic theme (we have three so far) and get confused.
Time to start playing. Good luck.
 

BCJKiwi

Senior Member
Supercaps do not work like batteries.

The voltage falls in more or less a straight line where a battery holds up the nominal voltage until close or at empty.

So you may find that with a 9v supply, the supercap will only charge to 9V but as soon as the supply disappears and the supercap is providing the power, the 9v will start to drop immediately, hence the apparent "little backup".
 

BeanieBots

Moderator
Well the maths is easy enough.
A supercap of 1F will only drop by 1v per second with a 1A current being drawn from it.
So even if the 5v regulator has been badly chosen as a bog standard 7805 (as apposed to a low drop out, low quiescent device) and the PICAXE is driving an LED on continuous, let's say the total current is 20mA. The regulator will drop out at say 7v giving a 2v headroom.
A 1F cap loaded at 20mA will drop 2v in 100 seconds.
That's getting on for 2 minutes in real numbers!
 

John West

Senior Member
I'd also check into the internal resistance of the super-cap you're using. Some that I've seen can power a tiny circuit for weeks or months, but weren't designed to deliver 50 or 100 mA at all. Charge the one you have, and use your multimeter to watch the rate of discharge into your circuit (relative to the theoretical capacitive discharge curve,) to determine if the problem is the type of super cap you're using.

Also, it may be helpful to use Schottky diodes for your blocking diodes, as they have a lower junction drop than standard silicon diodes, providing a bit more voltage to your circuitry.
 
Top