Relay Power Control

I could control the mains using a Triac and will probably try an experiment with that later. But using only components that I understand means a relay. So, following the excellent description on SparkFun you end up with a simple circuit with a NPN transistor that switches on the coil of a relay. The description on the SparkFun page also includes a LED so you can see when the relay is closed. I left that in on my copy.

The other feature to note is the diode that faces the wrong way across the coil of the relay. You’ll see this on a lot of designs. When the current across the coil is turned off the magnetic field collapses a very short time later and the switch springs back to the normally closed position. However as the magnetic field collapses the changing field causes a potential to be generated in the coil, in the opposite direction to the driving current. The diode ensures that this potential is harmlessly shorted out rather than frying the micro-controller.

So the schematic, copied from the SparkFun design is below.

Which can be nicely made into a little singe sided board like the one below.

I used one of the PCB track width calculators online and asked what width was required for 10 Amps. The answer 3.6mm so that’s what size the tracks are on the right. Another design feature is that the board has a low voltage side and a high voltage side. This is, after all, the whole point of using a relay and will be a feature of all the boards involving high voltage in this or any other project.

The coil seems to use about 135mW but only drawing a handful of milli-watts from the signal pin. Below is a (slightly moody) photo of the finished board.

This entry was posted in electronics, mains control, project. Bookmark the permalink.

Comments are closed.