HackSpace_-_April_2020

(Frankie) #1
FORGE

crossed wires or short circuits, and then close the
IP55 boxes, and screw them shut. Connect the
power, wait a few seconds, and then try to access the
temperature-control+ over the internet. If everything
has gone well, you should now be able to control the
temperature of your workspace with a neat, reactive
dial that responds to internet instructions!

GETTING ONLINE


This project uses the ESP8266 web server module
to turn your NodeMCU into a tiny web server. This is
a very powerful module that lets you set up a REST
server with minimum code. It makes the NodeMCU
a great, low-cost way of adding web functionality to
existing hardware. It also makes it easy for someone to
maliciously access your existing hardware if you don’t
have effective network security in place. The code for
this project does limit the maximum temperature that a
user can set remotely, but it doesn’t include important
security features like password protection. You should
consider adding more security features if you intend to
use the heater project on your own network.

web interface, and then refit the dial so that it points
to the appropriate position. Most solid state relays
have a visible LED in them, so you can tell whether
they are turned on or off without having to connect
them to a mains device.


RULE 0: DO NOT BE ON FIRE
With everything connected, double-check the mains
portions of the wiring to make sure there are no


Main Live

Main Neutral

Main Earth

NodeMCU Vin

AC

-Vo

+Vo

AC

NodeMCU GND

HLK-PM1

U1

5 V 2 A PSU


NodeMCU GND

Heater Earth

Heater Neutral

Heater Live

NodeMCU pin D5

Left
You need to supply
mains voltage to
the input of the 5 V
power supply with
an appropriate fuse
and an earth. The
solid state relay is
an electronic switch
used to turn the
heater on or off,
and it should be
connected in line
on the live (brown
in the UK) wire,
between the heater
and the plug socket.
The neutral (blue in
the UK) and ground
(yellow/green in the
UK) pass straight
through to the heater

Left
You don't always
need a circuit board,
as components can
be joined with a bit of
simple wiring

If your heater has a
built-in (inaccurate)
thermostat, you
don’t usually need to
modify the heater to
bypass it. Just turn it
up to maximum, and
it should stay on.

QUICK TIP

Free download pdf