Author Options:

How to program a small electric motor? Answered

I want to start a small simple vending machine project, yet its not clear to me how can i program a small motor to respond in a certain way when the relevant events are triggered, i mean what are the hardware necessary for me to be able to comunicate with the actuator (the motor), and which type of motors are best suitable for such projects? Thnx!



19 days ago

Motors react to current flowing thru them.
Voltage needed for the necessary current and powertype (AC/DC) depending on your motor.
WAY too low information content has been given for a better answer...


Reply 19 days ago

Thank you for your respond.
Actually i have a mechanical engineering background, fairly good. But how to deal with electronics and specially what knowledge needed to manipulate the dynamics of an e motor(either ac or dc), it just i couldn't find the right path to figure out what exactly needed! One thing i know ther is a programm that need to be writen and then uploaded to a hardware and this hardware send the right pulses to the actuator to perform the dynamic written in the program. If i was correct, then what is the program language, and how to upload the program to the corresponding hardware (PLC i think!) And what kind of connections needed to comunicate with motor?


Reply 17 days ago

Only one example possible:
An Arduino is programmed in C-Language. You send out PWM-Pulses and amplify them in a MOSFET-Circuit. H-Bridge configuration preferabely if you use a DC Motor. Supplyvoltage of Motor and current of motor according the specs of the motor.
Read up on
- Arduino
- C Programming language
- H-Bridge schematic


Best Answer 19 days ago

Probably going to need a DC drive, micro PLC controller, some relays and pushbuttons. understanding ladder logic is a plus.