Controlling a vending machine with an Arduino

Thread Starter

Sandahl

Joined Jun 6, 2016
11
Hey guys.
I am currently rebuilding an vending machine in order to control it with an Arduino.
The vending machine i am using is the FAS Spirali, similar to the one below.

It is a spiral style vending machine controlled by a series of dc motor connected to spirals for dispensing. The motor are similar to these: http://www.amazon.com/Molon-CJM-2407-122X-Gear-Motor-Volt/dp/B00WO6M2EA. However they also include what i assume is a sensor for controlling the rotation. I have attached a picture of the motor including a small circuit board and the aforementioned sensor. The only wires running to the DC motor are power and ground.
My question is can any of you tell me how to control these, and what role does the small rotation sensor play?

N.B I have included the full schematic.
 

Attachments

mcgyvr

Joined Oct 15, 2009
5,394
Just need to read the switch on an input and apply power to the motor as needed..
You start the motor.. the switch will then be depressed and you stop the motor as soon as the switch is not depressed anymore..
 

Thread Starter

Sandahl

Joined Jun 6, 2016
11
Could D2 or D1 be reversed?
If D1/D2 would be reversed, I could see power it until the current drops. The 680 ohm resistor just reduces noise.
Your right D2 is reversed. But the motor i powered regardless of the switch state.

The link you included is for a circular connector not a motor.
 
Here's https://des.az.gov/sites/default/files/media/national_780_cold_food_operators_manual.pdf a similar machine. No schematics. More wires on the motor.

In your case, I would sort of, expect one good motor controller that keeps an eye on current and dynamically brakes the motor when the current stops briefly. It would keep track of the time it takes to rotate for jamming purposes.

It would use a matrix or linear switching scheme to select the motor.

In the schematic you posted, in one case the motor would drive and in the other, the leads would short which, I think would be bad for the switch. That's why I think one of the diodes is reversed.

The 680 resistor or maybe smaller, would provide some braking and some noise suppression.
 
First, take a suitable resistor and look at the voltage across it with a scope to see if the assumption is correct.
The 680 ohm resistor can also be used to determine if a motor is present in the position. e.g. attempt to move (timeout) and test for current from 680 ohms.

Then look here https://www.pololu.com/category/11/brushed-dc-motor-drivers for some ideas.

There are some high side IC's used for current monitoring which is also an option especially if you don't have to brake.

This https://www.canakit.com/dual-motor-l298-h-bridge-control-ck1122-uk1122.html is a motor driver on the cheaper side that has resistors for current monitoring.

The better motor drivers will allow fwd, rev, brake and coast.

DC motors tend to overrun, so if you operate them into a load or a short, the DC motor now coasting and operating as a DC generator stops faster. I think the 680 ohm resistor just makes it stop faster.

Here's a blurb on high side current sensing: http://www.analog.com/library/analogDialogue/archives/44-12/high_side.html
 

Thread Starter

Sandahl

Joined Jun 6, 2016
11
First, take a suitable resistor and look at the voltage across it with a scope to see if the assumption is correct.
The 680 ohm resistor can also be used to determine if a motor is present in the position. e.g. attempt to move (timeout) and test for current from 680 ohms.

Then look here https://www.pololu.com/category/11/brushed-dc-motor-drivers for some ideas.

There are some high side IC's used for current monitoring which is also an option especially if you don't have to brake.

This https://www.canakit.com/dual-motor-l298-h-bridge-control-ck1122-uk1122.html is a motor driver on the cheaper side that has resistors for current monitoring.

The better motor drivers will allow fwd, rev, brake and coast.

DC motors tend to overrun, so if you operate them into a load or a short, the DC motor now coasting and operating as a DC generator stops faster. I think the 680 ohm resistor just makes it stop faster.

Here's a blurb on high side current sensing: http://www.analog.com/library/analogDialogue/archives/44-12/high_side.html
Thanks a bunch!
I will order the components and update when i get the solution implemented!
 
Cool.

In the long run, you may be able to combine high and low side drivers in a matrix with one high side current sense. The high side drivers could be relays or specific high side driver chips. The low side drivers could be specific low side driver chips, MOSFETs or Ultra-reliable transistors (e.g. LM395).

Relay selection would have to be done carefully. Matrix based on expense. There are usually more columns than rows. Don't forget that some vending machines have the possibility to have double slots. e.g. Potato chips an candy bars. I haven't seen gum in a vending machine for quite a while. They used to have separate compartments.
 

Thread Starter

Sandahl

Joined Jun 6, 2016
11
Update:
It worked! Each flick of the switch generates a drop in current i was able to measure using the INA219 Current sensor from adafruit.
The rest should be somewhat straight forward i just wanted to update the thread in case someone needs the information for later reference.
 
Top