This is only a preview of the June 2016 issue of Silicon Chip. You can view 42 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Stereo Audio Level/VU Meter: Add Bling To HiFi System":
Items relevant to "Arduino-Based Cooling System Monitor":
Items relevant to "Hotel Safe Alarm For Travellers":
Items relevant to "Budget Senator 2-Way Loudspeaker System, Pt.2":
Purchase a printed copy of this issue for $10.00. |
The view at left shows the cooling
system monitor in operation while
the above photo shows the radiator
and cooling fan assembly that was
added to the stock laser cutter.
The air assist pump is behind the
radiator in the background, while
the water pump is in the water
reservoir out of picture to the left
(see photo on facing page).
By Nicholas Vinen
Arduino cooling system
monitor for a laser cutter
This unit is based on a small Arduino module and monitors the
cooling system in a large laser cutter. It monitors the speed of the
fans, the water flow and temperature and sounds an alarm in the
event of a malfunction, so the operator can take action before any
damage occurs. Although designed for a laser cutter, it would suit a
number of similar applications.
L
ASER CUTTERS are now available
at quite reasonable prices from
China but in line with their modest
prices, they do require quite a bit of
work to get them up and running, in
our experience. In our case, the supplied cooling system was quite rudimentary, consisting of nothing more
than an aquarium pump and a couple
of hoses. The instructions were to the
effect that the pump should be submerged in a large bucket of water and
arranged to deliver water to the laser
42 Silicon Chip
tube which would then flow back into
the bucket; not the engineered solution
we would expect.
Nor was the arrangement to exhaust
toxic fumes from the cutter well sorted out, as it came with a very noisy
centrifugal fan which actually leaked
fumes, while the large cutter housing itself had multiple air leaks, all of
which had to be sealed off. And there
were other problems with the assembly which required attention.
Fortunately, the laser cutter itself
actually works very well.
As for the rudimentary cooling system, a bucket of water obviously has a
limited capacity to absorb heat and as
the water gets hotter, the laser performance drops. So we decided to modify
the system to incorporate a metal radiator with fan-forced air cooling to keep
the laser tube operating at a reasonable
temperature long-term, especially in
the hotter months.
We selected a copper-cored radiator
designed for computer water cooling,
siliconchip.com.au
The water reservoir (clear container) and the radiator/fan assembly sit on a
platform at the bottom of the laser cutter. Together with the pump, they keep
the temperature of the water circulating through the laser tube to about 35°C.
teamed with three 120mm brushless
fans. However, we were concerned
that if the pump failed, or its power
cable somehow became disconnected
or a hose leaked, there would be no
obvious sign until the laser tube was
destroyed. So we decided to include
sensors to monitor the fans and coolant flow and provide a water temperature display.
Cooling system upgrades
The parts list shows the items we
used to upgrade the cooling system,
with the electronic parts listed separately. Besides the electronic components, pretty much every
thing was
purchased via the www.aliexpress.
com website. Some would no doubt
be available from plumbing supply
stores or specialist computer stores but
we liked the convenience of ordering
them all in the one place.
Most of these parts were used to
plumb the radiator, which has British Standard Pipe (BSP) G1/4” female
connection points, into the existing
laser cutter cooling system which used
8mm ID silicone tubing pushed onto
hose barbs.
The T-fitting was attached to the
inlet end of the radiator to allow the
G1/8” threaded temperature sensor
siliconchip.com.au
to be screwed in (via an adaptor), to
monitor the temperature of the water
coming from the laser tube. The G1/2”
flow sensor was connected to the radiator outlet via an elbow fitting and
G1/4” to G1/2” adaptor. A flow sensor
with G1/2” fittings was chosen as it
was thought that this would provide
less flow resistance than a G1/4” fitting flow sensor with much smaller
internal passages.
The electronics and fans run from
12V. The laser cutter has a 24V +
5V power supply, so we used the
MiniSwitcher (Simple 1.2-20V 1.5A
Switching Regulator, February 2012)
to efficiently convert 24V to 12V.
The photo below shows the Mini
Switcher board glued into the laser
cutter chassis with white silicone
sealant. One grey figure-8 lead brings
24V power from the laser cutter supply and another routes the 12V output
up through the chassis to the control
box on top.
Electronic module
The control box is based on a tiny
Arduino board (a “Pro Micro”). The
circuit is shown in Fig.1, along with
some of the plumbing details. Its job is
to control and monitor the fan speed
and also monitor the water flow. If the
speed of any fan or the water flow rate
drops below a predefined threshold
(80% of nominal), red LED3 lights and
a piezo transducer beeps.
The MiniSwitcher
power supply board
was glued onto a
shelf inside the
laser cutter chassis
using white silicone
sealant.
June 2016 43
The copper radiator, the three 120mm-diameter ball-bearing fans and the various brass plumbing accessories were all
purchased from www.aliexpress.com The fans are all controlled by an Arduino module in the Cooling System Monitor.
Warning yellow LED2 lights if the
fan speed or water flow rate drop below
90% of the nominal rates, indicating
a possible pending failure, blockage
or perhaps pinched off water tube.
Otherwise, if everything is OK, green
LED1 lights to indicate that it is operating normally.
The temperature display unit is
powered from a 12V output on the
control module (CON3) and sits on
top of it.
Circuit description
MOD1 is an Arduino “Pro Micro”
board based on the ATmega32U4. This
is very similar to the LeoStick module
from Freetronics that we reviewed in
July 2012, and is available from Jaycar.
The main difference is that the Leostick plugs into a USB port directly
while the Pro Micro is a little smaller
and has a MicroUSB socket instead.
The Pro Micro comes in 3.3V and 5V
versions; we used the 5V version. In
this application, the USB connection
is used only for initial programming
so we decided it would be better to
use the smaller Pro Micro.
The software could be adapted to
just about any Arduino board. Since
the LeoStick uses the same processor,
it would probably work without any
changes but we haven’t tried it.
MOD1 senses the position of fan
speed control pot VR1 which is connected across the micro’s 5V supply.
The voltage (0-5V) at its wiper is sensed
44 Silicon Chip
by the Arduino’s A6 ADC input at pin
7. Depending on the voltage sensed, it
produces a 50-100% duty cycle PWM
waveform at output D10 (pin 13) which
drives the gate of N-channel small signal Mosfet Q2.
When Q2’s gate is driven high, it
switches on and pulls Q1’s gate low. Q1
is a P-channel Mosfet so this switches
on in turn, allowing current to flow
from the 12V supply at CON1, through
reverse polarity protection diode D1,
polyswitch PTC1, Q1, inductor L1 and
to the fans.
PTC1 provides short-circuit protection; in the case of a short across the
fan supply, it will rapidly heat up and
its resistance then increases, limiting
the maximum current to around 1A.
When pin 13 of MOD1 goes low,
Q1 switches off and the two parallel
470Ω 0.5W resistors pull up Q1’s gate
to its source voltage, switching it off.
This cuts off the current supply for L1,
however its magnetic field is still initially charged and this causes current
to flow from ground, through Schottky
diode D2, inductor L1 and the fans. The
220µF output capacitor also provides
current to the fans for the period that
Q1 is off.
These two phases are repeated as the
PWM signal toggles and this forms a
basic buck regulator. What this means
is that the voltage across the fans varies smoothly as a function of the PWM
duty cycle from pin 13 of MOD1. With
VR1 at a minimum setting, the duty cy-
cle is 50% (and the frequency is around
50kHz), giving around 6V across the
fans, resulting in slow but steady operation. As VR1 is rotated clockwise,
the duty cycle rises to 100%, increasing the voltage at the fans to the full
supply, ie, around 11.4V.
Each fan has a Hall effect sensor with
an open-collector output and these are
wired back individually to inputs D19D21 (pins 18-20) of MOD1. MOD1 has
weak internal current sources enabled
for these pins to pull them up, so they
are held at 5V unless the fan sensor is
pulling them low. MOD1 uses an internal 1-second timer to count the number
of pulses per second on each of these
inputs, with software debouncing to
eliminate spikes that may be due to
electrical noise picked up by the wires.
Thus, it can sense the speed of each
fan and sound an alarm if any of them
drops too low. In this case, the duty
cycle from pin 13 is automatically increased to 100% so that if one fan (or the
wiring to it) fails, the others will run at
full speed to provide adequate radiator
cooling until the situation is rectified.
The same method is used to check
the output of the Hall effect sensor in
the water flow meter, which is connected to input D2 (pin 5). Note that all four
sensors are connected via 1kΩ series
resistors. These are not strictly necessary when interfacing to devices with
open-collector outputs but it protects
MOD1 in case of an accidental short
of one of the sensor wires to a higher
siliconchip.com.au
A
λ
A
λ
PB1
3x
220Ω
12
11
10
9
8
7
6
5
MOSI/D16
MISO/D14
SCLK/D15
A0/D18
A1/D19
A2/D20
A3/D21
RST
GND
3
GND
4
GND
23
D9/A9/PWM PWM/A10/D10
D8/A8
D7
D6/A7/PWM
D5/PWM
D4/A6
Vcc
MOD1
Pro Micro
(Arduino)
RAW
D3/SCL/PWM
D2/SDA
D0/RXI
D1/TXO
21
13
14
15
16
17
18
19
20
22
A
K
S1
SET NOMINAL STATE
3x
1k
D2
1N5819
Q2
2N7000
220 µF
16V
LASER CUTTER COOLING SYSTEM MONITOR
VR1
10k
1k
2
1
24
470Ω
A
CON3
+
+
LCD
TEMPERATURE
DISPLAY
MINI SWITCHER
SET FOR
12V OUTPUT
CON4
FAN CONNECTOR
12V DC OUTPUT
CON2
12V DC INPUT
L1
100 µH
220 µF
3A
16V
Q1
IRF9540
PTC1
RXEF110K
22Ω
K
D1
1N4004
–
+
K
+
–
HALL EFFECT
FLOW RATE
SENSOR
–
+
+
TO LASER CUTTER
24V POWER SUPPLY
–
D3-D5
3 × 1N4004
COPPER RADIATOR
+
Fig.1: complete circuit diagram for the cooling system monitor. It’s based around “Pro Micro” Arduino module MOD1 and
monitors the speed of three fans plus the water flow rate. Radiator input water temperature is displayed on an LCD while
fan speed is controlled with a simple switchmode circuit comprising Mosfet Q1, Schottky diode D2 and inductor L1.
SC
20 1 6
λ
CON1
GND
K LED1 K LED2 K LED3
A
+
SIGNAL
TO FLOW SENSOR
470Ω
θ
siliconchip.com.au
June 2016 45
θ
WATER
TEMPERATURE
SENSOR
CO 2
LASER
TUBE
COOLING WATER
RESERVOIR WITH
SUBMERGED
AQUARIUM PUMP
& FILTER
230VAC
MAINS
A
Below: all the parts, including the Arduino
module) were mounted on a small piece of
phenolic proto-typing board.
Above: this close-up view shows
the flow sensor. It’s connected to the
sensor circuit via a 3-wire cable (two
for the supply and one for signal).
voltage source (eg, 12V or 24V) or in
the case of static discharge.
The three status LEDs are driven
from outputs D5-D7 (pins 8-10) with
220Ω current-limiting resistors, setting the LED current at around 12mA
each. We used high-brightness LEDs
with diffused lenses and wide viewing angles so they are highly visible.
The piezo transducer is driven from
paralleled outputs D8 & D9 (pins 11 &
12) so that the micro can provide sufficient current for it. It’s pulsed with a
25% duty cycle at 2Hz whenever the
red LED is lit (ie, if any sensor indicates a rate less than 80% of nominal).
Nominal rates are set using pushbutton S1 which is accessible via a hole
in the front of the unit, with a small
screwdriver. Like the Hall effect sensor
inputs, D18 (pin 17) has a weak pull-up
current enabled so that the unit can detect when the button is pressed. When
this happens, the current readings for
all four sensors are stored in EEPROM,
as the nominal readings. The warning
and alarm levels are then based on
these readings. Since EEPROM is nonvolatile, they are retained even when
power is lost.
ed brass temperature sensor which
connects to an LCD panel, the pair
available for around $10, again from
AliExpress (see parts list). There are
various different-sized threads available and we asked for the “10mm” type
which is actually BSP G1/8” (nominal
outer thread diameter 9.728mm). Note
that BSP sizes indicate the diameter of
pipe a given thread is designed for, not
the thread diameter itself.
Happily, the two-conductor sensor
wire provided was long enough to
route it from the radiator input pipe,
through the laser cutter and up to the
control box. The only connection between the temperature monitor and
the control box itself is the 12V power.
As shown in the accompanying photos, the display shows the temperature
in degrees Celsius with a 0.1°C resolution, along with a digital “needle”
pointing to a temperature scale. It is
easy to read, although if your head is
above or below the eye-line of the display it looks a bit washed out.
a MicroUSB cable before MOD1 was
plugged into this board.
The accompanying photo shows the
basic layout of the parts on the board;
note that some of the smaller passive components (eg, resistors) were
mounted under MOD1 to save space.
Basically, we cut a piece of board 22 x
14 holes wide, soldered the two female
headers for MOD1 in place about one
third of the way across the board, then
proceeded to solder resistors with their
leads directly adjacent to the pins on
MOD1 to which they had to be connected. We then bridged the leads to
the pins using solder.
We then fitted the connectors to the
far end of the board and the switchmode regulator components in between, with the pushbutton, LEDs
and piezo at the opposite end, which
would become the front of the unit.
Where possible, component leads
were bent over and soldered directly
to the pad for the component they
connect to. Where this wasn’t possible, we ran point-to-point wiring on
the underside of the board, primarily
with Kynar (wire-wrap wire).
The board was then powered up,
programmed and tested.
Building it
All the components were fitted to a
piece of phenolic prototyping board
(with copper donuts, not tracks), with
a pair of female headers to connect to
MOD1 (which came with male headers). The program was loaded using
Temperature display
Rather than building a temperature
display, we used an automotive thread-
Custom case
We used the laser cutter to make a
Table 1: Resistor Colour Codes
o
o
o
o
o
No.
4
2
3
1
46 Silicon Chip
Value
1kΩ
470Ω 5%
220Ω
22Ω
4-Band Code (1%)
brown black red brown
yellow violet brown gold
red red brown brown
red red black brown
5-Band Code (1%)
brown black black brown brown
not applicable
red red black black brown
red red black gold brown
siliconchip.com.au
small custom case, with holes in the
front for the LEDs, access to S1 and to
allow the piezo transducer to be audible. There’s also a hole in the side for
VR1’s shaft and four small holes at the
rear for the power input lead, power
lead to the temperature display, fan
power/sensing cable and water-flow
meter cable.
The leads were fed through the holes
in the case and the case glued around
the board. If we ever need to get it out,
we will have to destroy the case but,
of course, as long as we keep the files,
we can always cut a new one.
Software
Because the software has a simple,
dedicated task, hardware counters and
interrupts are not used. Instead, Timer3
is set up to provide a 1-second timebase and the main loop debounces the
four frequency inputs at pins D2, D19,
D20 & D21 and then counts the number of pulses received at each input
per 1-second timer period. These are
compared to reference numbers stored
in EEPROM and the appropriate LED is
lit depending on whether any of these
are below 90% of the nominal value
(or 80% for the red LED).
If S1 is pressed, the counter values
from the last period are stored in those
EEPROM values as the future nominal values and the EEPROM is read
at power-on and loaded into RAM for
comparison.
Each time through the main loop,
the analogRead() function is used to
determine the voltage at analog input
pin A6 and hardware Timer1 is used
to produce a PWM signal at output
pin D10 which is proportional to this.
The software, being quite straightforward, is quite easy to read. For more
details, download the “sketch” and
examine the .ino file. We used two Arduino extension modules, “TimerOne”
and “TimerThree”, to make setting up
and using the hardware timers easier.
The Arduino sketch can be downloaded from the SILICON CHIP website
(free for subscribers). You’ll find it in
the June 2016 “Shop” section.
Installation, set-up & use
Once the radiator assembly had been
built and all the plumbing done, the
most difficult remaining task was routing the wiring under and through the
internals of the laser-cutter to emerge
near the control panel at upper right.
We used a variety of methods to string
siliconchip.com.au
The Cooling System Monitor sits on top of the laser cutter, just behind the control
panel. It’s connected to temperature and flow-rate sensors that are fitted to the
radiator and sounds a piezo transducer if a problem is detected.
Right: a side-on view
of the completed unit.
The cables run to the
water temperature
and flow sensors and
to the power supply.
The temperature
sensor display sits
on top of the monitor
case and is a standard
automotive unit (see
parts list).
the wires and keep them neat, including P-clamps attached to screws protruding from the bottom of the unit,
adhesive wire clips, cable ties, heatshrink tubing and even clamping the
wires with the various flip-down panels on the unit itself.
We ran a 5-way ribbon cable from
the fans to the control box for 12V fan
power and speed monitoring, plus a
3-wire ribbon cable for the water flow
sensor and a 2-wire lead for the temperature sensor. The only extra wiring
required was the aforementioned 12V
power supply wiring from the laser cutter internals to the control box.
To extend the short 3-way cable supplied with the flow sensor, we simply
soldered a 3-way ribbon cable onto
the end of a standard 3-pin header,
plugged this into the locking plug from
the sensor (which also has 2.54mm pin
June 2016 47
Parts List
Radiator & plumbing
Note: item codes are for AliExpress,
although some may no longer be valid
1 360x120mm U-flow copper
radiator with G1/4” inlet,
outlet and centre tap (item#
1956079016)
3 Sunon KD1212PTB3-6A 12V
1.9W double ball bearing 120mm
fans (item# 2022379891)
3 120mm fan vibration-damping
silicone gaskets (item#
32224342946)
3 120mm clip-on plastic fan grilles
(Rockby Electronics code 39067)
1 automotive temperature sensor
with LCD display, mounting
bracket and G1/8” threaded
sensor (item# 32450099507,
“10mm” sensor)
1 G1/4” end cap, to block centre
tap port in radiator (item#
32264189117 [pack of two])
1 G1/2” 1-30L/min Hall effect flow
sensor (item# 32605214366)
1 G1/2” female-female copper/
brass adaptor (item#
32345278486 [#3])
1 G1/4” male-female-female brass
tee fitting (item# 1902581471
[pack of three])
1 G1/4” male to G1/8” female brass
adaptor (item# 1926696115
[pack of five])
1 G1/4” male to G1/4” female
brass elbow adaptor (item#
1922705891)
1 G1/4” male to G1/2” female brass
adaptor (item# 1876999872
[pack of two])
spacing) and used a heatshrink tubing
sleeve to hold the assembly together.
Similarly, three polarised headers soldered onto a small piece of phenolic
prototyping board were used to connect the 5-way ribbon cable to the three
fan power speed-sense cables.
Having completed the wiring, all we
had to do was switch the laser cutter
on and press S1. Green LED1 lit up.
We then unplugged power to the water
pump and checked that red LED3 lit instead and that PB1 beeped constantly.
Plugging water pump power back in
silenced the alarm. Similarly, turning
down the fan speed triggers the alarm
(and automatically sets the fans to run
at maximum speed).
48 Silicon Chip
1 G1/4” male to 8mm hose
barb brass adaptor (item#
1924530597 [pack of two])
1 G1/2” male to 8mm hose
barb brass adaptor (item#
1924378817 [pack of two])
1 2m length 8mm ID 12mm OD
food grade silicone tubing (item#
32410550179)
8 M4 x 40mm machine screws
4 M4 x 45mm machine screws
12 M4 nuts
6 small L-shaped brackets (from
Bunnings)
1 electronics module (see below)
1 “Mini Switcher” step-down
module (see February 2012
issue; Jaycar KC5508, Altronics
K6340)
1 small piece protoboard
3 3-pin polarised headers
1 3-pin header
Miscellaneous
Teflon tape, various cable ties,
P-clamps, adhesive clips and
short lengths of heatshrink tubing
Electronics module
1 small protoboard (with copper
“donuts”)
1 set of laser-cut case pieces
1 small tube acrylic glue
1 200mm length thin double-sided
tape
1 5V Pro Micro-clone Arduino
module (MOD1; Ali Express
item# 32284746884)
1 10kΩ linear 9mm potentiometer
(VR1)
We decided to run the fans near
maximum speed, with potentiometer VR1 almost fully clockwise, as the
noise is drowned out by other components of the system and this provides
the best cooling.
To reduce fan speed, it’s necessary
to initially do so in stages, pressing
switch S1 as you go, to prevent the
alarm from triggering and forcing them
to maximum speed. Once the nominal
fan speed has been reduced, VR1 can
then be used to adjust the speed up and
down as you would expect, as long as
it is not set below the nominal level.
Conclusion
Fitting the new cooling system re-
1 3-way polarised pin header &
plug (CON1)
2 2-way mini terminal blocks
(CON2,CON3)
1 5-way right-angle polarised pin
header & plug (CON4)
1 mini 12V sealed piezo
transducer (PB1) (Jaycar
AB3459, Altronics S6105)
1 right-angle tactile pushbutton
(S1)
1 1.1A hold, 2.2A trip polyswitch
(PTC1) (eg, RXEF110K)
1 100µH 3A powdered-iron core
toroidal inductor (L1)
1 2m length rainbow cable
1 2m length light-duty figure-8
wire
2 12-pin female headers (for
MOD1)
Semiconductors
1 IRF9540 P-channel Mosfet (Q1)
1 2N7000 N-channel small signal
Mosfet (Q2)
1 5mm high-brightness diffused
green LED (LED1)
1 5mm high-brightness diffused
yellow LED (LED2)
1 5mm high-brightness diffused
red LED (LED3)
4 1N4004 1A diodes (D1, D3-D5)
1 1N5819 1A Schottky diode (D2)
Capacitors
2 220µF 16V low-ESR electrolytic
Resistors (0.25W 1% unless
specified)
4 1kΩ
2 470Ω 0.5W 5%
3 220Ω
1 22Ω
ally transformed the laser cutter. With
the original cooling system, we had to
wait for around an hour between cutting large panels to let the water cool
down and we got inconsistent results,
with cuts made later in each run not
necessarily going all the way through
the material. Now the laser cutter can
run continuously all day with barely
more than a 10°C rise in water temperature and with perfectly consistent cut depth.
Importantly, we now have peace of
mind since we will be immediately
alerted to any serious problem which
may occur with the laser cooling system and we can check the water temperature at a glance.
SC
siliconchip.com.au
|