Control circuits
The momentary electrical contact from the coin mechanism needs a circuit to start the machine working.
 I used to make relay circuits but I now use small industrial computers called PLCs.
 Here are the various options:


A simple coin operated machine can have a timer triggered by the coin mechanism. All electronics catalogues have delay timers, and some types have a ‘one shot’ option, which enables them to be triggered by a pulse. (in this case , the pulse from the coin falling through the coin mechanism). Pulse timers cost £20-30, from any electronics catalogue. Crouzet chronos2 multifunction timers are relatively good value. In the UK you can get them from RS (part no 331-0928 costs £22 but will only work with mains and 24 VDC. RS 331-0934 costs £33 will also work with 12 volts DC.


Holding relays

A simple relay latching or holding circuit can also be useful. In the basic circuit (left) switching A on momentarily will energise the relay, which will then stay energised until switch B is broken.

In the circuit below (which I used on my early machines), switch B is a cam switch on the output shaft of the geared motor. The momentary coin switch A will cause the motor to rotate one complete revolution and then stop.

Cam Sequencers

The geared motor rotates the cams slowly. Each cam has a microswitch pressing against it. Using one of the cam switches as B  with the circuit to the right, this will rotate one revolution every time a coin is inserted. As each cam can be individually adjusted,  lots of different elements can be made to switch on and off during the’cycle’. Unfortunately they are obsolete, but you can find them on ebay sometimes.

Intelligent Relays 
(also called Logic Controllers)

These are probably the simplest form of digital electronic control. Kits including software and connecting cable to a PC cost about  £150. Its not difficult to get a basic program running (you drag and drop elements like timers and logic gates into a block diagram on the screen).

I've used them for simple machines like postcard dispensers, though I wouldn’t recommend them for anything elaborate, because following the logic becomes difficult and editing is less easy than the initial programming.

Click here for a beginners guide I wrote when teaching a friend


Programmable Logic Controllers

These are my favourite controllers. I use the Mitsibushi FXS1 series, about £300 for 14 outputs, or £180 for 6 outputs. The advantages are that sensors and switches go in one side and relay contacts come out the other – there’s no soldering and everything is very robust and protected against voltage spikes and will work at high temperatures etc. The stepladder programming language is very versatile, and quick once you’ve got used to it. The drawback is that it does take time to get the hang of the programming – you definitely need the full printed manual to get far. I’ve been using them for 15 years so I can’t now quite remember how I learnt. There are free online ladder logic simulators which are a good way of trying it out.   
Second hand PLCs are available on ebay, though often at ridiculously inflated prices, aimed at industrial customers who need a replacement plc and want exactly the same model even if its obsolete. Reasonably priced ones still do come up though. 

PIC chips

Complete microprocessors on a chip cost as little as £1. Using them needs a bit more knowledge of electronics than cam timers, but they are now taught in schools. I’ve done a few simple projects with Picaxe ( programmed in basic) and Arduino (programmed in C++). 

Picaxe is the simplest and most commonly used system in schools. They even now sell a flowchart program that makes them almost like programming lego mindstorms. In the UK Rapidelectronics sell a good selection of Picaxe stuff, but if you can afford £40, you can buy a board complete with a chunk of prototyping breadboard which makes a beginner's prototyping of outputs much easier. The microcontroller chips themselves can only handle tiny currents, so to make motors and lights etc work, you need extra components - but all the details are easily accessible online. 


I love Arduino, its story is so romantic. A group of Italian engineers, laid off after Olivetti went bust, used to meet in a bar called the Arduino. They decided the world needed an open source microcontroller and its been a huge success. I find C++ less intuitive than basic, with lots of conventions I don't understand. However, its more versatile - it will easily spit out serial data which I find very useful for controlling cheap MP3 players and LCD displays. But the best thing is that because Arduino is open source, there's a huge fan base and lots of forums. So the code for almost anything you could want to do is posted online (see arduino/playground) and that if you get stuck you can post a question in one of their forums. My most recent question was answered within two minutes!  I went to a beginners weekend workshop in london which was brilliant. I didn't understand everything at the time, but it gave me the confidence to start trying things for myself, and I met people who understood C++ well who offered to help me with future projects. 

Raspberry Pie

In principle this should be great, because it can play sound and video as well as control lights and motors.
 If I was starting from scratch now I would certainly put some effort into mastering it.