I built the controller for this vending machine using a Motorola HC705J1A microcontroller. It is the first microcontroller I ever used. There are a few things that I don’t like about the Motorola chips:

 

·        the cost of their development kits

·        OTP chips (seems I always want or have to change the code)

·        each development kit supports only a single chip

 

There are some things I did like, to be fair.

         

·        they are easy to program (I like their assembly mnemonics)

·        they have easy to use timers

·        they are easy to obtain

 

Vending Machine with HO scale model train

 

I know it’s hard to see in this image, but there is a model train set up inside this vending machine. When the machine vends a product to the customer the train is activated. It travels two (2) circuits for each coin deposited. The product vended is in a small plastic capsule or “egg”. Using current detection the controller is able to locate the train on the track and activate the level crossing indicators, or block occupancy indicators when it passes either the level crossing or the tunnel. The controller also flashes various other warning lights in the model. The train’s speed is controlled via PWM (Pulse Width Modulation) derived from software. This allows for very good low speed response from the train.

 

I am going to port the code for this project to my Atmel board. Even with 2 (two) controllers on the board, it will be less expensive that the Motorola J1A, and it will have the benefits of in system programmability and on chip EEPROM. I will use the EEPROM to store information such as train speed and the number of circuits (laps) to run when a product is sold.

 

BACK