Long time lurker, first time poster here. I have messed around with my arduino uno on and off for two years now. Built a scrolling led marquee and controlled a stepper motor due to the great community here as well as the plethora of code shared throughout the internet and this board. I have a question on the capabilities of my uno and whether i need to use something more capable or if even it is possible.
Here's the scenario: I would like to test simultaneously eight lithium batteries. The arduino will control a circuit that discharges the batteries until they reach a certain voltage. When target voltage has been reached, the arduino will stop discharging the battery while the others continue untill they reach said target voltage. At the end of said test, an lcd displays the result until i take out any battery, resetting that result back to default. The circuit i intend to use involves relays and resistors to discharge every second (not looking for fast here) and count each time it does, like a clicker at a toll booth.
So in summary, arduino runs the relays to turn on and off, discharging the batteries down to a set voltage, all the while keeping count as to how many times the relay has turned on/off and display the result on a LCD screen, then reset the result and do it again once i take the battery out and put a new one in. now the number of batteries being tested is not set in stone, but the more the better, otherwise I will need to make multiple setups. So like my topic says, am I asking too much of my Uno or is the little unit that could capable of such a feat?
I defer to the gurus of this board's better judgement but please take it easy on me, i am not too smart and this task of mine will take me awhile to build and program. thanks for reading.
Well if you are just asking if it can be done then sure that is no problem.
A few notes.
If it were me I would use FETs instead of relays. It sounds like the discharge is going to have high current and relays being mechanical will ware out.
Rather than pulse discharge the battries I would continuously discharge them. With pulse discharge you are giving the battery time to recover and that does not reflect a real life situation.
You will need to buy a Mega 2560 to get enough analogue inputs (or a Mini or Nano)
The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega),
Well, you would buy an analog multiplexer, but I suspect it may be cheaper and easier in the long run just to buy a Mega etc, rather than messing around with multiplexers.
You have not said what voltage the batteries are. I suspect the are more than 5V, so you will need to build some resistor divider networks i.e 1 divider per analog input
You have not said what accuracy the voltage measurement needs to be, I'm presuming that the 10 bit ADC is enough accuracy for you ?
i.e if you prescale down from 15V to 5V, that would give you 15V / 1024 = 14.6mV accuracy ?
Driving a load of relays is easy, just buy one of these
Sorry for not listing the battery voltage. Each cell being tested is a 3.7 nominal voltage 18650 cylindrical cell. The range of testing is from 4.1 to 3.0v. the reason i am using relays is because i have them from an old project and would rather use stuff i have now than purchase new stuff, other than purchasing an lcd screen and possibly the arduino you folks suggested. I will first figure out how to do one, then expand from there. I have seen the codes for operating relays and LCDs, but little on voltage reading so I will be researching on that. Been having the biggest headache trying to figure all this stuff out but I am glad that kind people like you folks are here to reply and help one such as I. Kudos to both of you for such quick responses and hope to respond again soon to my progress in the next few weeks.
Having read your post, im interested in following it, I plan to build a discharge circuit in order to test the capacity of individual lithium cells,
i have one of these:
It works ok, although the voltage measurement is off, I hear they can be calibrated, but I havent tried yet.
I know you dont want to buy new gear, and i dont know if tis possible or not, but this charger i suspect uses an atmel chip. if the bootloader can be put onto it then you have all the hardware you need to have for 20 usd,
If you go about buying an LCD then avoid the i2c ones, I have some and they sometimes freeze, not updating, which may make you think that everything is ok when infact it isnt, mine seem to freeze about once an hour or so, randomly,
if you need to monitor critical functions, then I found I need either to have a clock updating on the screen in order to confirm that it is updating, or use the LED on pin 13 to let you know a critical situation has ocurred, just as a backup.
I am planning to try and make a charger, which I have researched a bit and it seems a lot more complicated than I would have imagined, I am going to start with a discharge circuit for capacity testing, and then move onto chargin when I have learnt the discharging.
What resistors will you use to discharge? have you got a schematic? I was planning to use a bank of 12V lightbulbs as the discharge load. and measure current over a simple resistor.
Correct me if I am wrong, but I think you can read up to 5v directly on the pin with analogRead, perfect for the lithium cell.
If you need to read more voltage then a resitor bridge (is that what they are called?) can be used to drop the voltage before reading it, then you mutliply it back in the code to get the real value.
I have found it to be easy to achieve two decimals accurately, I have read posts where they have three decimals,