Project of the Day – 24V Low Voltage Disconnect

Pictured below is one of our standard programmable 12V low voltage disconnect (LVD) circuits which has been modified for 24V battery systems.

24V low voltage disconnect - LVD

The base circuit board used is one we designed and have made for us which is a multi-use board with a high quality matching enclosure. By soldering a few jumper links on the back of the board we can change its functionality, inputs, and outputs so that it meets the requirements of whatever project we are working on. We designed the board with a small prototyping area in the middle to which additional components can be added if required.

In order to use this board for a 24 Volt low voltage disconnect things were a little tricky as all on board components are designed for 12 Volts. Therefore we first added an LM317T voltage regulator (using R1=330R, R2=2K8 resistor) and screw in terminals for the 24V battery to be connected to. The 11.8V outputted from the regulator was then connected on the underside of the board to the usual 12V input terminals which are now not used.

We then added a voltage divider to reduce the approx 24V input voltage sufficiently so that it can be measured using the analog to digital converter (ADC) on the PICAXE-08M2 microcontroller – we needed less than 5V across the full range of input voltages from the 24V system (e.g. up to at least 30V), and wanted to set this up so that the digital value given when 24.00V is connected to this new LVD is the same as that given when 12.00V is connected to the standard LVD.

The ADC converts the voltage it is seeing into a 10-bit digital value from 0-1023 where 0 will be the value if the voltage is zero, and 1023 will be the value if the voltage is equal to the supply voltage of the microcontroller (5.00V in this case).

With the accurate 470K/100K voltage divider we use on the standard 12V LVD we get 35.922 per Volt – i.e. input 12.00V to the circuit, the voltage divider will reduce this before it gets to the ADC (to 2.553V) and the ADC will output 12.00*35.922 = 431. We have hard-coded the 35.922 multiplication factor into our 12V LVD and everything else is worked out from it.

We hand-calibrated the new voltage divider (because the resistors we used in it only have a 10% tolerance). We simply inputted a 24.00V voltage and measured the voltage seen on the ADC pin with an accurate multimeter. DIviding this voltage by 5.00V and multiplying by 1023 to get the ADC value we got 398, less than the 431 it would have been if the resistors were high tolerance. Dividing 398 by 12V we found that the multiplication factor for our 24V LVD was 33.135 per Volt, so we simply changed that one value in the microcontroller code and everything worked perfectly – the only difference is that the user can set the cut in and cut out voltages in 0.2V steps now instead of 0.1V steps.

Project of the Day – Warning Watch Timer for Solo Sailor

Today we made the yacht watch timer pictured below. It was ordered by a solo sailor to use to ensure that she does not fall asleep for too long while on watch (checking the horizon for potential dangers).

Timer to keep solo sailor awake

As this is such a vital piece of equipment, we actually put two independent timers onto the same circuit board doubling up on all components including the warning buzzers. Therefore if a component on one of the timers fails, the second timer will continue to work perfectly.

The user can set the number of minutes the timers are to run before the warning piezo buzzers sound – e.g. 5, 10, 15, 20..etc minutes. Timer-2 is then automatically set to run for one minute longer than Timer-1.

While the device is connected to the 12VDC system on board, a pair of panel mounted LEDs flash once every second to show that the timer is running. Each time the sailor checks the horizon they press a panel mounted button to restart the timer countdown.

push to make reset button for timer

If the sailor falls asleep or forgets to keep watch then when the timer has run down Timer-1’s buzzer will sound for one minute. (We left the protective sticker over this buzzer to keep the sound level down.) If the sailor still does not press the button during that minute, then Timer-2’s buzzer will start to sound very loud and continue to sound until the button is pressed.

The sailor will fit an ON/OFF switch before the timer device. Each time it is switched on, both LEDs will light up and the two buzzers will sound for one second to confirm that everything is working as it should. The programmed number of minutes for the timer are stored in memory and are not lost when power to the device is disconnected.

The timers are built using Picaxe-08M2 microcontroller chips each powered via its own 5V regulator. The device is fitted with reverse polarity protection.

 

Project of the Day – Dawn / Dusk Raspberry Pi Switch on Device

Pictured below is a device designed to switch on a Raspberry Pi for a user programmable number of minutes at dawn and dusk as detected by a light detector. Under normal circumstances the Raspberry Pi itself could be used to detected day and night, but although the Pi is a very very low powered computer (2.5 Watts), that is a relatively large amount of power if it is to be on continuously 24 hours per day powered by a solar charged battery, as was our customer’s requirement.

dawn and dusk detecting controller to power a Raspberry Pi

Instead of leaving the Raspberry Pi running continuously, this intermediate controller circuit supplies power to the Pi only when required, and draws only a few milliAmps of current rather than hundreds of milliAmps of the Raspberry Pi.

The controller circuit we have built is based around a Picaxe-08M2 microcontroller. The user can set the light level threshold at which dawn and dusk are detected (using similar logic to that successfully used in our dawn dusk relay controller), and the number of minutes that the Raspberry Pi is to be powered at dawn and at dusk.

A MOSFET is used to supply a 12V output at dawn and dusk which passes through the 5V from 12V regulator pictured below to supply the required 5 Volts DC to the Raspberry Pi.

5-volt-regulator-for-raspberry-pi

Normally we would fit voltage regulation directly on our circuit board, but it is not possible to buy even half the components on this ready made 3 Amp rated 90% efficient 3.3V / 5V from 12V regulator (priced at £1.12 including delivery) so we used that. We just soldered 12V+, 12V-, and 5V+ leads to the regulator, and screw-in connectors on the output side of our controller to hook it up. A couple of terminals on our board then supply the regulated 5V voltage to the Raspberry Pi at dawn and dusk.

This will be put to use in a hen house door controller. The Raspberry Pi, extended with a Gertboard attached to the GPIO interface will be used to control a motor which will open/close a horizontally sliding door. Microswitches will be used to detect when the door is fully open/closed, and the Raspberry Pi will give feedback to the user by sending him an email. A camera may also be added to the setup in the future.