PDA

View Full Version : powering picaxe



glenc70
29-02-2008, 15:27
i have built a circuit that uses a 9 volt PP3 battery, i have programmed my picaxe in the programmer but what i want to do is take the picaxe out of the programmer and put it in my built circuit which i know how to do but what i want to know is can i connect the picaxe to the 9 volt battery if i made a voltage divider and bought the voltage down to 5 volts that way as i have been told never connect the picaxe to a 9 volt battery so this is confussing me

thanks in advance

p.s i am very new to pic programming

Dippy
29-02-2008, 16:00
Yup, NEVER connect it directly to 9V battery.

Option 1.
On your own circuit board power it with 3 xAA (3 x 1.5v whatever) batteries.

Option2. (esp if your code uses ADC).
Use a voltage regulator on your circuit board.
Page 21 of the Getting Started (Manual 1) shows a typical example circuit.
There are a zillion types of voltage regulator, but the 'old faithful' 7805 will suit most apps and pockets.

However, if you are using a PP3 and the thing is going to be left running and is a low power application, then consider the far better options of LP2950 or LM2936 as their quiescent (intrinsic) power consumption is far lower. Both these devices AND their DATA SHEETs are available from Farnell as downloads.

Forget voltage dividers as they are wasteful and restrict your flow!

glenc70
29-02-2008, 19:14
thanks for the reply

you say about the voltage divider would be a waste of time but would it work for a little while without blowing the picaxe chip as i dont really want to have 2 different power supplies ( PP3 & AA's)[/QUOTE]

papaof2
29-02-2008, 19:18
PP3 batteries create 9 volts from a number of "folded postage stamp"-sized batteries, so they really don't have much capacity. A voltage divider won't work for long and won't provide a consistent voltage. As soon as the voltage drops a little, you may not be able to communicate with the PICAXE (for the next download).

If you must use a PP3, add a low power 5 volt regulator (preferably a low dropout version) and the associated capacitors - you will have fewer "Why did this stop working?" problems later.

John

Dippy
29-02-2008, 19:20
You got me confused mate.
You say you've built a circuit that uses a 9V battery, then you said "...if i made a voltage divider..." - implying you hadn't made this part yet.
Well, the best bet , for use with PP3, is to have a 5 volt regulator INSTEAD of voltage divider.

If you have already made your potential divider then tell me what value resisotrs you have used.
You see, the problem is that if (in an attempt to save wasted power) your divider values are too high then, as soon as you 'load' it up with the PICAXE the voltage across the resistor will change ... IxR yeah?
And every time you connected something to the PICAXE (e.g. programming or an LED+R) then the current would change again and therefore the PICAXE supply voltage would change.
It's simply not worth it.

And if your resistors are low (in an attempt to reduce Vchange with current change) then you'll prematurely flatten your battery. It's just a waste of power. Leave potential dividing for level shifting or references.

And if you get the values wrong, yes, you may blow the PICAXE chip. Or it may work in a limited way. It's your money and time.

Get a regulator.... please... they are cheap as chips ... or else you'll be posting with questions like 'My PICAXE has exploded' or 'My PICAXE won't programme its obviously faulty'.

But, as you are apparently in a hurry, I can't stop you trying it. Good luck. Bon chance.

eclectic
29-02-2008, 19:35
glen.
Your first post says "i have built a circuit that uses a 9 volt PP3 battery,..."

Question 1. What IS the circuit or what does this circuit DO?

If it is JUST to control a Picaxe, then 4.5 volts (from 3 AA) is perfect.
(That's what Dippy and John have already said).

OR, do you want the Picaxe to control something else?

e.

glenc70
29-02-2008, 23:06
thanks Dippy & Pappaof2 for saying about the 5 volt regulator this is a very big help.

its just that i was told by someone a while ago that i couldn't connect the picaxe or any PIC chip to a 9 volt battery not even through a divider or regulator thats why i wouldn't of thought of that, i have plenty of 5 volt regulators so ill use on of them

its only a toy car that can drive and steer itself for a college project i think ive probably set the bar to high for a first project though

thanks again

Dippy
29-02-2008, 23:11
Never listen to bar-room experts.

212
12-03-2008, 16:06
Dippy, I knew i had seen this 7805 circuit somewhere, but for the life of me could not remember where...Thanks!

I guess I have a different version of the manual 1 because it is on page 18 in mine, but you got me close enough to find it :)

Here is a capacitance chart to convert the cap values...if anyone needs it....I do :(

http://74.54.176.66/~yesdistr/index.php?page=capacitance-chart

manuka
12-03-2008, 18:43
Argh-avoid 9V batteries! They have little capacity and are usually very costly for what they are. As one of the great PICAXE benefits is that they're happy with supplies between ~2.8V-5.5V,why bother with higher initial values and wasteful regulators? 7805s need a good 1.5V above their delivered supply anyway, meaning as the 9V ages the 7805 will cut out while energy is still available.

Normally a switched battery box holding 3 x AA 1½V cells is recommended, with even 10 cent AA cheapies lasting MONTHS. If you're space constrained use the smaller AAA types. The 2 x AAA boxes are not much larger than a 9V PP3 & have greater energy storage (typically 3v @ 600mAh, compared with 9V @ ~100mAh).Additionally,both AA & AAA are widely available as grunty rechargeable NiCd/NiMH, with 3 x 1.2V = 3.6V still giving a good driving supply. Even consider a single AA "Joule thief" circuit?

On principle I now never design projects around 9V, even if a bulk supply of them is available,as later users may just junk the setup when the 9V battery costs drive them crazy. This has long been a schools electronic project nightmare of course, as the total component cost may be less than the 9V battery! NB-If one IS needed at short notice later,users often rob them from household smoke alarms, thereby removing the fire protection. As a designer you have to think about such long term implications...

Dippy
12-03-2008, 22:27
"Argh-avoid 9V batteries! "
- horses for courses mate.
Scenario: small enclosure+low power+ADC requirement. Then a bunch of AAs is not too good.
In the bad old days I had PP3 powered devices lasting 12 months with a BS1, albeit a lithium PP3 9V. For low-power stuff forget the ancient (but reliable) 7805.

"9V @ ~100mAh" for PP3? Eh? I think you'll find they are several times that number on low power circuits. Example: http://www.farnell.com/datasheets/103290.pdf

But for slightly heavier circuits I'd agree the AA route, sometime using proper SMPS.

Don't dismiss any option. It simply depends what you are doing. But you've got to know what you are doing and how big your box is.

212
13-03-2008, 02:02
But using lots of batteries stimulates the economy lol...

Gonna have this running on a wall adapter anyway though :)

Dippy
13-03-2008, 09:50
A slight red-herring, but for people designing battery stuff for prolonged use oudoors where it may get cold...
http://data.energizer.com/PDFs/alkaline_appman.pdf