Hello i just started my first arduino project and decided to go with the Maple Leaf 32bit micro controller board and im really excited to get my projects going but i just noticed the battery input voltage is only 3.7v and it seems most other micro controllers out there have 5v input. Will this effect my IR sensors and servos? Can i wire a 7.4v LiPo battery pack to a barrel jack to use more input voltage? Let me know what you all think,thanks. Remember im a noob so please no complicated explanations please,lol.
Is 3.7v input enough for sensors and servos?
(31 posts) (4 voices)-
Posted 5 years ago #
-
You might want to read through this thread: http://forums.leaflabs.com/topic.php?id=147
Servo's (apparently) run fine with a signal voltage of 3.3V. Try to find a datasheet that gives you the minimum specs for the signal voltage.
Getting a 5V input is actually somewhat easy. If you use a USB port for power, you will automatically get 5V power on the Vin pin. Otherwise, Vin is the barrel voltage minus 0.6V from the drop over a diode. Also see this thread: http://forums.leaflabs.com/topic.php?id=259
In short, you can run your sensors and servos off the Maple (I have a project where I was going to use a servo- I decided on a better system- and I am going to use 5V sensors). You can wire a higher voltage supply to the barrel and get more voltage on Vin. Another solution is to make a small 5V regulator circuit (or buy one) so that your devices can run off that. Then you'd use a voltage divider so the sensors don't fry your pins. That eliminates the problem of getting 5.6V on the barrel or wiring your own 5V USB connector, which would still require a 5V regulator.
Posted 5 years ago # -
Thanks Silntknight!! Im going for 5.6v to the barrel and the links helped a lot i learned more then i thought i would!!lol. Also do you know if theres away to charge the battery pack while its still plugged into the barrel with out harming the battery or the board? im going to use a 6v NiHM with a 5v regulator plugged into the barrel jack but i want to charge my project without having to open it up and unplug the battery every time.
Posted 5 years ago # -
Hmmm. This is an interesting question. For lipo's, maple has an onboard charger that is just for SINGLE CELL lipo batteries (3.7V, although I think it actually stops off at 4.2V which is fine). I dont know the exact mechanics of how to get multicell charging (either serial or parallel).
For other types of rechargeable batteries, NiHM, or whatever it depends on the battery. Unfortunately NiHM are hard to charge, you cant just put a voltage on them and wait. See this article here: http://talkingelectronics.com/projects/ChargingNiMH/ChargingNiMH.html what you need is a current pump.
Lead Acid batteries you can just put a voltage across them and wait (well...perhaps you shouldnt do this, but I have without any problems).
If you want to charge your non-lipo without unplugging/replugging from maple, I recommend splitting your battery leads - one set going off to the barrel jack, and one set going off to the charger. depending on the charging mechanism you made need a switch to make these two connections mutually exclusive.
Posted 5 years ago # -
DarkStar, using a 5V regulator will get you very close to 5V, so putting it in the barrel jack should get you 4.4V on the Vin pin. Just wanted to make sure you knew that.
For charging, why don't you just get a good LiPo? http://www.seeedstudio.com/depot/lithium-ion-polymer-batteries-2a-p-603.html?cPath=104_107 might be a place to look. They have a lot of voltage and capacity ranges. I have also seen shields that are capable of charging batteries. If you want to charge/use a battery at the same time (not really sure what you mean), then you'd just connect the charger the normal way (all the positive leads on one side, the negatives on the other, I think). If you mean charge it while keeping the barrel in with the Maple off, which I think you do, you could use a simple SPST switch. That way you can turn off the Maple without disconnecting it. Still, I'd take Poslathian's advice about NiMH batteries. Hope this helps!
Posted 5 years ago # -
DarkStar -
im going to use a 6v NiHM with a 5v regulator plugged into the barrel jack
1. 6V from NiNH is 5 cells, is that what you mean?
2. Using 6V to drive a 5V regulator is a bit close for comfort.
A voltage regulator will drop some voltage (it isn't magic, it has to have a high enough voltage for it to adjust it down to 5V). Cheap voltage regulators might have a bit of a problem with being reliable with only a 1V voltage drop for them to work inside. 2V or more is easier (i.e. 6 NiMH cells).3. Seperate out servos from IR sensors.
Most IR sensors (that I am aware of) will work fine on 3.3V. Also, powering them from 3.3V means they can be connected directly to the Maples analog inputs, with no worries.4. If the only thing that needs to have 5V is the servo's, don't put the battery through a 5V regulator then feed both the servos and the board from it. Instead use the 5V regulator to feed the servos, but put the 'raw' battery voltage into the board.
5. If you use the same power source for the board and servo's (i.e. the output of the 5V regulator) try to test it very carefully. When the servo's switch on, they will pull the input voltage down a bit. If they use quite large current, that may be enough to cause other parts of the system problems if their power supply dips too.
I recommend, while you are experimenting, to have the option of using two power supplies, one for the board and sensors, and the other for servos, so that if you do have any problems, you can use the two independant power sources to see if the bug goes away. This doesn't have to be anything fancy, just two sets of batteries will do.
Posted 5 years ago # -
Thanks for help guys!! I have found a DFrobot arduino expansion shield that has breakouts for all the pins,pins for xbee and has a seperate input power for dedicated servo control!! So for now im going to use that but i did already order a 7.4v LiPO battery and a very good dc-dc converter so im going to try it the 5v regulated barrel way just for giggles and will post my results. Thanks for the help!! Go Maple!!
There sold out everywhere else so i ordered it directly from DFrobot wich are in china so shipping is going to be awhile but here's the link if anybody needs it:
http://www.dfrobot.com/index.php?route=product/product&path=35_39&product_id=264Posted 5 years ago # -
7.4v LiPO battery and a very good dc-dc converter so im going to try it the 5v regulated barrel way
I don't understand what role the DC-DC converter is going to play. Does it monitor the LiPo's and switch off when they are too low?
The Maple has voltage regulators on board, so it would work connecting the 7.4V LiPo directly into the barrel socket. I'd recommend monitoring the voltage from the LiPo's quite carefully to ensure they don't get too low (AKA permanently broken). I use one of the Maples ADC's for that.
Posted 5 years ago # -
Weve been thinking of burning an analog pin towards this purpose in a future revision. what do you think?
Right now the *best* 3.7V battery setup is to get one of the lipo's with the cutoff circuit already in there, otherwise once you drop below 2.8V or so and everything shuts down, your battery will trickle itself down to zero...which is really bad. But there are some very clever little circuits we were throwing around to do both cutoff and level monitoring in one shot.
Posted 5 years ago # -
Weve been thinking of burning an analog pin towards this purpose in a future revision. what do you think?
My designs are aimed at small-ish mobile robots.
IMHO, it is a "no-brainer" to use an ADC to monitor battery voltage; can't not :-)
We don't use 3.7V, so that charging stuff is wasted on us, but monitoring and 'shutdown' is useful.Posted 5 years ago # -
(The Maple has voltage regulators on board, so it would work connecting the 7.4V LiPo directly into the barrel socket. I'd recommend monitoring the voltage from the LiPo's quite carefully to ensure they don't get too low (AKA permanently broken). I use one of the Maples ADC's for that. )
So i can plug my 7.4v directly into the barrel jack and the maple will regulate it down to what voltage or can i adjust it myself? and how do you use an ADC pin to monitor the battery voltage? Thanks guys for all the info.
Posted 5 years ago # -
So i can plug my 7.4v directly into the barrel jack and the maple will regulate it down to what voltage ...
Yes, it will regulate down to 3.3V
or can i adjust it myself?
no, you can't choose the voltage. The voltage is fixed for the on-board regulators.
how do you use an ADC pin to monitor the battery voltage?
The ADC measures voltages in the range 0 to 3.3V.
If the Maple's ADC was connected directly to a 7.4V battery, then it would be damaged.
So the battery voltage is divided with a voltage divider, which is two resistors.
This thread has an explanation with an ASCII circuit http://forums.leaflabs.com/topic.php?id=259#post-1888 but that thread is for 5V rather than 7.4, but the same approach applies.A fully charged LiPo is a higher voltage than 7.4V, reaching about 8.5V, http://en.wikipedia.org/wiki/Lithium-ion_polymer_battery
so I'd suggest choosing the resistors to divide down, say, 9V to 3.3V, i.e.
3.3V/9V = R2/(R1+R2)
So if R1+R2 = 9K, then R2 should be 3.3K.
That would make R1 = 9K - 3.3K = 5.7KResistors come in 'preferred values', e.g. http://www.logwell.com/tech/components/resistor_values.html
There isn't a 5.7K resistor.
The normal technique is to choose the nearest preferred resistor value for R1, which is bigger than 5.7K, so 6.2K would be used.
Or you prefer to 'live on the wild side' you could try 5.6K(Rerun the equation for 3.3K and 5.6K, assuming R2, the 3.3K, is at the highest value for its tolerance [probably 5%], and R1, the 5.6K, at its lowest value for its tolerance. )
To be safe, use a voltage meter, and could check everything is okay, specifically the output voltage is under 3.3V with fully charged batteries, before connecting the Maple ADC to it.
Just to ensure some protection if something goes wrong (e.g. the charger gets connected) and the voltage exceeds 3.3V, you could put a zener diode across R2.
Posted 5 years ago # -
So if the barrel jack regulates the voltage down to 3.3v then how do I get 5v to the maple wich is what I'm trying to do so I can have proper voltage to my servos/sensors. I have a 7.4v lipo pack and a dc to DC converter wich will regulate the voltage to what ever I want wich is 5v. So how do I get 5v to the maple? Through the usb? I'm also building a multi cell lipo charger with a maxim charger ic and a 10 segment led with driver to visually monitor my battery life so I really don't need the onboard charger or to monitor through the ADC. Thanks for all the help
Posted 5 years ago # -
So if the barrel jack regulates the voltage down to 3.3v then how do I get 5v to the maple wich is what I'm trying to do so I can have proper voltage to my servos/sensors.
Take the 7.4V (nominal) battery voltage, and put that into the barrel socket. That will be regulated down to 3.3V and power the Maple.
Also take the 7.4V (nominal) battery voltage to the input of the 5V DC-DC converter. Take the output of the 5V Dc-DC converter to the servos.
So how do I get 5v to the maple?
I don't understand why your asking that.
Maple doesn't use 5V, and 5V doesn't come out of it.
You could feed 5V into VIN, or via a USB socket, and its on-board regulators will regulate down to the 3.3V it uses.
The disadvantage of feeding the 5V in via those two routes is, if the battery polarity gets crossed, it may damage or destroy the Maple.HTH
Posted 5 years ago # -
I agree with Gbulmer. I'm not entirely sure why you want 5V flowing into the Maple when you can just use a DC-DC converter to directly power your gadgets. I recently made that switch actually. If you want ideas about circuits, check out this thread: http://forums.leaflabs.com/topic.php?id=475&page=2
It has a lot more than that, but the links to pictures show a 5V DC regulator circuit. It's labeled "Power Regulator." There are also great schematics online.Quick question to all, does polarity matter with the barrel, or does the Maple auto correct for polarity?
Posted 5 years ago #
Reply »
You must log in to post.