Go Down

Topic: Lithium battery (Read 4920 times) previous topic - next topic

guillaume55

Thank you, I was not sure if it does work if the VDD voltage vary
R1 and R2 muss be 500kΩ resistor?

guillaume55

I don't find the ltc3531 in the right package, can I use MAX1595EUA50+ instead? I've read the datasheet and I think I can but if you can confirm
http://www.farnell.com/datasheets/86683.pdf
Could you confirm that my usb connection is ok? I have follow the 3.3v usb datasheet schematic but I don't know if it works with the arduino bootloader and program
Thanks

BigBobby

#32
Apr 22, 2016, 05:46 pm Last Edit: Apr 22, 2016, 05:51 pm by BigBobby
Thank you, I was not sure if it does work if the VDD voltage vary
R1 and R2 muss be 500kΩ resistor?
There were only 2 equations and 2 unknowns.  500kΩ isn't far off, but algebra shouldn't be out of your league if you're really building this circuit.

I don't find the ltc3531 in the right package, can I use MAX1595EUA50+ instead? I've read the datasheet and I think I can but if you can confirm
http://www.farnell.com/datasheets/86683.pdf
Could you confirm that my usb connection is ok? I have follow the 3.3v usb datasheet schematic but I don't know if it works with the arduino bootloader and program
That's a charge pump.  It's another way to step-up and step-down the battery voltage.  It's not very efficient but it's very simple and very small.  Maybe that's what you want, however?

I don't see a schematic posted for the USB section of your circuit,  If you followed the datasheet for using a USB with VCC @ 3.3V, however, you're likely OK.

guillaume55

I didn't know if R1 and R2 can be equal, thanks
I've forgotten the schematic...

raschemmel

Quote
Equation 1:    2.9V = 1.240V * (R1+R2) / R2 
?

Are you sure you didn't mean 1.240V =2.9V* R2/(R1+R2) ?
1.24  =2.9*R2/(R1+22)
         = 2.9 * R2/1000000
R2 = 1240000/2.9
    = 427586.20689655172413793103448276

?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

BigBobby

?

Are you sure you didn't mean 1.240V =2.9V* R2/(R1+R2) ?
1.24  =2.9*R2/(R1+22)
         = 2.9 * R2/1000000
R2 = 1240000/2.9
    = 427586.20689655172413793103448276
?
You have no problem with your Algebra skills :)

raschemmel

#36
Apr 22, 2016, 06:55 pm Last Edit: Apr 22, 2016, 08:58 pm by raschemmel
Quote
Equation 1:    2.9V = 1.240V * (R1+R2) / R2  
I was referring to your typo (the 2.9 and the 1.24 were swapped)

Actually, there was no typo. I just calculated it as you wrote it and got the same result !

Also, I sucked at algebra so I cheated and just replaced the R1+R2 with 1000000.
;D
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

BigBobby

Also, I sucked at algebra so I cheatead and just replaced the R1+R2 with 1000000.
You could say, that makes you excellent at Algebra!

raschemmel

I think it's worth mentioning that not everyone reading this thread would realize the connection between the internal comparator in that chip and the Vref mentioned in the datasheet. If you look at the comparator tutorial and you see the input labeled "Vref" and then go back and read that datasheet, it becomes obvious that the purpose of that voltage divider is to output 1.24V to compare to the Vref . (using your chosen input voltage)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

guillaume55

I think I can't follow you... and my bad english won't help...
I havn't understand the value of the resistors and if the colmparator will work...
Thank you
Here's the actual schematic if it can help

raschemmel

Quote
I think I can't follow you... and my bad english won't help...
I havn't understand the value of the resistors and if the colmparator will work... 
1-Did you read Reply#39 ?

2-Did you read the tutorial I linked on Comparators ?

3-Do you know WHERE "the comparator" is ?

4-Do you know the significance and purpose of the "Vref" mentioned on page 1 of this datasheet ?

5-Do you know WHY the resistor value was calculated the way it was in Reply #34 ?

6-What parameter (voltage) do you recognize in those calculations that does NOT appear on page 1 of that datasheet ?

7- Given THIS:

Quote
General Description
The MIC834 is a micropower, precision voltage comparator
with an on-chip voltage reference.
The threshold is adjusted by the choice of two external
resistors. Voltage detection threshold is accurate to 1.5%.
Supply current is extremely low (1.5µA, typical), making it
ideal for portable applications
Why did you reference the mic834 in Reply#28 ?
What is the purpose of that chip in your circuit/schematic ? (I am fairly sure I know but I want to hear it from you. If you were asked to choose a name for this "section" of your schematic, what "name" or "label" would it be ?

That being the case , go back and do items #2,3, & 4 on the list above and THEN, and ONLY then,
answer this question:

Why did you say THIS ?
Quote
I havn't understand the value of the resistors and if the colmparator will work...
Why wouldn't it work ? It's a one trick pony . It only does one thing and it does it very well. What is "that thing it does ?"




Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

BigBobby

I think I can't follow you... and my bad english won't help...
I havn't understand the value of the resistors and if the colmparator will work...
Thank you
Here's the actual schematic if it can help
I looked at your schematic.

It seems you correctly connected U1 for a 3.3V self-powered application, according to Figure 21-6 of the ATmega32U4 datasheet

As for the comparator, U7 will change state when the INPUT pin is 1.24V.  If R13 = R15 = 500kΩ, then INPUT will be 1.24V when Bat+ is 2.48V.  It sounds like you want the comparator to change state when Bat+ is 2.9V, so you want to adjust your values of R13 and R15.  This was already calculated by raschemmel and I'm sorry that I'm not just calculating it for you, but come on...it's 2 equations with 2 unknowns.

Other things I noticed:

I see R1 and R2 are pulling up your I2C lines to Vcc.  Where is Vcc tied to a supply?  I don't see it connected to 3.3V anywhere?

You included U7 to avoid over-discharging your battery.  You have Bat+ continuously discharge 350uA, however, through R6 and R7.  At the very least you'd want to increase the size of R6 and R7 by 100x-1000x.    Even better would be to use a FET so that these resistors are only connected to your battery when U1 is performing an A/D conversion.

raschemmel

#42
Apr 22, 2016, 11:39 pm Last Edit: Apr 23, 2016, 12:17 am by raschemmel
R1 + R2 = 1 Mohm

R2 =
Quote
427586  ohm
therefore,
R1 = ?

R1 = 1000000-427586
R1   =572414   ohm

HELLO !

You are calculating  voltage divider resistors for a PRECISION COMPARATOR !

YOU CAN'T JUST ROUND 427586 UP TO 500 k ohm !

That defeats the whole point of having a PRECISION COMPARATOR !

(DOUOGH !)

You need to figure out how to get 427586 k and 572414 k

THINK ! Use your head !

HOW WOULD GO ABOUT DOING THAT ?

(dumpt dumpt dumpt dumpt (jeapory theme playing in background ....))

wtf ?
Why is R1 and R5 pulling DOWN SDA & SCL (I2C lines) ? (on the MMAB652)
Also, there are other SDA & SCL pins on other ICs that are not pulled up like R1 & R1 on the ATmega328.

I2C is OPEN COLLECTOR ! Those pins need to be pulled UP to send a HIGH when the internal transistors are OFF.

Those two pins are supposed to be PULLED UP to Vcc with 4.7k ohm NOT pulled DOWN with 1 k .
Where did you get those values ? That would never work .
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

guillaume55

Raschemmel : I have read the reply and the link
In my mind Vref is a reference to compare with the Vin voltage and this is the way used by the comparator to know the input voltage
The mic834 miss pull low the shutdown pin on the regulator to limit the discharge of the battery to a safely voltage
I have understand the two equation now
6- Vref is integrated to the chip

BigBobby
I have undestand why these values for the résistors
Vcc is 3.3v (I have changed vcc for 3.3v but I have forgot these)
I will change the values and maybe see for a FET


Raschemmel
"Use your head "
Maybe two or more résistor in serial(<-- I don't know if it's the right word, it's just a translation from french but + ___résistor___ résistor____-  )
I can't check the I2C résistors today (sport race not lazyness

guillaume55

The following of the #43 is not présent, maybe because I have used my mobile phone (this is why é, è ...) but thank you for your help

Go Up