Hi! I'm working on a digital watch and i wonderd, can I connect the RAW pin to an analog input of my Arduino Pro mini? It's the 5v version and I'm using a 3.7-4.2v LiPo battery.
In this case, what's a RAW input?
Reading the voltage on the battery, a 3.7V LiPo, connected to an Uno analog input is most defiantly possible.
The RAW pin is the pin that can get a input from 3-12 v DC. It makes it 5v or 3.3v for the board.
CasperdHaan:
The RAW pin is the pin that can get a input from 3-12 v DC. It makes it 5v of 3.3v for the board.
What is your electronics, programming, arduino, hardware experience?
The RAW pin on a ProMini is a POWER SUPPLY INPUT PIN.
It is conncected to the INPUT of the 5V regulator that is on the ProMini PCB.
The RAW pin needs at least 7V to allow the regulator to provide a proper stable regulated 5V supply.
The regulator can only supply a limited amount of current, of which most is used to supply the ProMini components.
A 3.7 to 4.2V Lipo will not be enough to power the on board 5V regulator.
Tom...
4.2V to the input of a 5V regulator is definetly not good, the regulator will be unable to regulate and may drop to a very low voltage.
Connect the LiPo to the VCC pin on the promini.
Aref is set up (default setting) to use Vcc as the reference.
You can instead select the Internal bandgap reference, ~1.1V.
If you divide down VCC into that range and feed it into an analog input, then you can monitor the battery level.
A 100K and a 20K resistor will do, and keep battery current draw pretty low, 4.2V/120000 = 35uA.
With a fully charged 4.2V LiPo, that will put the high voltage at 0.7V.
There's a problem: all my components are already solderd onto a custom pcb. It'll take weeks to get new ones. Is there another way to do this?
Well, if you were really careful, you could drill from the bottom up thru the bottom of the board to break the RAW power connection.
Or use an exacto knife and cut the trace on the Promini from Raw to the regulator input. See attached.
Then connect RAW to VCC on the bottom of your board, and add two resistors to monitor the voltage.
Hi,
Didn't you protoboard your project first?
Get it working , then go to PCB?
Tom....
TomGeorge:
Didn't you protoboard your project first?
Get it working , then go to PCB?
Heh, heh, I thought that was just too obvious a foolishness to mention.
CrossRoads:
Well, if you were really careful, you could drill from the bottom up thru the bottom of the board to break the RAW power connection.Or use an exacto knife and cut the trace on the Promini from Raw to the regulator input. See attached.
Then connect RAW to VCC on the bottom of your board, and add two resistors to monitor the voltage.
I've done that, and it worked! Thank you very much! There' s only one thing: "INTERNAL1V1" is only for the arduino mega. Is there one for the arduino pro mini?
The Pro Mini's processor is a Mega328, same as Uno.
void setup()
{
analogReference(INTERNAL); // use 1.1V internal ref
CrossRoads:
A 100K and a 20K resistor will do, and keep battery current draw pretty low, 4.2V/120000 = 35uA.
With a fully charged 4.2V LiPo, that will put the high voltage at 0.7V.
When I do this, it always says 1023. That's becouse the 120k only drops the 4v to 3.55v
How do I fix this?
CasperdHaan:
When I do this, it always says 1023. That's becouse the 120k only drops the 4v to 3.55v
How do I fix this?
How have you got your potential divider wired?
Tom...
That's becouse the 120k only drops the 4v to 3.55v
Not if you correctly made the suggested voltage divider using the 20K resistor.
The ratio of the voltage divider is 20/(120+20) = 0.143 (0.143 times 4.0V = 0.57V)
Most beginners find that it saves a lot of time and money to prototype a circuit and test it thoroughly, before ordering a PCB.
Thanks for all the help everyone!
I first didn't make a voltage divider, becouse i thought that CrossRoads meant that i needed to put the voltage thru a 120k resistor. That's why it always was 1023. Or so i thought. Me, as stupid as I am, had connected everything to VCC, not A3. After connecting a 1k resistor from A3 to GND it said 30-28. Thats when it all clicked in my head. I wasn't supposed to connect 120k, but 100k to A3 and 20k to GND. It says 646 at 3.97v. Thank you to everyone that helped!