Switch power to sensors
Basil
Posts: 380
Hi All,
I am trying to figure out a MCU controlled power switch for my device.
Prior to launch, I want to be able to turn off the sensors (ADXL78 accelerometer & MPX4115A pressure sensor) to save power, and only turn them on every 250ms to take a sample.
During flight, they may need to stay on all the time due to the sample rate of 5ms being higher than the powerup time of the devices (The MPX is 20ms, ADXL is not so much but still not fast enough)
I am wondering if I can put a P-Channel FET on the 5V power line and just switch it on/off with the MCU? I would assume i'd need a pull down resistor, is there anything else I'd need to watch out for?
I am trying to figure out a MCU controlled power switch for my device.
Prior to launch, I want to be able to turn off the sensors (ADXL78 accelerometer & MPX4115A pressure sensor) to save power, and only turn them on every 250ms to take a sample.
During flight, they may need to stay on all the time due to the sample rate of 5ms being higher than the powerup time of the devices (The MPX is 20ms, ADXL is not so much but still not fast enough)
I am wondering if I can put a P-Channel FET on the 5V power line and just switch it on/off with the MCU? I would assume i'd need a pull down resistor, is there anything else I'd need to watch out for?
Comments
-Phil
Sorry about the messyness, I had to butcher my firing circuit as I don't have Eagle at work
My firing circuit has a similar arrangment.
The Bias transistor is a MUN2211.
What should I look for in an FET for say 100ma max current?
EDIT: Attached file...
With such a minimal load could you·use just a NPN or·PNP·transistor to control power?
I had thought about that. The combined power usage is about 12ma so your not far off
Im not sure how much current it would consume to do the switching though...
This will all be running off a 9V battery which needs to be able to fire up to 15A a couple of times so im trying to keep power draw to a minimum
I guess I just have to figure out if the pros outweigh the con's...
I guess I could, are you able to give me some insight into how you would do this? I can't imagine it being much different to the circuit I posted
Yes, the circuit you've shown will work just fine. 'Best of all, its power consumption when "off" is virtually nil. You can improve consumption in the "on" state by replacing the NPN with an NMOS FET. High-value (100K) gate-to-source resistors will help, too, for both transistors. (BTW, you've got the PMOS drain and source reversed in your schematic.)
-Phil
Something like the attached?
Does the Datasheet I attached look ok?
?? Is my FET picture wrong? It looks ok compared to the data sheet?
*Peter*
On your PMOS FET, the source should be connected to +5V, and the drain to your load. You have it the other way around. Also, be sure to connect a 100K resistor from the NMOS FET's gate to ground. This will prevent inadvertent activation if the Propeller's pin is floating.
-Phil
Will fix that up thanks, same with the firing circuit!
Will add the 100k, thanks for that.
Do you think I should use 100k to 5V instead of 47k on the PMOS FET gate also?
BTW, when your sensors are turned off, make sure that any other lines to them are either floating or pulled low. Otherwise, you could end up powering the sensors through these other connections.
-Phil
Phil,
With the NMOS FET, what do you mean by an 'open drain' FET? Is this just a normal N channel FET?
Do I need one with a low Vth or something? Or will any N channel do?
-Phil
EDIT: Ignore my comment below, I have had a good look at Wikipedia and understand now
Ahhh ok then.
About the reversed PMOS FET I had.
Everything I have seen suggests it was around the right way in the first place so I'm a little confused?
Would you be able to explain a bit?
The original diagram I posted is the firing circuit, which should allow current to flow when the Prop pin connected to the RET goes high.
It is being used as a high side switch (I think thats the right term)
I have attached the firing circuit FYI if it helps.
Sorry to be a pain!
Thanks,
Alec
Post Edited (Basil) : 5/2/2007 10:28:36 PM GMT
-Phil
I now have the source connected to 9V and drain connected to the load
Thanks for pointing out my error! That could of turned nasty lol
how do I figure out the resistor to use in order to keep the Gate voltage higher then the Source voltage when I want the switch to be 'off'
if you have the I/O pins to spare...
Why not simply power the devices by setting an output to '1' and using that as the Vcc?
Otherwise, a "solid state relay" may be appropriate; or perhaps abusing an opto isolator...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
However ;-) the devices are 5V.
This device will be in a high powered rocket which can experience upwards of 40G in some cases, but usually around 4G.
I would prefer to stay away from mechanical switching due to the risk of the high G's turning things nasty :-)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I would love to change the world, but they won't give me the source code
People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install Windows.
I spent a minute looking at my own code by accident. I was thinking "What the heck is this guy doing?"
A few questions about the opto.
What is the current draw on the opto itself? Which spec do I look for on the data sheet? Is it 'If'?
Would there be any benefit of going with the opto over the FET combo?
Board space is much the same from what I have seen.
They don't waste any current when off, but they do require the LED drive current to turn them on. One big reason for using them is to acheive isolation between the control and the power circuit. Also, they can veery easily translate voltage levels from a DC control input to either DC or AC output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The sensors I will be switching only consumes 10mA and 1mA which makes it almost not worth it in that case.
The FET solution seems the best solution in this case, but thanks for the clarification, I think there may be a situation where I will need to use an opto in the not to distant future [noparse]:)[/noparse]
I should mention that even though the current draw is low for these sensors, this whole system will be running on a 9V battery so every bit counts [noparse]:)[/noparse]
Those 15A bits are really going to suck the life out of the poor little battery. (in all honesty, most of the time 1A will be all that is needed to fire the pyro charge, but sometimes it gets up there...)
Post Edited (Basil) : 5/6/2007 9:25:34 PM GMT
What current do you think a 9V could supply?
Post Edited (Basil) : 5/6/2007 9:50:56 PM GMT
With the low current ignitors (sub 1A) 9V should be fine right?
With the high current ignitors (<15A), the user could attach thier own battery up to 12V to the terminals [noparse]:)[/noparse]
I forgot that I put terminal blocks on the board! Current draw wont be a problem as the user could just connect a bigger battery [noparse]:)[/noparse]
Bah, silly memory.
"At a minimum, according to the manual, the unit is designed to operated from a single 9 volt alkaline transistor battery. A quality alkaline battery is capable of sourcing 5 amps for the hundreth of a second of current flow required to activate the e-match"
For higher current ignitors. most people seem to use large 9.6V batterys.
For some reason I though the current would be drawn for a longer period