Solar Water Heating Pump Controller with Frost Protection

Our 2013 Solar Water Heating Pump Controller is one of our most popular products offering user programmable automatic control a the pump in a solar water heating system.

solar water heating pump controller with frost protectionToday we finished an updated version of this controller which offer frost protection. Solar water heating collectors and the associated pipework can be damaged by freezing. One way to avoid this is to pump warm water from the hot water tank around the collector(s) when the ambient temperature outside gets close to freezing. This turns the collector into a radiator, radiating heat from the warm water through the pipes and collectors which prevents them from freezing.

In general we recommend that solar water heating systems be drained in the winter to ensure that freezing and the associated damage cannot occur, but we made this particular controller for a customer in Canberra, Australia whose solar collectors have survived for 30 winters without coming to any harm. Also, although their are frosty nights in Canberra, it does not tend to get very very cold there.

The modifications to the controller make it turn on automatically at a user programmable low solar collector temperature (e.g. +5 degrees Celcius), and then turn off when the collector temperature has increased by 2 degrees. This will have the effect of keeping the solar collector from freezing, but the side-effect is that the temperature of the water in the hot water tank will go down.

If you need a controller with frost protection, please contact neil@reuk.co.uk with details of your requirements. It is however only suitable for use in areas with occasional light frosts – otherwise we still recommend draining the system for its protection in the winter.

Project of the Day – Battery Charger Controller and Timer

Today we completed a three way battery charger time controller for use in a motor home. This motor home has been fitted with three 12V batteries which are periodically independently used and charged (via a mains powered battery charger).

In order to keep all three batteries well charged when at home or on a mains hook-up at a camp site, we made an automatic controller. This connects each of the batteries in turn to the charger, with the user able to programme in the charging duration required for each battery – e.g. 3 hours, or 5 hours etc.

To make this controller more flexible we also added in a manual override enabling the user to manually select a battery to leave connected to the charger until they cancel the override – useful if one particular battery needs a lot of charging immediately.

automatic and manual multiple battery charger timer

We fitted one red LED per battery to give a visual indication of which battery is currently being charged, and the green LED lights up when manual mode has been selected.

The low current 12V outputs from our controller/timer go to the coils of three 25A automotive relays which switch the positive output from the mains powered charger to the appropriate battery.

Project of the Day – Automatic Toilet Flush Counter

This week we have been working on a project for a toilet manufacturer making a device which will count and log the number of times a toilet is flushed or partially flushed.

Although flow meters are already in place to measure the exact volume of water consumed by the toilets being tested, the key metric to calculate accurately is the amount of water used per flush, and to obtain that information it is essential to also count the number of times the toilet has been flushed.

There is no easy direct way to detect whether a full or partial flush has occurred, so two float switches have to be inserted into the toilet cistern – one just below the full cistern depth and the other just above the cistern depth immediately after a full flush.

automatic counter to log and display the number of times a toilet is flushed

When the level of water in the cistern drops below full (indicated by the upper float switch going low), we know that a flush has begun. Typically a full flush will take around 5-10 seconds at most to empty the cistern into the bowl (at which point the lower float switch will go low). Our system waits for up to 15 seconds to see if a flush is a full flush. If during that time the lower of the two float switches does not go low, it knows that a partial flush occurred.

This flush is then added to the relevant counter – full or partial – and displayed. The system then waits for the cistern to fill up again, and when upper float switch goes high it re-arms the flush detector ready to detect the next flush.

Saving IO Pins with Simple Resistor Ladder and ADC

We are currently working on a project which has been updated to require the use of a 5 position rotary selector switch (knob). Each position of this switch corresponds to one mode of operation of the full device, and so we need our microcontroller to know which of the five possible positions the switch is in at any given time.

Unfortunately, due to the amount of inputs and outputs already connected to the microcontroller (PICAXE-18M2) used in this project, there is only one spare pin left – but it is an ADC pin (analog-to-digital converter) so all is not lost.

We decided to use something along the lines of a resistor ladder (Wikipedia link), but simplified to reduce the component count as the circuit board is already pretty full.

5 position rotary selector switch resistor ladder to one ADC pin

The image above shows the selector switch with +5V going into it up the blue wire, and then the wires corresponding to each position of the switch coming down the five green wires. When in position 3 for example, +5V is present on the third green wire, and the rest of the green wires are connected to nothing.

If we had lots of spare IO on the microcontroller we could just connect each of the five switch outputs directly to five individual microcontroller pins (not forgetting to add pull down resistors).  What we instead had to do is put together the following very simple circuit.

Resistor ladder for one ADC pin and rotary selector switchWhen the switch is in position one, +5V goes straight into the ADC pin on the microcontroller. When the switch is in position two, a voltage divider (Wikipedia) is formed with Vs = +5V, a 2k2 (2,200 Ohm) resistor as R1 and a 10k resistor as R2. Therefore the ADC pin will see Vo which is Vs * (R2/(R1+R2)) = 4.10 Volts. Switch position three sends 5V through a 3k3 10k voltage divider outputting 3.76V, position four through a 5k6 10k voltage divider outputting 3.21V, and position five through a 10k 10k voltage divider outputting 2.50V.

Using the 10-bit ADC pin on the 5.00V powered microcontroller, a numerical value from 0-1023 is assigned proportional to the voltage (0-5V) arriving on the pin. So, position one (analog 5V) is given the digital value 1023, position two (4.10V) is 839, position three (3.76V) is 769, position four (3.21V) is 657, and position five (2.5V) is 512.

These calculated ADC values will not be exact as the resistance of the resistors will change a little with temperature, the 5V regulator feeding the microcontroller may fluctuate a little etc – therefore, we actually use ranges instead of exact values to work out within software which switch position is selected – e.g. position three is 769, but as position two is 839 and position four is 657, we can say that the switch is in position three if the ADC value from the arriving voltage is in the range 714 to 803.

This is all relatively simple to set up in the software – we just added a short PIcaxe subroutine called whichMode which does the readadc10 command on the relevant pin and sets a variable modeValue to the mode value (1,2,3,4 or 5) to which the ADC value corresponds.

Project of the Day – Drifting Radio Buoy Timer

In addition to our user programmable REUK Super TImer and Super Timer 2 products we make a large number of other timers to order specific to the needs of individual projects.

drifting buoy timer

Today we put together a timer for a very interesting project – a drifting buoy designed to measure various metrics such as salinity, temperature, and location, and transmit them over a radio link at regular intervals as the buoy drifts on tides and currents in the sea. Our timer turns on the power to the buoy electronics for half an hour once every six hours so that it can collect and transmit data. The maximum total current draw to be switched by this timer is 2 Amps at 12VDC.

Although the timer will be fitted in an airtight container, we thought it better not to use a mechanical relay as high humidity and the marine environment is very corrosive and can cause relays to fail rapidly. Instead we made the whole timer solid state with a MOSFET used to switch the output current. We also made it nice and small and used very low power LEDs with high resistor values to minimise power consumption of the timer itself. All component values user were over-specced for greater reliability.

If you need any kind of timer, email neil@reuk.co.uk with full details of your requirements.

Project of the Day – Multiple PIR Sensors to Control Multiple Lights

Today we finished work on the controller pictured below which was produced to control lighting in a Halloween maze using motion sensors.

Halloween PIR motion detecting lighting controller

The maze will be in the dark, but with three passive infrared (PIR) motion sensors located through the maze and used to turn on three lights when motion is detected nearby – the first PIR sensor controls the first light, the second sensor the second light, and so on, independent of each other. When motion is detected by a sensor, the relevant light turns on for just 3 seconds, and then that light will not turn on again for at least another 30 seconds.

PIR motion sensor module

The PIR modules chosen for this project were KC7783R PIR Modules which are very small and easy to hide, and have very low power consumption. As the light bulbs themselves have yet to be chosen, we fitted three 10A rated relays to switch the power supply to each bulb.

Halloween PIR lighting controller circuit connections

The controller board is fitted with three small red LEDs, each one reflecting the output of one PIR sensor. Therefore the status of each sensor can be checked even during the 30 second delays that lights do not turn on after a recent motion detection.

This circuit design is based around an ATmega328 microcontroller as an Arduino standalone.

If you need any electronic controllers taking inputs from a motion sensor or sensors, send an email to neil@reuk.co.uk.

Project of the Day – Fold up Car Mirror Controller

Pictured below is a project we have completed for a retro-fit automatic folding car door mirror controller.

Automatic car door mirror controller

The car in question is a Japanese 4×4 with fold up mirrors and an after market OEM mirror switch fitted to raise and lower the mirrors when buttons are pressed in the vehicle. The goal of our controller is to automatically fold up the mirrors when the car is central locked, and to automatically fold down the mirrors when the car is central unlocked.

As things stood, when the ignition is on, if the fold up button is pressed, +12V is sent from the mirror switch to turn the two mirror motors in one direction, and if the fold down button is pressed, +12V is sent to turn the mirror motors in the other direction. Our controller sits between the mirror motors and the mirror switch and replicates this behaviour detecting the +12V signals and outputting the same to the mirrors for as long as a signal is present. But, when the ignition is off, there was no way to fold or unfold the mirrors.

When the car is central locked (ignition off) a +5V signal is present for one second on the wiring loom, and when it is unlocked another +5V signal is present. Our controller is designed to detect these signals, and if the ignition is off, to output +12V to turn the mirror motors in the required direction for a user programmable number of seconds immediately after detecting that the vehicle has been locked or unlocked. This gets the mirrors to automatically fold down ready for driving when the car is unlocked, and fold up out of harm’s way when the car is locked.

This controller was built around the ATmega328 microcontroller as a standalone Arduino project. Email neil@reuk.co.uk if you have an automotive electronics project of this type.

Project of the Day – High Voltage Connect

We have made hundreds of low voltage disconnects designed to protect batteries from being excessively discharged, but today we made a high voltage connect circuit. The requirement was for a device which will turn on a fridge when the battery voltage exceeds 12.2V and turn it off when the voltage falls below 11.8V, but with an LCD display and datalogging of the battery voltage.

In our blog post Low Voltage Disconnect with Display and Datalogger we gave details of how we put together an LVD with display and datalogger. In this case the powered device(s) are turned off when the voltage gets too low, and only turn back on when it gets above a certain level. A high voltage connect only differs in how it responds when initially powered.

high voltage connect modification of low voltage disconnect with datalogger and LVD displayOn start up, a high voltage connect circuit will only supply power to the output device(s) if the voltage is above the user set high voltage threshold; whereas a low voltage disconnect will only supply voltage to the output device(s) if the voltage is above the user set low voltage threshold. Other than that, both devices behave identically. A high voltage connect circuit is functionally identical to a dump load circuit.

low voltage disconnect with LCD and data logger

With this high voltage connect we incorporated an LCD display and datalogger. The datalogger stores the last 200 battery voltage readings – one every seven and a bit minutes so that the previous 24 hours of battery voltage are logged. The display shows the current battery voltage and state of the system together with the minimum, maximum, and average voltage measured over the previous 24 hours.

We will soon be adding programmable low voltage disconnect / high voltage connect circuits with displays and datalogging to the REUK Shop. In the meantime, if you need something similar to this email neil@reuk.co.uk with details of your exact requirements.

Project of the Day – Egg Incubator Day Countdown Timer

Pictured below is a project we completed for a day countdown timer for an egg incubator.
Egg incubator day countdown timer

It is important to keep track of the number of days that the eggs have been in the incubator waiting to hatch. When the user turns on the incubator and puts in the eggs, he uses the button on the timer to programme in the number of days that the eggs have until they are due to hatch. The timer then starts, and every day the day count display reduces by one until it eventually gets down to zero and the eggs hatch.

In order to build this we used a standalone Arduino set up. The external clock crystal gives pretty good time accuracy (used in conjunction with the Arduino millis() function). However, it is still essential to calibrate it to confirm it will be reliable over the 30 days or less that this incubator timer is likely to have to countdown.

In order to calibrate we temporarily programmed the timer to countdown hours (3,600,000 milliseconds) instead of days and left it running for 12 hours. Using an accurate stopwatch we timed how long it took the timer to run for its ’12 hours’ to compare it with the real 12 hours of the stopwatch. We then calculated by how much we needed to increase or decrease the number of milliseconds in the Arduino ‘hour’ so that its hour would match a real hour giving a very accurate timer. With this particular Arduino chip and clock crystal combination the Arduino lost less than a second in 12 hours even before the calibration.

Display on the egg incubator day countdown timer

To display the number of days until hatching we used two 7-segment LED displays which we multiplexed. Multiplexing takes advantage of persistence in the eye. If you light up one display quickly, then the other display, then the first again, and so on, the eye sees both displays on at the same time (as does a camera if the shutter speed is slower than the time taken to light up both displays – see above!). This technique makes it possible to control lots of LED displays without needing too many output pins on the microprocessor – just seven for the LED segments which are connected in parallel, and one for each display’s ground connection (if you use common cathode LED displays).

New Product – Rainwater Toilet Flush Pump Controller

This week we launched another new product – the REUK Rainwater Toilet Flush Pump Controller as pictured below.

REUK Rainwater Toilet Pump Flush Controller

We have been selling different rainwater toilet pump controllers now for seven years, so this new product pulls together all the experience and knowledge we have gained over all those years together with customer feedback from hundreds of users.

For simplicity, reliability, and cost, this device uses just one float switch mounted near the top of the header tank together with a mains powered pump with its own float switch protection.

Every thirty minutes the controller tests the status of the header tank float switch, and if the header tank is found to not be full then the pump is run until the header tank is full ready to gravity feed the toilet(s) in the home.

A button has been added to the controller to enable manual override of the thirty minute timer so that the pump can be force run until the header tank is full – particularly useful for system testing and topping up if required.

This device is not available yet in the REUK Shop. It is currently available for sale exclusively here for now: REUK Rainwater Toilet Pump Controller. We can also supply a suitable relay – ideally solid state, the float switch, and a 12V plug in power supply to complete full control system.

Contact neil@reuk.co.uk with details of your requirements for more information.