# Change to DC Motor control

**URL:** <https://forum.farmbot.org/t/change-to-dc-motor-control/1432>\
**Category:** Arduino\
**Created:** [February 22, 2017, 7:58pm UTC](https://forum.farmbot.org/t/change-to-dc-motor-control/1432 "2017-02-22T19:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nevel](https://forum.farmbot.org/user_avatar/forum.farmbot.org/nevel/32/664_2.png) [@Nevel](https://forum.farmbot.org/u/Nevel)\
**Post date:** [February 22, 2017, 7:58pm UTC](https://forum.farmbot.org/t/change-to-dc-motor-control/1432/1 "2017-02-22T19:58:15Z")

</div>

Dear Farmbot community

I just begun to work with your Arduino OS to configure it for my one Farmbot on the rooftop of our house.  
Due to a design change to DC Motors with encoders, I would like to change the control function of the step motor control. Unfortunately I realized, that the methods in your code exceed my knowledge in programming.  
Could you assist me how the control function of a step motor control can be changed to a PWM control signal?

Thank you very much for any support!

---

<div class="post-metadata">

**Author:** ![AgriFuture](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@AgriFuture](https://forum.farmbot.org/u/AgriFuture)\
**Post date:** [April 5, 2020, 7:12am UTC](https://forum.farmbot.org/t/change-to-dc-motor-control/1432/2 "2020-04-05T07:12:08Z")

</div>

Hi Nevel,

I’m also trying to use a pair of DC motors to replace stepper motors.  
I took a different approach, with reference to _juchen_ in this link: [https://www.robotshop.com/community/forum/t/very-low-cost-2a-dual-dc-motor-driver-with-cool-features/13183](https://www.robotshop.com/community/forum/t/very-low-cost-2a-dual-dc-motor-driver-with-cool-features/13183)  
Instead of changing the program, I connect two motors directly to the 4 pins.  
But the DC motor turns out to be continuously spinning, wondering if you would have some suggestions.

---

<div class="post-metadata">

**Author:** ![Nevel](https://forum.farmbot.org/user_avatar/forum.farmbot.org/nevel/32/664_2.png) [@Nevel](https://forum.farmbot.org/u/Nevel)\
**Post date:** [April 6, 2020, 10:16am UTC](https://forum.farmbot.org/t/change-to-dc-motor-control/1432/3 "2020-04-06T10:16:36Z")

</div>

Hey Agrifuture  
The implementation of a DC motor in my case was with a DC H-Bridge which was controlled by the pulse signal of the steps pin. This setup could run the dc motors with enough current (more than 2a).The implementation with a conventional stepper driver is intresting but I think it works only with small dc motors due to the low current.  
Due to the problem of controlling the dc motors properly without modification in the code, i changed the setup to smal Nema 14 stepper motors. Actually I would recommend to do so as well and use the drivers from trinamic. Those have a great performance and you can’t hear any noise… I use the TMC 2208. Were are you from?

BR

nevel
