Best way to get 5V Regulated for running/programming?

Cillakin

Member
Hello friends! Finally got new PICAXE chips in yesterday and I wanted to get a confirmation on a couple questions I had before I supply some voltage and get the magic blue smoke. So, with that being said...

1.) Can a 9V battery be used with a 5V Regulator (LM7805) to be a power source for the PICAXE?
I recalled something in the PICAXE-Manual about 9V batteries and not using them. Not just because of the obviously higher voltage but something to do with current capabilities & mA/hour. Further explanation of this would be most appreciated!

2.) Would it be more effective to use instead two 6V Lantern batteries in series for 12V, to then be fed to the 5V regulator?
My chief complaint with this path is using a total of 12V being reduced to 5V, means a lot more heat being generated. I already have a heatsink on one but I'd prefer to not have to change it out for a bigger heatsink, adding more weight to the project box and more ambient heat around my desk.

It goes without saying that there is more than one way to program/run a PICAXE, much akin to there being 1,000 ways to skin a cat. In any case, this is the route I would like to go with (using the LM7805) as I plan on taking the concept and making a breakout board or implementing into other projects so the design and capabilities of my projects are enhanced. Thanks again friends, it's muh appreciated.

*\*/*\*/*\*/*\*/*
The chips I have are 08M2+ and 18M2+.
 

eclectic

Moderator
First question,
Is it essential for you to have 5v?

3 AA alkaline will power any PICAXE, and is a lot simpler.

e
 

nick12ab

Senior Member
My chief complaint with this path is using a total of 12V being reduced to 5V, means a lot more heat being generated. I already have a heatsink on one but I'd prefer to not have to change it out for a bigger heatsink, adding more weight to the project box and more ambient heat around my desk.
That's because you're using a linear regulator. You should be using a switching regulator if a linear regulator gets hot. Switching regulators are inexpensive (but more expensive than linear regulators) and are much more efficient so the batteries will last longer.
 

Jeremy Harris

Senior Member
The Picaxe chip itself only draws a tiny current and is pretty tolerant in terms of supply voltage, it will run very happily on just three AA alkaline cells with no regulator as already mentioned and this is far and away the easiest way to power things for experimenting.

If you decide to make a 5V regulated supply that can also power other circuitry then the current capability of that supply will be determined by the peripherals you want to connect to the Picaxe. Things like servos and motors ideally need a separate power supply because they create a fair bit of electrical noise, but can be run on the same supply as the Picaxe with good supply filtering. One good way to power prototype Picaxe circuits I've found is to use a cheap USB power supply/charger. These have a well regulated 5V supply that will usually deliver around 500mA or more and are pretty cheap. It's pretty easy to just cut the plug off the end of a USB lead and identify the + and - 5V supply leads. You could even power your prototypes from a spare USB port on your PC this way, as a standard USB port can deliver 500mA normally.

If you just want to play around and get some LEDs to flash and things like this, then I'd stick with the three AA cell battery pack to start with.
 

Dippy

Moderator
1. Yes.... but...
It depends SO , SO much on your project.
If, when saying a 9V battery, you are referring to the little rectangular thing (PP3) then it hasn't got much capacity.
i.e. in your average circuit (and experimenting) it won't last long, so not recommended.
And , for any circuit from a PP3, I would NEVER use a 7805 - they are good but dinosauric. They use quite a lot of power themselves.
Consider LP2950 or LM2936 - but READ the data sheet to see if suitable.
For a fancy power saving, auto-switching circuit the PP3 is fine - several of us here have had circuits which have, literally, lasted years.
Horses for Courses.

Regulators: Another thing is the 'Dropout Voltage'. A regulator needs a bit of voltage 'headroom' to work.
Those old 7805 need a couple of extra volts i.e. to get 5V out you need 7V minimum IN.
So, as the 9V battery droops below 7V then it goes pants.
Whereas, newer Regulators need less, maybe a few 100mV, so the 9V battery can droop to (e.g.) 5.5V and still be happy.
Summary.
Lower internal power consumption + lower voltage dropout = longer service life.

2. More 'effective'? Well, it'll last longer if that's what you mean. Efficient? No.
Yes, the reg, as you say, will get warmer. S/Mode is an option for greedier circuits.
Obviously you'll know that larger batteries can chuck out larger oomph - increasing the probability of death-by-ooomph ;)


Many people use a battery clip holding 3AA. That's fine for your first flash / 'Hello World' stuff and is a good starter.
Others use a 5VDC wallwart - often very effectively, sometimes ending in an early bath.
If you expect to do loads of stuff then a Bench PSU with current limiting is the way to go.
Sadly, the better ones (i.e. non-Ch-Ch) cost a few quid.
But, saving a few PICAXEs+bits+replacement_postage+waiting_for_postman soon adds up....
 

manuka

Senior Member
In the last decade I've probably introduced 1000s of folks to PICAXEs,for which I always promote a 3 x AA switched battery box supply for initial "Hello World"/LED flashing/beep/ADC activities. Alkaline AAs last months in such setups & are absolutely THE way to go for beginners. I'll go so far as to say that newbies are totally crazy to consider anything else - "All the way with 3 AA " !

Once established (& confident), Nokia style 5V cell phone style USB wall warts do fine - you can pick these up at thrift shops etc for just a few $. Many however are "noisy" switched mode & may need hash supression. Stan.
 

hippy

Ex-Staff (retired)
The greatest problem with a 9V through a 7805 is that 9V batteries usually have low mAh ratings meaning lifetime will often be short. Also a 7805 uses (wastes) current itself, and the 4V overhead will cause 7805 heating as circuit current draw increases.

Two 6V batteries, 12V, will probably have better mAh and longer life, but would also increase heating of the 7805. You are almost doubling the voltage which has to be dropped so that could be a considerable increase in heat.

Either are likely okay for lower currents.

I'm not a fan of taking USB power out of a PC and would advise against that. For experimenting; a good quality variable voltage bench supply with proper current limiting I would say is be best.
 

Dippy

Moderator
Blimey, we're in repeat-mode already :) - perhaps it would be good now for OP to read all the above before another 10 similar posts?
 

Goeytex

Senior Member
1.) Can a 9V battery be used with a 5V Regulator (LM7805) to be a power source for the PICAXE?
Yes, but this is a poor choice. A 9V battery has little reserve capacity and the 7805 is outdated and will waste power.

2.) Would it be more effective to use instead two 6V Lantern batteries in series for 12V, to then be fed to the 5V regulator?
It would be more effective in that there will be more reserve capacity, but still wasteful due to the power hungry 7805.

Unless you are dirt poor and have a bunch of 7805's laying around, then use an LDO Regulator, if you are intent upon using a regulator. Take a look at microcontroller development boards. NONE of them use a 7805. They all use LDO Regulators, and many have the option for USB 5V power or a jack for a wall wart.

As has been repeated several times, a good way to start is with 3AA batteries. There is adequate reserve capacity and no regulator is needed. I would recommend this to start and then as your needs change add a regulator and an alternate power source.
 

Billo

Senior Member
So, as the 9V battery droops below 7V then it goes pants.
With all due respect Dippy, if your PP3 battery is at 7V you're already at death's door with one foot across the threshold. In my humble opinion it's then time to change your battery, not employ a different regulator to give you a few minutes extra time.

BTW, things would probably not go 'pants' from the PICAXE's perspective till the battery made it down to about 5V (5-2=3), but then your dead and buried WRT power.

My advice to the OP would be use a good 7.5V to 9V wall-wart with a regulator (linear or switching it really doesn't matter a lot) for his experimentation. I find batteries to be an expensive and environmentally irresponsible way to approach this hobby. They are great for a finished project that needs to be remote or portable, but a (again, in my opinion) poor choice for the bench. A good wall-wart will cost $5 and last forever. I got my last one at a garage sale for $0.25 (do you have garage sales across the pond?).
 

Billo

Senior Member
BTW, if you want a really good bench supply, this can't be beat. That particular one is a bit pricey, and they do go upwards of $300 from time to time, but if you look diligently you can get one for about $50 on auction (I did), then there is the shipping...
 

Dippy

Moderator
Well, you have to be a bit careful there Billo.
I did, I confess, pluck 7V as a round number out of the air and, yes, it's time to consider a change..
But, I can assure you that, in a real low-power circuit your "few minutes" can be a lot longer.
(I realise you were using casual speech for that but I just wanted others to note).


If you look at various battery data they seem to vary their 'flat' definitions as being sometimes 5V and sometimes 7V. e.g, Energizer.
Ultralife, who make LiMnO2 PP3 batteries define their 'flat' at 5.4V in some graphs (to extend their capacity figures) and 7.2V in others for comparison.
When we droop to anywhere sub 7V the old dinosaur 7805 is tucked.
Whereas an LM36 could still output 5V.
In some circuits (based on experience) that could be significant extra life.

Pants? If using ADC (V+ ref) then of course it can potentially go pants.....
So, all in all, I'll stick to what I said and reiterate "Horses for Courses".
And I'll also stick to my Thurlby TTi Bench PSU for all my prototype work.


Before we end up in a lengthy , but interesting tangential discussion, has the OP read any of this?
Otherwise Page 1 will never be read and the OP will die of boredom.
 
Top