running servos and PICaxe off same power supply?

tater1337

Member
I really want the project I am working on to have only one power supply, a 12v gell cell. the manual says that running hobby servo motors can cause issues. couldnt I stick some large filter caps to eliminate the noise?
 

moxhamj

New Member
Well it would be possible. If you are comfortable with building electronics:
Make the common earth point the negative of the battery. Have a thick lead to the negative of all the servos, and run a seperate lead to the negative of the picaxe board. Then current from the servos won't flow back via the picaxe board.

12V gel cell to a 6V servo is wasteful - half the energy will be heat and that will take big heatsinks. Take a look at the LM2575 simple switchers. up to 1 amp, and just need a 1A inductor of the right value (cost $2) and a diode (10c) and the 5 pin switcher. That will drive a few servos. Put in all the recommended filter caps.

Then for the picaxe, a seperate power supply (which could be another switcher or a low power 2950 5V reg.

First stop is the data sheets. If it seems daunting, or you are having trouble getting the right inductor (they are a bit hard to find), then stick with 4 nicads for the servos.
 

goom

Senior Member
I have a number of model boats fitted with Picaxes, servos, motors, speed controllers and radio recievers. They run from a 12V or 7.2V single supply, with a 5V linear regulator powering the electronics and servo. I have never had a problem with interference from motor or servo noise.
Some installations have 3 x 0.1u capacitors at the motor terminals, some do not. Motors range from 1 Amp to 25+ Amps.
I follow the usual recommendations for capacitors on the input and output of the 5V regulator, and try to keep the servos and motors as far from the electronics as possible.
I therefore think that you will be just fine with a single power supply.
The electronics within the servo (digital or analog) itself seem to operate perfectly, despite being immediately adjacent to the servo motor, and obviously sharing a common supply.
 

Dippy

Moderator
Read Drac's post twice - he gives good advice.
The method of earthing is used (in priciple) in many apps. e.g Switched Mode regs coincidentally mentioned.
It means that the 'power' devices won't introduce so many sparklies into ground line and doesn't cause voltage drops due to current.

'Interference' can be complicated or you can be fine. Or just lucky.
One area where many people forget (or don't realise) is the use of capacitors.
Throwing capacitors at a project can be wasteful and indeed counter-productive.
Simply thinking the-bigger-the-better is not always right ....
Values, types and physical location are of far greater importance.

Keep capacitors close to the devices. Have a couple of decouplers on the PICAXE supply pins RIGHT NEXT to chip.
e.g. a 100nF ceramic //d with 22uF electrolytic. - values approx and depend on 'real' situation. It REALLY REALLY can make a difference - this is not some "Old Wive's Tale" :)

Physical circuit layout (eg the afforementioned grounding) is important.
Try not to common the ground lines or supply lines for power-device and Processor.
When planning your circuit just imagine all the sparklies and surges going down the tracks like cars going down the road.

Physical proximities of PICAXE to noisy-power-device can be an issue too. But let's worry about that later as I don't wish to distract.

S/mode regs. The physical layout is crucial. I've just done a circuit where moving a component 1mm and providing a fatter ground route has reduced o/p noise from 50mV to 5mV. Breadboarding/Sripboarding s/mode regs will NOT give optimum results.

And a 'scope is really helpful when things get tricky.
 

BeanieBots

Moderator
In addition to the very sound advice given by Dr_Acula and Dippy, I would strongly suggest using a seperate linear regulator for the PICAXE supply and a 'switcher' for the servos.

If you don't feel up to making your own switcher, you can buy ready made 12v to 5v modules but they are not cheap.

Layout is the most crucial aspect to noise reduction when dealing with micros and high current devices.
BIG caps are good at reducing current surge induced supply ripple but almost hopeless at reducing high frequency motor and/or switcher noise.

You need a range of correctly placed caps for optimum noise reduction. This involves two apsects of the problem. Caps at the source to prevent noise being transmitted, and caps at the sensitive area to prevent noise getting in.

A badly placed cap can act as a path direct from the noise source to area you want to keep clean. You can't just throw caps at it and hope for the best.
 

Dippy

Moderator
"You can't just throw caps at it and hope for the best."

- yes you can; most people DO :)

Just kidding - sound advice.
 

hippy

Ex-Staff (retired)
On servos and linear voltage regulators getting hot, it seems ( in my very limited experience ) most servos have fairly moderate current requirements once positioned ( tens of mA ) so a linear voltage regulator to a substantially high voltage may be okay but depends on total load.

When a servo moves it seems current surges, I've seen over 1 amp, which will strain things but hopefully not enough to be critical. It would however be sensible for multi-servo systems to make servo movements separate rather than simultaneously to help the situation.

I presume that in model craft, when multiple servo movements happen simultaneously, the battery pack itself limits the current, a 12V battery and linear reglatory won't have such / as much 'fail safe' behaviour. Is that right ?
 

BeanieBots

Moderator
Sort of...
A typical servo WILL draw ~1A when it starts to move and only 10's of mA when stationary.
A 'typical' 5v linear regulator (eg 7805) is only good for ~1A.
With good decoupling and some reservoir capacitance, the short duration 1A load on a 1A regulator should not be an issue. However, if the servo should hit an end stop or several servos be very active together, then the supply will collapse and if the PICAXE is on the same supply, it will reset and behave erratically.

The heat disspation of a linear regulator supplying a servo from 12v also needs to be considered. At 12v input, the regulator will dissipate ~7W with a stalled servo. This will put the regulator into thermal shutdown very quickly unless large heat-sinks are used. Not all regulators have thermal shutdown. Some will simply melt and smoke under such conditions.

Model aircraft frequently have seperate batteries (typ 4.8v) for the servos with DIRECT connection. The batteries used for the servos are often a special type which have "sintered plate cells". These cells are lower capacity than 'normal' ones of the same size but are capable of deleivery much higher currents, 10's of amps from an AA sized cell.
 

tater1337

Member
ok, I sorta gave the wrong information, which is causing misinterpetation, but is still giving good advice.

the 12v gel cell will be the main power for this and a couple other things. the large capacitor I was talking about would be on the input side of the 7805 power circuit for the picaxe for brownout protection. the 7805 would only be for running the picaxe, not the servos. the servos will be placed a distance away from the picaxe. size is not an issue, so heatsinks are fine, but not needed if just running the stamp, right? good suggestion on a switcher for the servos, although I was thinking just gang a batch of 3 pin regulators (will that work?). yes, decoupling caps as needed, i may have long signal lines.

side note. preject will probably be built on a breadboard. not an electronic breadboard, but a chunk of wood w/brass pins, old school style. easier to mount servos and stuff. will probably have an electronic breadboard on it as well
 

moxhamj

New Member
Re not an electronic breadboard, but a chunk of wood w/brass pins, old school style

I have to mention this. My parents found this old bookstore recently and came home with some "Boys Own Papers" http://en.wikipedia.org/wiki/Boy's_Own_Paper from the late 1920s. So British, and exactly the sort of thing you find in a bookstore in outback South Australia. Lots of ripping yarns but also some very practical advice on how to build a homemade radio. They recommended the best way was with brass pins, screws etc, using mother's breadboard. Her real one. Just the right size. I always wondered where the term came from. Not sure what she was supposed to cut the bread on...

There were some great articles. But for some reason they were very strict on the idea of a return self addressed envelope. "Dear Editor, I am sending you some coins and would be grateful if you could give me a valuation. Some of them are very old, maybe over a hundred years old. Yours sincerely..." And the answer: "We have mentioned this many times and we will say it again, we cannot return anything without a stamped self addressed envelope. We are therefore keeping your coins..."

Anyway, enough rambling. Getting back to the question, if you are going for a 12V gel cell to do the picaxe, it might be a bit overkill but it would certainly work. If you are using less than 100mA for the picaxe, use a LP 5V reg, eg LP2950. If 100mA to 1A, use a 7805. No heatsink needed for running just a picaxe, and if you have a 7805 already, then use that.

I'd seriously look at 4 nicads or NIMHs for the servos. They can handle the peak currents, and also if you have some spares, you can be charging 4 while using the other 4.
 
Last edited:

tater1337

Member
Re not an electronic breadboard, but a chunk of wood w/brass pins, old school style

I have to mention this..... I always wondered where the term came from. Not sure what she was supposed to cut the bread on...
many a boy found out the hard way not to use mothers GOOD breadboard, and most had to stand up eating for a week.

Anyway, enough rambling. Getting back to the question, if you are going for a 12V gel cell to do the picaxe, it might be a bit overkill but it would certainly work. If you are using less than 100mA for the picaxe, use a LP 5V reg, eg LP2950. If 100mA to 1A, use a 7805. No heatsink needed for running just a picaxe, and if you have a 7805 already, then use that.
I figure that the 7805 will be fine, I am sure I have a few, so I didn't bother looking further.

I'd seriously look at 4 nicads or NIMHs for the servos. They can handle the peak currents, and also if you have some spares, you can be charging 4 while using the other 4.
the 12v will also be powering radios and other gear, and I want to keep it down to one standardized power supply, with one backup. this is for a rocket, so no need to charge a second set. 7ah gel cell should tell you that even if I did need heat sinks, size doesnt matter, i've got plenty of room. might look at nicads *if* they drop a bit in price and can handle life better than gel cells.
 

Andrew Cowan

Senior Member
One of my projects ran off 12V and had three 7805 regulators - one for a servo (hot!), one for the PIC and LCD and one for the LCD backlight. Worked really well (with a few caps).

A
 

westaust55

Moderator
Re not an electronic breadboard, but a chunk of wood w/brass pins, old school style

I have to mention this. My parents found this old bookstore recently and came home with some "Boys Own Papers" http://en.wikipedia.org/wiki/Boy's_Own_Paper from the late 1920s. So British, and exactly the sort of thing you find in a bookstore in outback South Australia. Lots of ripping yarns but also some very practical advice on how to build a homemade radio. They recommended the best way was with brass pins, screws etc, using mother's breadboard. Her real one. Just the right size. I always wondered where the term came from. Not sure what she was supposed to cut the bread on...
Have a look at the pic half way down the the page of the Silicon Chip mag website,
http://www.siliconchip.com.au/cms/A_111596/article.html
or larger view: http://www.siliconchip.com.au/cms/gallery/article.html?slideshow=0&a=111596&i=16

was included with the recent PEBBLE article in Silicon Chip magazine


Some very early valve radio and intercom projects (at mains voltage :eek: ) that I did as a 10-12 year old were of similar format before I moved onto re-use of some metal chassis.
 
Last edited:

moxhamj

New Member
Westy, that is my mum's breadboard!!

Oh well, off to eat my lunch standing up :(

Addit - tater, is the 12V SLA powering mission control on the ground or is it going in the rocket? If the latter, then we seriously need to look at weight. Every kg you lift (and a SLA weighs a few) will take x more kg of propellant. If you are going into orbit, the ratio of propellant to payload is a truly scary number. If you want to go light, what about looking at what the model helicopter people do and look at LiPo batteries?
 
Last edited:

tater1337

Member
Westy, that is my mum's breadboard!!

Oh well, off to eat my lunch standing up :(

Addit - tater, is the 12V SLA powering mission control on the ground or is it going in the rocket? If the latter, then we seriously need to look at weight. Every kg you lift (and a SLA weighs a few) will take x more kg of propellant. If you are going into orbit, the ratio of propellant to payload is a truly scary number. If you want to go light, what about looking at what the model helicopter people do and look at LiPo batteries?
SLA is going on the rocket, and weight is NOT a problem. really big rocket

www.littlejoeproject.com
www.youtube.com/tater1337
 

Mycroft2152

Senior Member
It seems like everyone is making a mountain out of molehill. This is easily do-able with a little plannng.

Back in the day, some early home computers used a S100 bus backplane and plugged in individual cards. The S-100 bus had a 12 volt rail and each cards had their own 5 volt regulator.

Scroll down to the middle of the page http://www.s100computers.com/index.html.

Look at the size of the caps in the power supply! http://www.classiccmp.org/dunfield/s100/h/cpinside.jpg

Myc
 
Last edited:

BeanieBots

Moderator
SLA is going on the rocket, and weight is NOT a problem. really big rocket
You should have a chat with NASA. I think they're missing something!

Both they and I'll confess to it myself, thought that weight was one of the important matters in rocket design.

Switching from Pb to LiPo on a 7Ahr pack would permit the fitting of ~70 PICAXE 08Ms inc PCBs.

PS.
Do you know about the affect of high accel on Pb plates?
 

tater1337

Member
You should have a chat with NASA. I think they're missing something!

Both they and I'll confess to it myself, thought that weight was one of the important matters in rocket design.
only if you are interested in maximum performance. for our flight tests we could just use supercaps if we were really worried about weight. cost and reliability are issues here
Switching from Pb to LiPo on a 7Ahr pack would permit the fitting of ~70 PICAXE 08Ms inc PCBs.
what the heck would anyone want that many!? :) yes the 7Ah is overkill, the 20watt ham radio is also overkill, but I'd prefer to have more power available in case something happens instead of a failure due to lack of power.
P.S.
Do you know about the affect of high accel on Pb plates?
not yet, not too worried. if it does become an issue, then we'll worry about it. fixing stuff that aint broke is not what i do.
 

moxhamj

New Member
Well I guess if you already have the battery for the 20w ham radio then it isn't overkill as you already have the battery. Heavy for the smaller rocket on that video. But probably not for the bigger one you are building. Are you really going full scale? If so (and your rockets do seem mighty impressive), do please keep us updated - I'd love to see a video.

What are the servos for - attitude/fin control?

And how are you going to steer - with the GPS or using accellerometers or some other technique? (I'm thinking of the electronics used in autonomous helicopters, which is often a hybrid of GPS, accellerometers and even magnetics/electronic compass).
 

tater1337

Member
Well I guess if you already have the battery for the 20w ham radio then it isn't overkill as you already have the battery. Heavy for the smaller rocket on that video. But probably not for the bigger one you are building. Are you really going full scale? If so (and your rockets do seem mighty impressive), do please keep us updated - I'd love to see a video.
thats the plan. if definetly questions one sanity, and I'll spare you the rants I've been having on pro-space websites who do nothing but sit and talk but never DO anything
What are the servos for - attitude/fin control?
Maybe.

First, I want to try a directed landing. Going to use a steerable chute and use the servos to collapse a couple cells for steering. I'f I can guarantee I can park it withing 50' of a desingated spot, the FAA should be REAL happy.

And how are you going to steer - with the GPS or using accellerometers or some other technique? (I'm thinking of the electronics used in autonomous helicopters, which is often a hybrid of GPS, accellerometers and even magnetics/electronic compass).
still thinking that one. GPS for sure, but might need a compass too, had a lively discussion with a TI worker about such things.
 

tater1337

Member
oh, BTW, picked up some brass pins at the hardware store and selected an oddballpiece of (pine?) wood. should be good to mount anything I need after i build the AXE117 board.

(yes, overkill, the AXE117 alone should be enough, but it is nice to mount the servos nice and solid so if one bumps the assembly the servos dont yank cords and stuff from the PWB, from experience)
 

moxhamj

New Member
Re "First, I want to try a directed landing. Going to use a steerable chute and use the servos to collapse a couple cells for steering. I'f I can guarantee I can park it withing 50' of a desingated spot, the FAA should be REAL happy."

That could work. Watching the video the parachute is a lot slower than the launch. I guess the parachute should be stable enough not to spin. Hopefully not swinging from side to side too much either. And if it is rigged right the payload should be sitting horizontal. So horizontal and not spinning would be perfect for the compass to give the heading. And GPS gives the location. Then, as you say, start steering it. That would be the theory. I guess you might need a test rig where you can drop it off a height and test the parachute? How do collapsable cells work? Would 4 cells at 3,6,9 and 12 o'clock positions be enough to steer?
 
Last edited:

tater1337

Member
Re "First, I want to try a directed landing. Going to use a steerable chute and use the servos to collapse a couple cells for steering. I'f I can guarantee I can park it withing 50' of a desingated spot, the FAA should be REAL happy."

That could work. Watching the video the parachute is a lot slower than the launch. I guess the parachute should be stable enough not to spin. Hopefully not swinging from side to side too much either. And if it is rigged right the payload should be sitting horizontal. So horizontal and not spinning would be perfect for the compass to give the heading. And GPS gives the location. Then, as you say, start steering it. That would be the theory. I guess you might need a test rig where you can drop it off a height and test the parachute? How do collapsable cells work? Would 4 cells at 3,6,9 and 12 o'clock positions be enough to steer?
nope, Different type of parachute. parafoil chute like skydivers use. fixes teh spinning issue.

p.s. the parachute on the vid was too small. hit hard, crumpled a fin, should have fell at about half that rate. parafoil chute can go faster tho.
 

moxhamj

New Member
These were the links I was thinking of. Found them on my work computer:
http://autopilot.sourceforge.net/faq.html
http://www.micropilot.com/

Ok, so if you can steer a helicopter you should be able to steer a parachute. And a rocket (with fast enough math on the accellerometers during takeoff). With the parachute, assuming you are not swinging or turning, you just go forwards with a gentle turn to the right or left until facing the right direction. Use the compass/GPS for that. Then head till over the GPS waypoint making small turns for wind etc. Then circle down.

For the rocket, I guess there is the takeoff and the rocket 'falls over' briefly before the airspeed gets high enough to guide it in a straight direction. You can see that on the video - it ends up heading in a straight line, but off to an angle (and hence lands some way from the launch site). I presume you don't have steerable nozzles, so you takeoff, let it get up some airspeed, take lots of measurements on the angular rate gyro which tells you how much it 'fell over' during the launch, and then once the speed is there, steer the vanes till it is pointing straight up again.
 
Last edited:

tater1337

Member
These were the links I was thinking of. Found them on my work computer:
http://autopilot.sourceforge.net/faq.html
http://www.micropilot.com/

Ok, so if you can steer a helicopter you should be able to steer a parachute. And a rocket (with fast enough math on the accellerometers during takeoff). With the parachute, assuming you are not swinging or turning, you just go forwards with a gentle turn to the right or left until facing the right direction. Use the compass/GPS for that. Then head till over the GPS waypoint making small turns for wind etc. Then circle down.
need a compass to know which way you are facing. been thinking of ways to eliminate that. should be able to do by keeping track of gps changes and gently turn it once it knows where it is heading.
For the rocket, I guess there is the takeoff and the rocket 'falls over' briefly before the airspeed gets high enough to guide it in a straight direction. You can see that on the video - it ends up heading in a straight line, but off to an angle (and hence lands some way from the launch site). I presume you don't have steerable nozzles, so you takeoff, let it get up some airspeed, take lots of measurements on the angular rate gyro which tells you how much it 'fell over' during the launch, and then once the speed is there, steer the vanes till it is pointing straight up again.
wind causes the tilt, but after it gets fast enought, the wind drops down to a insignificant fraction of overall forces on the fins, so it eventually goes strait. not steerable nozzles, but control surfaces on the fins later

a gyro? not KISS enough :)
 

tater1337

Member
Blimey, if a gyro is not KISS enough, you'd better completely forget about compass and/or GPS. They are 1000 fold more complex than a gyro:eek:
Besides, if you're thinking of controlling to a GPS you'll need a gyro anyway!
better send me a link to whats state of the art in gyros then. maybe something has changed since I last looked at them.
 

BeanieBots

Moderator
tater,
You can get gyros from most RC hobby stores. They're almost an essential for helicopter flight.
There are two types, "heading hold" and "rate".

"Heading Hold" integrates the error over time.
"Rate" applies a fixed gain to the error.

Your demand signal goes in one end and the corrected signal comes out the other straight into the servo. No software required on your part.

It is essentially the device suggested by papof2 but with all the sums calculated and servo signal generation done within the unit.
I would suggest getting the "Heading Hold" type. These usually come with the ability to switch to "Rate" (if you want to calculate your own integrals) and have variable gain (set using a seperate 'servo' type input), so that you can adjust for the parameters of your rocket. (mass, speed, inertia etc)

Attempting to do all those calculations on the fly would be quite a task for a micro. Trying to calculate vector differences from a GPS AND do the flight control postion calculations on the fly would be much harder.
Also, don't forget, GPS updates are not very fast. Just reading the serial data strings will be several orders of magnitude slower than using either an accelerometer or gyro.

@Andrew,
Don't fret, have a look at his website and video. It shows quite clearly how much he knows about rocketry.
 

tater1337

Member
tater,
You can get gyros from most RC hobby stores.

Attempting to do all those calculations on the fly would be quite a task for a micro. Trying to calculate vector differences from a GPS AND do the flight control postion calculations on the fly would be much harder.
Also, don't forget, GPS updates are not very fast. Just reading the serial data strings will be several orders of magnitude slower than using either an accelerometer or gyro.
yeah. depends on weather we are talking flight or descent. gps for descent, somethign with faster sampling for flight, although it could do without for ascent.
 
Top