Posted: 07:02pm 15 Jun 2025
Copy link to clipboard |
Volhout Guru

|
|
|
Hi Nimue, Sorry for my late reply. To drive your LED during the tests, I suggest you use a pico PWM output. When you run the PWM at 1kHz (at 63MHz PWM time frequency) you get near 16 bit resolution. 16 bit PWM resolution is more that you would achieve in an R-2R ladder network due to tolerances in resistors in the R-2R network, and it is far simpler. Since the PWM has the amplitude of 0 to VCC (around 3V3 on a pico) you need to amplify the 3.3V PWM signal to get your desired 4.4V highest level. You are suggesting to match the 0-3.3V exactly towards the desired output voltage range, but that would not be my suggestion. Since the 3.3V on your particular pico board may be 2-3% lower or higher (talerances in the power supply chip) I suggest to use at least 5% overhead, and calibrate the output voltages in software (using a accurate voltmeter). In that case I suggest to make the circuit very simple, like below. That gives an output range of 0V...5V (in fact it will be 0.03V...4,95V). That covers your needs. The output should be 1.2V at a PWM of 24% and 4.4V at a PWM of 88%. The opamp can be any rail-rail opamp. Look what you have in your toolbox. Good luck building the tester Volhout P.S. you can also use a cheap LM358, but only of you power the opamp from 7V (the LM358 cannot output 5V when powered from 5V). Edited 2025-06-16 05:08 by Volhout |