 # Creating a Pulsed DC Voltage for a DC Motor

Hey together,

I am new to Arduino and also I am a super Beginner in Electronics so I am not sure whether the concept I have in my head can be achieved with an Arduino:

For my university project, I want to send a controllable pulsed (sinusoidal) DC Voltage to a 12V Motor (0.5A). I thought about using an Arduino to create a sPWM and send this signal to a Mosfet which then switches and applies this sinus waveform to the 12V supply of the Motor.
Very important: I want the Motor to rotate faster and slower in the same direction. NOT change direction.

I would want to be able to control the frequency, amplitude and mean value of the sinus Voltage.
Also the setup would run pretty long (around 1 week).

Does this make sense? Is there a better alternative than Arduino?

Thanks!

Dropp sinus. PWM is switching on-off. The pulse duty cycle is the controlling piece. Running a motor in one direction only You can use a logic N-channel MOSFET that switches the motor minus to ground. Use a serial resistor of some 200 Ohm between controller output and the gate. Apply some 10 kOhm from gate to ground.

Dropp sinus. PWM is switching on-off. The pulse duty cycle is the controlling piece. Running a motor in one direction only You can use a logic N-channel MOSFET that switches the motor minus to ground. Use a serial resistor of some 200 Ohm between controller output and the gate. Apply some 10 kOhm from gate to ground.

Thanks for the response.

Unfortunately, the sinus is one of the main requirements... Any idea how I can implement this (doesn't need to be with an arduino)

Why sinus to a DC motor? What would that sinus look like? How would Your sinus controll the speed of the motor? What's the theory?

Sinus means AC to me and that would lock the motor and make it hot.

Why sinus to a DC motor? What would that sinus look like? How would Your sinus controll the speed of the motor? What's the theory?

Sinus means AC to me and that would lock the motor and make it hot.

Ah sorry should have explained it better.
The goal is to accelerate & decelerate the motor in a sinusoidal way. The motor gradually speeds up and slows down, but the coils are always spinning in the same direction and voltage is always above 0. When you would map the motor speed it should look like a sinus wave. Basically you are taking a constant voltage value of for example 8V and slapping a sinus waveform onto it so that the voltage varies between 6V and 10V periodically in a specific frequency.

I hope this made it clear

Okey, now I understand.
PWM is controlled from 0 to 255. Incorporatte math that uses the sine function in IDE. Then map that value into an integer within the range of 0 to 255.

Search for Arduino reference! That is a very useful manual. Look at "sin", "map" etc.

Motor may not start at low PWM values (10, 20, 30), you will need to find the lowest PWM value that will reliably start the motor and work from that to 255. Search: "Arduino PWM sine".

Are we just going to increase the speed from ZERO to Full-speed and back to zero?

If so this is just a couple of simple for-loop iterations.. I even thought there was an example that did this?
If you open you Arduino IDE, click "file." In the drop-down menu, click on "Examples," then click "Controls," then "ForLoopItterations."

This example shows how to light 8 LEDS. It starts with none lit, then lights them ones at a time until all 8 are lit, then extinguishes them one at a time until all are off.. then the loop restarts

This could easily be adapted to "PWM values" to control motor speed in a "sin-wave" pattern.

johnnycatt:
Are we just going to increase the speed from ZERO to Full-speed and back to zero?

No, you should be able to determine the mean value around which the sine will oscillate with a specific amplitude. It would not go form 0 to 255 and back but more like from 85 to 125

I’m running a 12 volt FC motor that stsrts moving at PWM 7. Make some tests and find out about the motor You’ve got.

I'm running a 12 volt DC motor that stsrts moving at PWM 7. Make some tests and find out about the motor You've got.