How can I make my motor run and stop ?

Hi ! I’m quite new to the arduino world. I just understand the basics.
Also, I’m french, sorry for my english.

I ask your help for my problem, I would like to make a vibrating table (more like a surface) with an arduino, an easydriver stepper and a simple motor.

Right now, my motor move perfectly, but I would like to make it move like this :
10sc : ON
45 sc : OFF

here is how I did this:

Can you help me with the firmware ?

Clement

Take a look into the "blink" and also "blink without delay" sketches you can find in the examples. All you have to do is connect the motor instead of a led and change the duration of the on and off phases.

lg, couka

couka:
Take a look into the "blink" and also "blink without delay" sketches you can find in the examples. All you have to do is connect the motor instead of a led and change the duration of the on and off phases.

lg, couka

Are you sure about that ? I thought of that earlier, but wherever I search for exemples, I never saw one time something as simple as this...
Always with something like the arduino motor shield or an easydriver stepper...

Well, that's the software part.
I don't know why you would use a stepper motor driver to drive a normal dc motor, but since you said that your motor moves perfectly, I assumed you already figured the hardware part out :slight_smile:

lg, couka

I just tried your solution, and it’s working just fine.
This is super cool and way simpler than my last solution…

Thanks a lot !!

Clement

Happy to hear that :slight_smile:

lg, couka

Are you driving a motor directly from the Arduino pin? This is not a good practice. Only the tiniest motors might work this way..

Edit: Nevermind I looked at the attachment.. you are using a driver it seems.. carry on..

I did something similar before and used the method @couka described. Except I had a large DC motor so I rigged up a MOSFET and 10K resistor to take the current. Worked like a charm. Those LED codes are quite useful for lots of things :slight_smile: