tommyhp2
Posts: 1
Joined: Fri Feb 21, 2020 4:56 pm

PI to control device at random voltage for random duration

Fri Feb 21, 2020 5:06 pm

Hello everyone,

I'd like to use the pi to control a device at random voltage from 0.1 to 48 volt at 0.1 precision. Power to be provided by external power source. The pi will turn on the device and remain on for random duration and then turn off for random duration (off) also. Coding wise, I don't think it's an issue. I imagine a small circuit to control the voltage from the power source and the duration on/off.

Does anyone know any documentations or any suggestions on how I can achieve this? The pi is used as a controller and not a power source for the target device.

Thanks,
Tommy

IanS
Posts: 248
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: PI to control device at random voltage for random duration

Mon Feb 24, 2020 1:51 pm

Look into how electronic speed controllers work for motors. They are basically a MOSFET switched on and off very quickly (typically around 2000Hz) using pulse width modulation. There may be a bit of smoothing (e.g. a capacitor) on the output and a flyback diode to protect against reverse voltage spikes, but that is about it. You might be able to find a commercial ESC which meets your power needs, or you might need to build one using a MOSFET picked on your specifications.

Return to “Other projects”