This is only a preview of the April 2021 issue of Practical Electronics. You can view 0 of the 72 pages in the full issue. Articles in this series:
|
Last month we told you what it does and how it works.
Now we put it all together and start hatching chickens!
Part II – by
Tim Blythman
and
Nicholas Vinen
In our March issue, we introduced this versatile Arduino-controlled heating/
cooling device. It uses Peltiers to heat or chill water in one or more loops,
and it’s pretty easy (if a bit involved) to build. It can be used for many tasks,
including (but certainly not limited to!) brewing, making cheese and cooking
. . . and even hatching chooks! This article has all the instructions describing
how to build the two Arduino shields, program the Arduino, build the water
loops and tweak it to suit your needs.
J
ust to prove that this project
We’re sure readers will think of other some basic testing of the ‘water circuit’
has many possible uses, here’s uses... but enough of that; now it’s time without the control circuitry.
You can rig up the fans, pumps and
another one we thought of since to describe how to put it all together,
Peltier devices to run directly from a
last month: it could be used for an egg and get it up and running.
12V source to check that everything is
incubator, to keep bird or reptile eggs
working before proceeding.
warmed to a constant temperature so Construction
that they will hatch. That is often done We’re going to start by building the
with a heat lamp, but that’s wasteful two shields, as this is a prerequisite Peltier Driver shield
and doesn’t take into account varying to getting the whole thing up and run- The Peltier Driver shield uses a mix
ning. However, if you wish, you can do of surface-mount and through-hole
ambient conditions.
parts; its overlay diagram is
Chicken eggs are ideally
shown in Fig.7.
kept at 37.5°C until they
None of the surface-mounthatch, and most other bird
ed parts are too difficult to
and reptile eggs are reasonsolder; the smallest parts are
ably similar.
the 3216/1206-size capaciBy looping some water
tors, which as their name tells
tubing under the eggs (ideally
you, are relatively large at 3.2
made from a thermal conduc× 1.6mm.
tor like copper) and placing a
Tweezers, solder flux and
sensor among them, you can
solder braid (wick) will be
set up the Programable Therhandy – if not mandatory – for
mal Regulator to maintain this
working with these parts. Start
ideal temperature.
with those capacitors. They
It will only use as much
connect to some large copper
energy as needed to maintain
The I2C character LCD allows
areas, so may require a fair bit
that temperature, and on a
a number of parameters to be displayed.
of heat to solder correctly.
sweltering day (which can
Temperatures from all six sensors are available, as
Apply a small amount of
kill the embryos), it can actuwell as fan speeds, temperature setpoint, mode and
Peltier device drive level.
flux to their pads, then solder
ally provide a little cooling.
26
Practical Electronics | April | 2021
Practical Electronics | April | 2021
CON1
25A
CON2
12V INPUT
10 F
L1
15 H
10 F
F1
10 F SILICON
CHIP © 2020
10 F
GND
REG1
10 11 12
#
#
#
8
9
Q1
Q2
Q4
Q3
IRLB8314 IRLB8314 IRLB8314 IRLB8314 # = PWM
6
#
RX TX
1
2
3
4
#
0
IC1 HIP4082
1.8k
10k
10k
D1
D2
100nF
100nF
4148
100nF
4148
#
5
7
VIN
GND
5V 3V3 RST
13
A5 A4 A3 A2 A1 A0
one lead of the capacitors in place. If
it is square and flat, solder the other
lead, otherwise use tweezers and a
soldering iron to adjust the first lead
before continuing.
The other surface-mounting part is
the inductor. As well as connecting to
some large copper tracks, it also has a
fair amount of thermal mass itself; (if
you can) it’s time to turn up the iron
even higher!
Just as for the capacitors, apply flux
(be generous this time), then solder one
lead to the PCB. Once the component is
in the correct location, solder the other
lead. Now is a good time to clean up
the excess solder flux using a dedicated
flux cleaner or isopropyl alcohol.
Fit the fuse holder parts next, with
a fuse temporarily fitted. This ensures
that they are spaced and oriented correctly. The fuse can stay in place once
they are mounted.
The iron temperature can be reduced for the remaining parts. Continue by fitting diodes D1 and D2 with
the cathode stripes oriented as shown,
then mount the three resistors. If you
aren’t sure which is the 1.8kΩ type,
measure it with a DMM. Next, fit IC1,
ensuring its pin 1 dot/notch goes to
the left. We recommend you solder
this directly to the board, rather than
using a socket.
Now bend the leads of MOSFETs
Q1-Q4 to fit the pad pattern and attach
each one to the board using a machine
screw and nut before soldering and
trimming the leads. Make sure the
screw is tight before soldering, as tightening it after soldering could damage
the solder joints.
Follow with the through-hole capacitors, which are all the same type
and not polarised. But make sure you
push them fully down before soldering, as there will be another board
stacked above this one.
Similarly, push REG1 down as far as
you can before soldering it. As mentioned last month, depending on how
you will be applying power, you may
want to leave REG1 off or link it out
(with a wire between its left-most and
right-most pads). But in most cases, it
is safe to fit it anyway.
The photo top right shows our board
as fitted with a link in place of REG1.
The 5x2 header can be soldered now.
You can use two 5-way SIL headers
side-by-side.
Next, fit CON1 and CON2. Since
CON1 sits above the USB socket on the
Uno and CON2 above the DC socket,
make sure to trim their leads as short
as possible after soldering. These are
large-leaded parts sitting on copper
pours, so they might require the iron
temperature to be increased slightly.
Fig.7: this diagram and photo show where to fit the parts on the Peltier Driver
shield. There are five SMDs (four capacitors and one inductor), but they’re all
quite large. Flux paste will help you solder these; you will need a hot iron to
solder the inductor. REG1 is not needed if 12V is being supplied to CON2. In this
case, you can install a link across the lower two pads instead.
That just leaves the four stackable
headers. We recommend sandwiching
the shield between the Uno (underneath) and another shield (above), if
you have one. This will help to align
the pins. Tack the end pins of each
row in place and ensure that all four
of them are flat against the PCB at each
end. This can be fiddly as moving one
can tend to move the others.
Remove the Uno from below and
solder the remaining pins before going back and refreshing the end pins
of each row.
Jumpers
Insert the three jumpers/shorting
blocks, as shown in Fig.7. You
shouldn’t need to change these unless you are radically changing the
software for your own purposes. This
sets LK1 to use Arduino pin D10, LK2
to use D9, LK3 closed and LK4 open.
Building the Interface shield
Refer to Fig.8. Start with the resistors.
As mentioned earlier, it’s best to check
each batch with a DMM to verify their
value before fitting them. This is especially important as the 100Ω, 1kΩ and
10kΩ types have similar colour bands.
Follow with the three diodes, which
are all the same type, but ensure they
are oriented as shown in Fig.8.
Install the tactile pushbutton (S2)
next. Push it down until it clicks and
sits flat against the PCB.
There are only two capacitors, both
100nF MKT or ceramic types, one at
each end of the board near each IC.
Solder these next. Then mount IC1;
again, we don’t recommend that you
use a socket. Ensure that it is fitted
with its pin 1 towards CON11. Solder
two leads and check that the device
is flat; if not, re-heat one of the solder
joints and adjust it. Then solder the
remaining leads.
Next, install transistors Q1-Q3 and
temperature sensor IC2, all of which
are in TO-92 packages. Q3 is a different type from Q1 and Q2, so don’t get
them mixed up. Match the transistor
bodies with the silkscreen outlines.
You may need to crank their leads out
to fit the PCB pads.
Then fit terminal blocks CON10CON12 and all the polarised headers.
Only the orientation of the fan headers
is critical; make sure they are rotated
as shown in Fig.8 and also ensure that
the terminal blocks are mounted with
their wire entry holes towards the
nearest board edge.
Use a similar technique to the IC
when soldering these headers; solder
one pin to secure the part, then check
it is flat and square before soldering
the remaining pins.
Note that we’ve shown the I2C display header rotated relative to the fan
headers; this makes it harder to mix
them up as you will damage the display if you accidentally plug it into a
fan header and apply power. The twoway headers should all be mounted
facing the same way, so that it’s easier
to rearrange how the temperature sensors are plugged in later.
The three LEDs can be fitted next.
The red LED is closest to the edge of
the board, green in the middle with
the blue LED nearest the switch S1.
The cathodes of all three LEDs go
towards that switch. Depending on
how you are planning on using the
finished project, you may wish to attach these via flying leads or even fit
pin headers in their place and panelmount the LEDs.
27
k
PB1
D2 D1
+
4004
CON10
4004
CON11
P2
Q3
Q2
AREF
GND
13
11 12
1k
1k
1k
1k
1k
1k
100
10k
#
10
+
IC1 74HC4053
100nF
4.7k
4.7k
4.7k
1k
1k
5V
GND
VIN
12V 5V
IC2
TS5
1
#
9
#
8
#=PWM
7
6
#
5
#
4
#
3
2
1
Q1
TX
RESET
3V3
A5 A4 A3 A2 A1 A0
100
+
TS2
1
Fan 3
+
S1
F1
JP1
Fan 1 Fan 2
TS4
+
4004
+
TS3
+
LED1
1k
D3
IRX1
TS1
LED3
I2 C
GND
SDA
SCL
VCC
LED2
Power
100nF
P1
RST
CON12 +
S2
Interface shield. We used femalefemale jumper wires to test our prototype, but these were quite short.
The best option for a permanent
setup is to make up a cable with a
four-way polarised locking plug at
each end. See Fig.8 for the required
connections, and check the labels on
the LCD I2C adaptor board. As the pins
are in a different order (GND, SDA,
SCL, VCC on our board and GND, VCC,
SDA, SCL on the LCD), some of the
wires will have to cross over.
The connection at the Interface
shield is keyed while the header supplied with the LCD adaptor is not. You
might like to replace the header on the
LCD with a keyed type so a reversed
connection cannot be made.
0
RX
–
Fig.8: building the Interface shield is straightforward. We recommend that
you orient the polarised headers as shown here, but only the fan headers are
critical. S1, F1 and JP1 can be omitted if 12V will be supplied from the Peltier
Driver shield rather than via CON12. You can use stackable headers along the
edges, as shown here, or regular headers fitted on the underside.
A similar comment applies to IRD1;
this can also be fitted off-board, although if you’re doing that, you’d best
keep the leads short if it is to work reliably. Mount this now; if installing it on
the board, make sure its hemispherical
lens faces in the direction shown on
the PCB silkscreen. You can bend it to
face upwards, although you’ll have to
be careful to avoid interfering with the
nearby two-pin header.
The piezo buzzer PB1 sits near the
centre of the PCB. Check its polarity
before fitting it.
If you are planning to power the
finished assembly via the Peltier Driver
shield, you can leave off switch S1, fuse
F1 and jumper JP1. But it doesn’t hurt
to fit them anyway. If fitting them, try
to ensure they are all sitting flat against
the PCB. The switch and fuse holder
are quite chunky and may require more
heat than smaller components.
Completing the Interface shield
simply requires fitting the Arduino
headers. Standard male headers will
be sufficient for most cases, although
we fitted stackable headers to our
prototype ‘just in case’, as seen in the
photographs. Like the headers for the
Peltier Driver shield, you should use
other Arduino boards as jigs to ensure
the pins are flush and straight.
Assembling the stack
The shields are designed so that the
Peltier Driver shield fits between the
Arduino Uno at the bottom and the
Interface shield on top. The Interface
shield must be on top so you can access
its various vertical headers.
The simplest way to supply power
is to feed it in through the Peltier
28
Driver shield. It will feed modest
amounts of 12V power to the boards
above and below.
But note that if you are supplying
more than 15V to the Peltier Driver
shield, REG1 (which is quite small)
cannot provide much current to run
any pumps or fans connected to the
Peltier Interface shield. In this case,
it is better to omit REG1 and supply
12V directly to CON12 on the Interface shield.
The power supplied to CON12 on
the Interface shield will also power
IC1 on the Peltier Driver shield, but
this will not draw much.
When assembling the stack, you may
find some places where leads or pins
touch components on the board below.
Trim these if possible; otherwise, insulate with electrical tape. The USB
socket of the Uno should have tape
placed on its top to protect it from
the power connections on the Peltier
Driver shield.
If necessary, temporarily disassemble
the stack if you need to attach power
cables to the Peltier Driver shield.
Preparing the LCD screen
You can purchase the LCD from Jaycar
or simply use the type discussed in
the June 2018 PE article). Either way,
you will have to attach the I2C adaptor to the LCD. Line up respective pin
1s on the I2C adaptor module and the
LCD board and tack one pin in place.
Confirm that the two PCBs are parallel
but not touching before soldering the
remaining pins.
You will also need to make up a
lead to go between the I2C header on
the LCD and the I2C header on the
Starting to put it all together
At this stage, you need to decide on
the exact configuration required for
your application(s), if you have not
already. Most likely, you will want to
build something that looks like one of
Fig.3 to Fig.6 in last month’s article.
The water paths are critical. Ideally,
these should be as short as possible,
although if you wish to save on elbows,
the tubing can be run in gentle arcs
instead of at right-angles.
Remember that you have the option
of placing the water connections
at the same or opposite ends of the water
blocks. We did not test which method
would give better results; we suspect
the difference will be quite small.
Another point to consider when designing your system is that air from the
radiator or heatsink should not blow
onto other parts of the assembly, as this
will reduce its overall effectiveness.
In our case, we also ensured that
the two radiators (one existing on the
laser cutter and one on our new boost
circuit) blew air in different directions.
This can be achieved by placing them
next to each other, so that they pull
fresh air from the same direction and
exhaust in parallel.
Note also our comments last month
about insulation. For running a water
bath near ambient temperature for
cheesemaking or brewing, the demand
will not be too high on the Peltier devices, but sous-vide cooking around
60°C or higher will require decent
insulation to be able to reach the more
extreme temperature targets. If you
struggle to reach your temperature
target, improved insulation may help.
Peltier device mounting
Our kit came with some hardware
for mounting the water blocks to
either side of the Peltier devices. It
included several strap pieces which
are clamped by M4 machine screws.
Practical Electronics | April | 2021
The Interface shield sits on top of the stack as cables need to be plugged into its
vertical headers. So the height of the components on this board is not critical.
Note that the fuse holder is empty as 12V is supplied via VIN. So we could have
omitted S1, F1 and LK1.
Small springs ensure that a uniform
and not excessive amount of clamping
force is applied.
These straps are intended to clamp
two water blocks, one each side of a
row of Peltier devices. If you are using one water block and a heatsink,
see below.
Start by assembling the water blocks
and Peltier devices. This can be fiddly
as several things need to come together
at the same time and they will all have
a coating of thermal compound.
Clean the water blocks and Peltier
devices with isopropyl alcohol or
similar to remove any contamination
and residues. Allow it to dry.
Lay a row of straps on your workbench, with machine screws and
washers fitted through the holes; the
heads should face down. Rest one water block on top and apply a minimal
amount of thermal compound to one
side of each Peltier device, spreading it out.
The optimum amount of thermal
compound is as thin as possible, but
covering the entire area of the contacting surfaces.
Ensuring that the Peltier devices
are oriented the same way, press them
down onto the water block, sandwiching the thermal compound. If you have
(for example) all the red leads to the
left and all the black leads to the right,
they should be oriented correctly.
Spread thermal compound onto the
top of the Peltier devices, then rest
the second water block on top of this,
making sure that the barbed ends are
oriented as you require.
Place the remaining strap pieces in
place, followed by the springs, washers
Practical Electronics | April | 2021
and then nuts. Tighten the nuts until
the springs start to pull up.
Ensure that the Peltier devices are
square and evenly spaced; at the very
least, they should not protrude from
the water blocks. The nuts can then
be tightened down, ensuring that the
springs are not compressed to the
point that the coils are touching.
Using a heatsink instead
To test whether we could get away
without a radiator, we used a heatsink
much wider than the Peltier devices
(40mm). Therefore, we could not use
straps on both sides to pull the whole
assembly together. If you have a heatsink that’s 40mm wide, that may be
possible, but you’d probably have to
cut down a larger heatsink to get one
the right size.
We recommend you use a larger
heatsink anyway, as this will allow
larger fans to be used, giving more
effective heat transfer to the air.
Assuming your heatsink is significantly more than 40mm wide,
you will need to drill and tap holes
on the face of the heatsink to mount
the Peltier devices.
Lay out the Peltier devices and water block on the heatsink to determine
where the holes need to be and mark
them, lined up with the gaps between
the fins if possible (this will allow the
holes to be tapped through).
If you do not have a tap, and you
can line the holes up with the spaces
between the fins, instead of tapping
you could drill right through and use
long screws held in place by nuts fed
in between the heatsink fins. We know
from experience that this works but
doing it is very fiddly.
If you are tapping, drill holes to the
diameter specified for that tap. The
holes required are usually slightly
smaller than the tap size. Many taps
are supplied with appropriately sized
drill bits.
Having drilled the holes, carefully
tap them. Take your time with this
and reverse the tap if it jams; this is
usually enough to clear the swarf.
You need to use a lubricant to help as
well; we have used WD-40 or 3-in-1
oil with success, although kerosene is
also said to be ideal for aluminium.
Clean any residue off the heatsink
and sand down any high spots around
the tapped holes. Since the brackets
have a good amount of clearance from
the Peltier devices, it is not critical
that the site is perfectly flat.
We used a pair of Molex connectors (in this case, Jaycar Cat PP0744) to share
the current drawn from the ATX power supply. These connectors are rated at
around 10A each, so two are needed for our application.
29
The minimal hydraulic circuit
(corresponding to Fig.5 from part one)
uses a finned heatsink supplemented
by fans to remove heat from the Peltier
devices and water block. It’s the
same arrangement as used on many
amplifier and power supply circuits.
Clean the water blocks and Peltier
devices with isopropyl alcohol or
similar to remove any residues and
allow to dry.
Apply a very thin layer of thermal
compound to both sides of each Peltier device and place it on the heatsink in the correct location. It’s not a
problem to adjust them, but it can be
messy if the thermal compound gets
everywhere.
Ensure that the Peltier devices are
all facing the same way. As well as the
coloured leads, many have identifying
marks on one side only.
Rest the water block on top and then
rest the straps on it. For each hole,
first place the washer, then spring
and thread the machine screw into
the heatsink.
Once all have been started, check
that everything is where it should be
and then tighten the screws so that
the springs pull up, but the coils are
not touching.
For our tests, we mounted the
fans with cable ties around the entire assembly. Your heatsink may be
designed to have machine screws
threaded directly between the fins, in
which case this will work quite well.
Another option is to drill small
holes through the fins near their tips.
You can then thread cable ties through
these holes and the fan mounting
holes. In any case, ensure that the airflow from the fan is blowing towards
the heatsink.
Pumps
The input (suction) side of the submersible pumps we’ve specified must
be fully under the surface of the water,
as they are not self-priming. Using the
submersible type means that a hole
does not have to be cut in the side of
the water vessel, avoiding the possibility of leaks.
30
For our laser cutter application, we
placed the pump near the top of the
vessel; the intent here is that if there
is a leak in the Peltier cooling circuit,
only a small portion of the laser cooling water will be lost.
The pump could run dry, but that is
better than having the laser fail.
We managed this by cutting a hole in
the lid, which is a firm friction fit for
the hose. If the hose is loose, a couple
of cable ties can be used to limit vertical movement.
We found that if we placed the pump
too close to the surface, a vortex would
form, allowing air to be sucked in. The
solution is to lower the intake, which
will make a vortex less likely to form.
Since our pump was resting on the
laser’s pump in this vessel, we could
not lower the pump, so we attached
a small piece of hose and an elbow
facing downwards to lower the suction point.
Another option is to simply increase
the water level, if there is room to do
so. You might find that after starting
the pumps that the level drops due to
water being moved to the piping and
you may need to add water anyway.
As the water passes through devices
such as the water block and radiator, it
should enter at the bottom and leave
from the top.
This is to ensure that any water bubbles can rise up and out. Any voids
where air has collected internally will
not be contributing to heat transfer, so
these should be minimised.
The water path should return to the
initial vessel to complete the circuit.
We cut a second hole in the lid to fix
the return pipe in place. It can also
be locked in place with the judicious
use of cable ties (or silicone sealant).
Position the return slightly above the
water level. This will allow the return
flow to be seen while minimising the
amount of air entrained. Air is not a
good conductor of heat and air in the
water lines should be avoided.
If possible, position the return as
far as possible (on the vessel) from the
pump. This allows the water to mix freely and take on a uniform temperature.
With the water circuit complete, the
pump can be tested by connecting it to
a 12V supply. The return should be a
steady, continuous stream, indicating
that a good amount of flow is occurring.
Check for leaks and that there is no
air trapped in the pipes. Top up the
water if necessary. If there is no flow,
check the pump polarity and flow direction. The pumps we used are quiet
but audible.
With the pumps running, you could
also try powering the fans and Peltier
devices to see what kind of performance the system can achieve. Keep
in mind that without any controls, the
water can still get quite hot.
Once this is satisfactory, mount
everything in place so that it does not
move around. We found a spare shelf
panel on which to mount everything.
Thermistors
The 10kΩ thermistors we are using
came potted into a small ring lug for
mounting. They also had a reasonable length of cable attached, so all
we needed to do was terminate each
thermistor with a polarised plug to suit
the Interface shield.
The thermistors are not polarised,
so it doesn’t matter which wire goes
to which pin.
But if you are looking to place a
sensor in your brew liquid (as in our
diagram), we don’t suggest that you
use these.
Instead, you would use one which
is clad in food-grade stainless steel.
These are available, but cost a bit
more. You can mix and match thermistor types, as long as they all have
the same nominal value and similar
curves (check the specified beta value).
We weren’t sure whether the beads
we got were waterproof, so we shrank
a good length of heatshrink tubing on
those which were to be immersed in
water, extending past the thermistor.
We then firmly clamped the free
end in pliers, sealing it, although
injecting silicone into the open end
before clamping it would make a more
reliable seal.
Practical Electronics | April | 2021
Another option is to assemble these
from scratch, using leaded thermistors,
wire and socket headers.
Our software has been written to
work with either 10kΩ or 100kΩ thermistors; just be sure to check the code
before compiling to make sure that it’s
expecting the values that you’ve used.
We prefer 10kΩ types as these are
less likely to be affected by EMI or
other stray fields.
Mounting the thermistors
The small ring lug on the thermistors
we used made mounting them straightforward. Although we did not end up
using the heatsink option, a simple
tapped hole and machine screw would
be adequate to fasten the thermistors
to the heatsink.
For the radiators, an existing mounting screw was co-opted to thread
through the thermistor’s mounting
hole and thus fasten it.
As noted above, the thermistor used
in the circulating water must be thoroughly waterproofed. It should also
be mounted to prevent it from falling
in above the sealed part, if it is not
fully sealed.
If it does not need to be removed, a
pair of small holes in the side of the
container (above the waterline!) could
be used to thread a cable tie around
the thermistor lead.
Attaching the thermistors to the
water blocks (and thus near the
Peltier devices) was quite straightforward. We simply loosened one of
the mounting straps and slipped the
flat end of the thermistor under the
strap before tightening.
Power supply
To power our Thermal Regulator, we
used a spare ATX power supply, as designed for use in a personal computer.
This is an attractive option if you
have a surplus unit available. But if
you have to purchase one, they are
also relatively inexpensive, and can
be quite efficient.
An alternative is one of the many
open-frame power supplies that exist. Altronics M8692 is such a device.
You will need to do some mains wiring to use this unit; the mains wires
are exposed but protected behind a
barrier strip.
It is intended that this sort of supply
is installed inside an enclosure and
we think this is wise, whatever your
power supply, as it will help to keep
the water and electronics separate. If
the enclosure is metal, be sure to earth
it properly.
The 12V wiring needed for this
sort of supply is straightforward and
requires nothing more than a 30A
Practical Electronics | April | 2021
This close-up of
the Peltier Drive Shield
gives a better view of the jumper shunt
and also shows how all parts sit low to clear
the shield fitted above.
twin cable (ideally red/black) to be
terminated at each end.
ATX power supplies need a bit more
work on the 12V side but only require
an IEC type lead to be plugged in to
supply the mains.
There are usually multiple 12V (yellow) and GND (black) wires; you will
need to use several of each to ensure
that you can draw sufficient current.
ATX power supplies also have a
power signal that needs to be pulled
low to command the power supply to
start. This wire is usually coloured
green; we simply used a jumper to
short it to an adjacent ground wire.
See the photos which show how we
wired up our supply.
If you are sure you do not need
the power supply for use on a computer in the future, then several yellow
wires (12V positive) and black wires
(ground) can be bundled together
and spliced into a single pair of highcurrent conductors.
Whatever your source of power, connect it to the 12V input terminals on
the Peltier Driver shield. The positive
terminal is the one closest to the fuse.
Wiring it up
You may need to take the Arduino
stack apart to wire the Peltier devices to the Peltier Driver shield. The
orientation with which the Peltier
devices are connected will determine
the voltage polarity required for heating or cooling, but it is easy to change
the software if it is reversed, so don’t
worry about it too much. Just make
sure they are all connected with the
same polarity.
We used a small piece of terminal
strip to break out the connections; it
also allows us to run the short leads
on the Peltier devices further from the
Driver shield.
Fit the Uno below and the Peltier
Interface shield above. Plug in the
fans, I2C LCD and thermistors. See
Table 1 for which thermistor should be
plugged into which header. If necessary, the sensor mapping can also be
changed in software.
The pump(s) connect to the two
screw terminals near IC2. Check that
the polarity is correct as the pumps
will not work correctly if they are
spinning backwards.
If you have a separate 12V supply
for the Peltier Interface shield, connect
that now. Only a fairly small fuse is
needed (say, 3A) unless you have some
very large fans and pumps.
Control software
The software we have written is somewhat basic but provides most or all of
the necessary functions for a variety
of jobs. It measures the temperature of
all six sensors, but only uses the data
from three to make decisions. The
remaining temperatures are displayed
but not used by the control software.
You will need to install the Arduino
Integrated Development Environment
(IDE) to program the Uno board, and
this also contains everything you
need to customise the software, if you
choose to do so.
We used IDE version 1.8.5, and
suggest that you do the same to avoid
any problems which may occur due to
changes between versions.
31
This view shows our complete system which will be installed in our laser cutter. The plastic tray was in case of leaks.
As with many advanced Arduino
projects, some external libraries are
needed. They might seem complicated, but using them is easier than
having to write our own interface
functions. These are all included in
the download package, along with
the Arduino ‘sketch’ (program code)
itself. The package is available for
download from the April 2021 page
of the PE website.
The I2CLCD library is one we have
adapted from another open-source
library. We have added the ability to
auto-detect the I2C address of the LCD.
The easiest way to add this library
is to copy the ‘I2CLCD’ folder from the
.ZIP archive to your libraries folder (in
Windows, this is inside your Documents folder, within a subdirectory
called ‘Arduino’).
You might as well copy the remaining three supplied libraries too, as the
versions we have included are known
to work.
These three libraries can also be
installed by finding them by name
in the Library Manager. To do this,
search for ‘OneWire’, ‘DallasTemperature’ and ‘Irremote’ and install each
in turn. If you already have folders
with one of these names, you may
already have the library installed,
so you probably don’t want to overwrite it unless you find our sketch
doesn’t work.
If you install libraries by copying the
files, you may need to close and re-open
the Arduino IDE for it to detect them.
32
that’s successful, detach the USB cable
Preparing the sketch
We won’t go into too much detail of and replace the Uno in the board stack.
The display should spring to life,
the sketch operation here, as you can
showing an array of temperatures.
easily examine the source code.
It works by scanning the thermistors Nothing else should happen yet.
By default, the sketch accepts comonce per second, along with the fan’s
tachometer signals. At the same time, mands from a Jaycar XC3718 remote
any received infrared commands are control, or an Altronics A1012 uniprocessed. It selects a mode (heating, versal remote set to use TV code 089.
cooling or off) depending on the above, Other remote controls programmed
and then updates the fan, pump and with a Philips TV protocol may also
work fine.
Peltier control signals.
The sketch is well-documented with
inline comments, so these are a good Basic operation
place to start if you want to dissect and There are four basic modes: full heating, full cooling, proportional control
change the code.
We named the project sketch Pel- with a fixed target temperature, or
tier_Controller_V10, although this
may change if we update it.
For the programming
stage, you might like to
remove the Uno from the
board stack and connect it
(by itself) to the computer’s
USB port. This will avoid
any problems that might
occur with the fact that the
IR receiver signal is shared
with one of the pins thst is
used for programming.
If your Peltier ‘rig’ is not
near your computer, this can
also make your life easier.
Open the sketch file, select
Uno from the Tools→Board ATX power supplies require the green wire to be
menu and ensure that the pulled to 0V (any black wire) to turn on. We made
correct serial port is se- a simple jumper with a 2-pin header and some
lected. Upload the sketch heatshrink; the power supply now activates when
(CTRL+U), and assuming it receives 230V.
Practical Electronics | April | 2021
proportional control following a temperature profile that’s
defined in the sketch.
For the first two modes, the Peltiers are driven at full
pelt (hah!) with one polarity or the other. In each mode,
the LCD shows a variety of status information, as seen in
the accompanying photos.
In the last two modes, the unit tries to maintain the main
thermistor temperature (T1) at the desired value by heating
or cooling to varying degrees, as needed.
The following buttons on the remote control can be used
to control it:
• CH+ and CH- (on either type of remote) enable full heating
and full cooling respectively. A second press of either of
the same button turns the Thermal Regulator off.
• To program a setpoint for the third (fixed temperature)
mode, enter three digits on the numeric keypad; the
entered number is divided by ten to give the target temperature. For example, entering 1, 2, 3 will set the target
to 12.3°C. This can only be done while the unit is idle,
as it might otherwise cause it to change between heating
and cooling rapidly.
• Pressing the power button (on the Altronics remote) or
play (on the Jaycar remote) will start or stop operation
in setpoint mode. The setpoint can be tweaked in this
mode by using the volume up and down buttons. This
can be done while it’s operating as small changes are
OK in this case.
• The temperature profile mode is activated by pressing
the EQ button on the Jaycar remote or ‘-/--’ on the Altronics remote.
Instead of showing the fan speeds, the LCD indicates the
time, step number and next timed target. The unit steps
through the array of temperature/time points set in the
sketch, interpolating the temperature between each point.
This could be used to implement the timer-based sousvide cooker that we mentioned earlier, or a brewing or
cheesemaking profile determined by the exact product
you are trying to make. You can usually get an idea of
the profile you will need from a recipe, but some experimentation and tweaking may be required to obtain
the best result.
Troubleshooting
You can check whether your Peltier devices are wired
with the expected polarity by putting the unit in full
cooling mode and then checking that the main sensor
temperature (T1) goes down rather than up. If it goes
up, then comment out this line in the code by adding
‘//’ to the beginning:
Reproduced by arrangement with
SILICON CHIP magazine 2021.
www.siliconchip.com.au
In most of the modes, the temperature
and fans speeds are displayed. This
shows Heating mode, which drives the
Peltier devices at +100%; Cooling mode
uses –100%
Practical Electronics | April | 2021
Sensor
Location
TS1
Temperature to be regulated
TS2
On Peltier water block, TS1 loop
TS3
On Peltier water block, opposite loop from TS1 and TS2
TS4
On radiator/heatsink, same loop as TS3
TS5
Spare (currently unused)
Table 1 – thermistor connections
The connections we made on our prototype are shown
here; although only the first three are critical for the
software to be able to control the Peltier devices.
setBipolar((pDrive*PWM_TOP)/100); //scaled output
ie,
// setBipolar((pDrive*PWM_TOP)/100); //scaled output
and remove the ‘//’ from the start of this one:
// setBipolar(-(pDrive*PWM_TOP)/100); //scaled output,
ie,
setBipolar(-(pDrive*PWM_TOP)/100); //scaled output,
If the LCD doesn’t light up or displays nothing, check the red
LED is flashing rapidly. If so, the software did not detect the
I2C module, so it could not initialise and control the display.
Our sketch includes code to automatically detect the I2C
address of the display, so it should work if the LCD is connected correctly. Check your wiring and reset the Arduino
by pressing the RST button on the Peltier Interface shield.
If this does not fix the problem, there may be a problem
with your LCD module.
Now what?
We’ve presented a good number of options and uses this
circuit can be put to, but we don’t have the space to go into
detail on all the possibilities.
There are many ways that you could modify the code
to suit your application. For example, you could add a
DS3231-based real-time clock module to your Arduino
by connecting it to the I2C pins. That would allow you to
set up the code to automatically start and stop the unit at
preset times.
Or, you might want to modify the code so that you can
have multiple temperature profiles set up to suit different
processes, with a way to select between them (eg, pressing
different buttons on the remote control).
There are so many ways that this project can be used; we
would love to hear from our readers about the applications
they come up with for the Thermal Regulator!
In Set mode, the Peltier Controller
modulates the PWM to drive the T1
temperature (top left) towards the
setpoint (bottom left). In this case,
moderate cooling of 30% is needed.
In Profile mode, the setpoint is varied
according to a timed series of temperature
points with ramps in between. Instead
of fan speed, the time, step number and
ramp target are shown at right.
33
|