DC from PWM and Nano's pwm frequency relation.

Dear friends, rookie here again.

I want to use RxC circuit to get DC from PWM output of arduino nano.

I need this because my ebike works on dc signals to adjust throttle settings.

I have no osiloscope so no way to determine the exact results after finding correct resistor and capacitor values to convert PWM to DC. ( by using formulas or java applets)

Is PWM frequency important on calculating RC values? it seems so. If yes what should i do?

Thank you in advance.

I want to use RxC circuit to get DC from PWM output of arduino nano.

What is an RxC circuit? I assume from the context it is an RC low pass filter.

See here:- PWM

The higher the frequency the less you need to filter to get DC. That's why I used 3kHz when I wanted to do the same.

And keep in mind, the voltage you get out of the RC low pass filter can't be loaded. Aka, only a tiny current can be drawn from it. If the ebike controller draws more then follow it with a unity gain (rail to rail) opamp.

thanks for replies. this is not for controller. this is only to supply a signal voltage from throttle (arduino will do this). throttle has priority. as long as it sends signal to controller everything is fine. problem is it needs to supply DC.

is there a way to see final voltage? i have a cheap multimeter and it does not read anything.

Any multimeter should work, if set to a voltage scale. Maybe yours is defective. Does it read correctly for the Arduino 5V or 3.3V output pin?

dgncsk:
as long as it sends signal to controller everything is fine. problem is it needs to supply DC.

But if the input of the controller has a significant input impedance it will mess up the RC low pass.

if there is load on controller side, what should i do then? i need to supply preset voltages from arduino to throttle signal cable?

  • my multimeter can read 3.3 and 5 volts correctly. it can't read, lets say %40 dutycycle.

If there is a load exceeding the capacity for your filter to supply then you use a buffer amplifier in the form of a voltage follower.

Yes a DVM will not read a 40% duty cycle you need to smooth the signal first with a filter. Did you not read the link I gave you?