Go Down

Topic: Battery Project (Read 337 times) previous topic - next topic

clt1dpw

I am new to Arduino, so I hope this is the right place to get my answer.
I am using Arduino Nano and I have a module that i have created to use for my battery capacity/charger project.
The module needs two inputs to trigger mosfets, so these always have to be connected.
One mosfet is to turn charging board on and off, the other is to turn discharging on and off. So they need signal to be high when in use.
Then I have 3 other connection just to read various information. These do not have to be connected all the time.
I have tried to use the 16 channel multiplexer(MUX74HC4067) but cannot keep two channels open at the same time.
I was then directed to use a shift register, but I am having the same problem.
I can get 2 modules to work on the Nano, but as you can imagine, i run out of pins if I want to do 4 or 8 modules.

Any thoughts or help would be much appreciated.

Grumpy_Mike

Quote
, i run out of pins if I want to do 4 or 8 modules.
Shift registers can be chained one after the other giving you 8 extra output pins per shift register and using no more pins. So you can have as many extra output pins as you want.

Paul__B

Sorry but descriptions such as this
Then I have 3 other connection just to read various information. These do not have to be connected all the time.
... is completely useless in explaining your problem.

You need to sit down and write a specification for your device.  What it is supposed to do, what inputs or sensors it requires, connected to what circuit (with diagram), what outputs it needs and what procedures it needs to execute to what effect on those outputs.

Only once you have documented the whole plan of your device can you use that document to request assistance in the design here.


clt1dpw

Ok, I have been asked for more clarification.

The project is for testing capacity of 18650 batteries for various other power wall/power pack type units.
This project will solve the problem of charging 18650 batteries in one piece of equipment, then manually moving the 18650 batteries to a capacity testing unit, then manually moving them back to the charging unit when capacity testing is complete. There are commercial pieces of equipment that can do this on the market, but they are expensive.

The code I have written can do this for 2 batteries from the Arduino Nano, but that is the limit due to number of pins available.

The module I have built and want to use multiples of (up to 8) is a charging and capacity tester for 18650 batteries.

Output #1
I have one Mosfet that controls turning on and off a TP4065 module. This charges the 18650 initially or after the capacity test. The Mosfet if forwarded to allow power to go to the TP4056. That is why this needs to have signal all the time when charging.

Input #1:
When TP4056 is in use, I can sample the TP4056 for when it has completed charging of the 18650 battery. This connection does not have to be on all the time an will only be connected to when testing to see if charging is complete. If charging is complete the first Mosfet will be turned off, thus turning power off to the TP4056 chip.

Output #2:
The second Mosfet is for the capacity testing circuit. It is basically a power resistor that is connected in series to the battery when this Mosfet is forwarded. That is why this needs to have signal all the time when testing the battery for capacitance.

Input #2 and #3:
There are 2 test points here that sample the voltage before and after the power resistor used to calculate the power used for the capacity calculation. Also the first of these test points will be used to monitor the 18650 battery so that when it reaches 3.0 volts the Mosfet for the testing circuit can be turning off, stopping the discharging of the 18650 battery.

There will be one more input later Input #4 that will be used to monitor temperature of the battery during charging and discharging.

So, there are a total of 4 inputs that can be sampled from the module and 2 outputs that needs to be connected all the time when they are in use.

The outputs is the problem I am having with shift registers. How to I keep those on all the time when in use for the Mosfets.

Grumpy_Mike

Quote
How to I keep those on all the time when in use for the Mosfets.
That happens naturally unless you program them badly.

You should set up an array which you want to transfer to the shift register. Then when you want to change things you just change the appropriate array value and transfer the whole array out to the shift registers. Those bits of the array that you don't change, don't change on the shift register outputs either.

Go Up