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.