Drive dc motor

Hi every body

i want to drive dc motor using class d chopper , so i need the dc motor some times work as motor to lift up the load , and when it reach the top stop some seconds and then, work as generator and the load came down again …

So when we want the dc motor operate as motor or generator using class d chopper (it use two switches and two diode) to control the voltage across each switch using arduino ,

this is first time for me to using arduino can any one helps me in this code ?

thanks alot

chopper class d.jpg

You can pay someone to write the code for you , or start learning to code yourself .

Much easier to get an H-bridge driver (4-quadrant, not 2), they are readily available.

Sounds like you'll need position control to hold-position under load.

Note that if lots of power comes back in generation mode the supply needs to be
able to handle that back-feeding (rechargable batteries can do this, most other
supplies cannot and simply over-voltage and the result is destruction of driver or
supply)

Commercial motor drivers typically have a big resistor and a special extra switch-mode
circuit to route back-fed energy into the resistor to prevent the voltage rail rising.