Close

1.1 Testing the Relays, Motor & Switches

A project log for Obtain.Today

API drive vending machine.

matthew-potterMatthew Potter 07/08/2014 at 05:170 Comments

Controlling a single relay switch with an Arduino. I only had 1 of the shelves at the time so I was trying to figure out how the individual motors worked.

The existing platform was interestingly done. All the power and ground lines were run in columns and rows in order to use as few outputs as possible. I completely understand that but what through me off was that the switches that notified the board that the motor had completed a rotation were all connected directly to the power and ground. The resistance of the motor power would be the method that the control board would turn it off.

Since I am re-wiring everything, I decided to use a bit more stable method, especially considering my knowledge (or lack there of) of electronics and power. I decided to use a common ground for everything and send individual power to each motor respectively. I am also going to run a common ground to the switches and a common feedback pull-up on the Arduino. Since there will only ever be one motor running at a given time, that common feedback pin will be the same throughout.

Discussions