Hello, I'm a newbie to Arduino and electronics. I have an Arduino Uno with an Ethernet Shield and have managed to build a circuit on the breadboard which uses the 74hc4067 multiplexer to open a port and read an input from a temperature sensor. It displays the temperature reading on the serial monitor. In another sketch I figured out how to use the web to display this same information. I only mention this to give you an idea of my skill level. The math of Ohm's law makes sense to me but applying it to the design of my own circuits remains daunting. So here's my goal. I've built an electric bike. It's being powered by up to 72 battery cells scavenged from old laptops. From the reading on using these cells its important to match cells of equal capacity (measured in mAh). This is a difficult task with used batteries. The best way to do it is to charge a cell and discharge it, measuring the voltage drop over time to calculate the true capacity. To do this you can put a large resistor on the cell to draw the current and measure the voltage drop. Track this over time and you have what you need. Simple enough (easy for me to say) for a single cell. But I have about 300 cells to test. One cell at a time will take forever using this method. So I'd like to build a multi-cell discharger using the 74hc4067 multiplexer to read 8 or 16 inputs at a time. Conceivably I could connect two multiplexers to the same Arduino or build. multiple units to test the batteries in large batches. Hopefully you see where I'm going. The lithium ion battery I'm testing will be charged at the start around 4.0v (maybe up to 4.2v). The test will draw it down to about 3.0v, lets say. A good test will pull about 1A and measure how long it takes to drop the voltage (and calculate the mAh of the cell). Here's the problem. The 74hc4067 inputs are supposed to be at 25mA or less. If I hook the multiplexer across the ends of the resistor, won't the current fry it? How do I measure the voltage but at a very low current (25mA) compared to what the drain of the battery is? Somehow I think if I understood Ohm's law better I could figure this out but I'm stumped. If you've read this entire post, thanks for your patience. Any tips or pointers would be most appreciated. p.s. does this have something to do with a Hall Effect sensor?
Hi and welcome.
Your concern is nothing to worry about. The '4067 output will be connected to the Arduino input, which is high impedance. Only a very tiny current will flow into the Arduino.
I am surprised that you understand cell charging so well without understanding Ohm’s law!
Thanks, Paul. I'm concerned for the input of the multiplexer itself. Here's the thinking. See if it makes sense. If I put a resistor of say 1 ohm against the lithium ion cell, according to ohms law it will pull 1 amp, right? And then if the multiplexer input measures across the resistor, won't the cell fry the multiplexer, whose limit is 25mA? I can use a larger resistor to protect the multiplexer but then I'm not discharging the battery at the proper rate. Make sense? Thanks again.
No, like I said, only a tiny current will flow through the multiplexer because its output will be connected to the Arduino input. Now if you set that Arduino pin as an output and make it low, then ZAP! You might well damage both the multiplexer and the Arduino. If you are worried about doing that by accident, just put a 200~300R resistor between the cell and the multiplexer input. It shouldn’t change the reading significantly.
OK. A tiny light bulb may have just gone off in my head. I read a lot of water analogies about electronics so tell me if this applies: the arduino being the input at the end of the circuit so to speak is the "faucet" They speak of, limiting the current flow IN. If as you say, I reverse the pin and make the arduino the output, the other end, which could be very powerful, could pull too much current through the multiplexer and fry it. Right? I will protect the multiplexer as you suggest. Thanks much again! (I wish I'd had arduinos when I was younger!)
Bad analogy. You are planning to use the mux chip/arduino like a voltmeter. So it is just a 20K resistor in parallel with whatever load resistor you are using.