Workshop Power Upgrade 24V

The workshop is currently powered by a 12 volt battery which is kept charged via a solar charging system. All of the light and some other things are power directly from the battery. The mains power tools like the drill, grinder and belt sander are power from the battery via an inverter. This system is  working well however I am looking to get or make a CNC machine which could be power from an inverter but most of the CNC ‘s I have looked at are running from 20 volt to 30 volt DC system and use a main power supply to provide the power from the mains.

As I am already running a DC system and it would be inefficient to convert it up to 230 volts AC just to convert it back to a DC supply again I considered running a CNC from 12 volt however this will mean hi current loads which is not ideal.

So I have decided to run it on 24 volts DC from two 12 volt batteries which I have got hold of FOC this will mean that the CNC will be running on a separate power supply from the rest of the workshop.

The next problem is how I can keep the 24 volt system charged from my 12 volt solar system.

The answer is a boost converter this will step up the 12V to a level which can charge the 24v battery system and it can provide current limiting as well.

The next problem is the 12v battery system has a battery around 70Ah and the 24V system has 2 batteries at around 70Ah each. This will mean it will be possible to over discharge the 12 Volt systems and kill off the battery.  So I need something to monitor the voltage in each system and switch on and off the boost converter as required.

This is the point where this project gets interesting as I am going to make a small control board based on an Arduino.

Prototyping the control board

A prototyping board was selected which all the components would be soldered to. The Arduino pro mini was selected for its small size. Its the 5v version. The RAW input voltage is rated to a maximum of 12v. As the battery voltage will go above this I decided to add a small step down converter (Mini-360 MP2307) and set the output voltage to about 6v to power the Arduino.

The Arduino can not drive the relay coil directly so a transistor (2n2222) was used to switch the coil. There is a diode to stop any back EMF.

Two voltage dividers where made using 100K ohm and 1M ohm resistors. This will allow the Arduino the measure up to 55 volts. These values could be changed to give a lower range and improved resolution but I have these to hand and should be fine for this project. 

I have now added a JST connector so I can connect a LED indication board later. This will show each battery status and if charging is in progress. 

 

Status indicator PCB

There is just 3 LED’s and 3 resistors to show the current status. 

The Green LED’s show the 12V and 24V battery status and the red shows if charging is in progress. 

Programming

Once the board was assembled it was time to program it for testing. 

Once this is done it will need to be calibrated. 

This will be done by adding the reference voltage to the program as its default is 5v which is only about right. 

The voltage deviders will also need to be calibrated in the program due to the manufactures resistors tolerances. 

 

 

The Program Basics

The program needs to monitor the voltages of the 12 Volt and 24 Volt batteries and then decide if it needs to turn on or off the boost converter.  I need to ensure that the 12 Volt battery does not run too low as it is still the main power source for the shed.

Criteria

The 12v battery must reach 14.2v (Battery 12 start voltage)  before the controller will turn on the boost converter but only if the 24v battery needs a charge. 

The boost converter must be switched off if the 12v battery gets to or under 12.2v (battery 12 stop voltage) or the 24v battery no longer needs a charge. 

Note that the 12v battery stop voltage will be an under load voltage and not an at rest voltage so the 12.2v stop voltage does not mean I am allowing the battery to discharge to around 50% and actual amount the battery has been discharged will be less than 50%.

How it works

Each battery will have a status of true or false

12v battery status of true means it is ready to charge the 24v battery.

24v battery status of true means it has reached a full charge.

As the boost converter is controlled by a relay and when the relay is activated the boost converter is then switched on so the relay will have a status of true or false as well.

Relay status of true means that the relay is activated. 

The Loop

The loop will simply call various functions in a set order. The actual function name is in brackets

Get the voltages (getVoltage)

So the first thing to do is get the current voltages. As the Arduino can only read up to 5 volts we are using voltage dividers to get 12v and 24v down to a level under 5v so we can read it. This function will then calculate the actual voltage.

Set The battery statuses (setBatStatus)

Next the program will look at the voltage’s collected and then set the battery status for the 12v and 24v batteries based on the voltages collected and the criteria set at the beginning of the program. 

Set the relay status (setRelayStatus)

Now that we have the battery statuses we can set the relay status. It does not turn the relay on it will only set the status.

Set the relay (setRelay)

This function actually turns on  or off the relay and the LED.

The program will wait a second and then do all of this again.

OK so that is the basics of it all however I have added some additional functions.

Additional functions and features

Error Mode

This function will flash the charging LED a number of times if an error is detected.

12 flashes means that there is or has been a very low voltage on the 12v battery.

A system reset will be required to remove the error.

24 flashes means that there is a low voltage on the 24v battery or it is disconnected.

Volt drop check

This function monitors the 24 volts and looks for a sudden volt drop and will introduce a short delay in the program and flash the charging LED 3 times.

The point of this was to allow the 24v error mode to function correctly if the boost converter has a high capacitance. Without this in the event of a 24v disconnect the system would ready the stored voltage in the capacitors as a low battery and would turn on the boost converter and keep them charged up.

Less power waste

I noted that there were times that the 24v battery could have been used a little but did not discharge the 24v battery to the point it changed the status to charge required.  

As it would be nice on good days to top up the 24v battery as the 12v battery was full and the sun was still out I added this function.

It will change the 24v battery status to charge required if it has been more than 8 hours since the last charge and that the 12v battery voltage is above the normal 12v battery ready voltage and has held that voltage for 1 hour.  

Testing and Calibrating

Boxing it up

The case was designed in Fusion and then 3D Printed. I have made some errors in the case and some improvements could be made. I am going to hold back on implementing any changes for now and test the system out first. I have some other things that I could add later if all works out such as using a small OLED display to give more details on the battery voltages. 

Installation

I have used a simple chocolate block connector to connect the control box to the 12V and and 24V batteries. Standard mains flex was used from the control box to the 24V battery with an in line fuse at the battery end. 

The control box was supplied power from the existing 12V fuse box. 

I have for now taken a 24V supply from the chocolate block connector for testing purposes. 

 

 

I will need to set up some sort of distribution system for the 24V  This could be as simple as what I had done for the 12V using a basic fuse box and bus bar. 

This will come later.

31/1/2021 Update time

I have up dates to this project coming soon as the system has been running for a little under a year on software version 1.1 and I would like a little more manual control. So have been working on version 1.2 which allows some manual input by way of a single push button. It was hoped that the 24v batteries would be used for a CNC however the CNC has had to be put on hold for now so I am now using the 24V for my electronics work bench.