Hi all, would it be possible to interface this: http://www.nbglin.com/motor.htm
with an arduino? I'm thinking pulsing the cp, dir, inc and dec pins on the left will do it? I've had a look at the datasheet for the L298N IC they use, unfortunately my electronic skills fail me, I think I need to know how many ma it takes to trigger each pin and the pulse length?
Looking at the sheet it should be doable if the power (5v) used by the board does not exceed the power available on the arduino. Else you need another 5V and connect the grounds of the arduino and the board (GND at 5V side)
There seems to be 3 options:
-
use the DIR + CP route.
DIR will determine direction (5V is backward)
each pulse provided to CP will move the motor a small step, therefore increasing pulse speed will increase moter speed etc -
use the INC, DEC and FUN (with JP2 on)
pulse on INC will move the motor forward (clockwise)
pulse on DEC will move the motor backward (counterclockwise)
pulse on FUN will stop the motor -
use the INC, DEC and FUN (with JP2 removed)
sending a pulse to INC will increase the speed.
sending a pulse to DEC will decrease the speed.
sending a pulse to FUN will memorize the speed, so that the motor will start at this speed after powerdown.
It looks to me like INC, DEC and FUN are just parallel links to the buttons, sending them a 5V pulse will mimic the push of a button.
How long the minimal pulse length should be is unclear, experimentation should give you the answer here
Cheers,
Hans
Hi Hans, thanks for the reply, I believe that the motor will be a stepper motor, so it will draw way more current than the arduino can supply, so the 'board' will be externally powered. I expect to use the arduino purely to trigger things.
It will depend on the final use of the stepper motor (absolute positioning or relative) as to which would be the best method, this will be down to the user of the board and our project but looking at our current code method 1 would be best.
One last question for the moment, would it be possible to use this board as a plain DC motor driver?
Our project is modular and will allow the control of 3 different types of motor, stepper, servo and DC, we already have code for a stepper motor using the stepper library, we want to make our code as accessible as possible, one of our users has one of these boards, if it will control DC motors as well it would be useful.
Regards,
Reggie.
Reggie,
from what I understood from the description the control part needed 5V while the motors need 40V. However if you already have the board working without 5V supplied to the control part then who am I to judge
Regarding the DC motor, I am no expert in driving motors but the datasheet of the L298N says it can be used to drive DC motors as well.
Cheers,
Hans
sorry Hans, yes of course, I expected the motor itself to be externally powered rather than the logic.