Downloads
Raspberry Pi® Pico setup for the bench link
We typically respond within one business day.
A Raspberry Pi® Pico with the Dreiym firmware gives the simulator three inputs, one DC output and two relay outputs over a USB cable. It works with the Pico, Pico W, Pico 2 and Pico 2 W.
Safety first
Low voltage only: batteries or a bench supply of 12 V or less. Never connect anything from these guides to mains (wall outlet) wiring, or to equipment that anyone depends on for safety.
- These pins take 0 to 3.3 V and are not 5 V tolerant. A higher voltage on a pin can destroy the board.
- For anything above the pin voltage, use a divider, and check its output with a meter before you connect the board.
- Join the board ground to the circuit ground first, then connect the inputs.
- Relay modules: low voltage loads only, within the rating printed on the module.
- Unplug the USB cable before you change the wiring.
Parts
- A Raspberry Pi® Pico, Pico W, Pico 2 or Pico 2 W with header pins
- A USB cable that carries data
- A solderless breadboard and jumper wires
- A multimeter
- For each input above 3.3 V: a 30 kΩ and a 10 kΩ resistor
- For the output: a 10 kΩ resistor and a 10 µF capacitor
- Optional: ADS1115 (four more inputs), MCP4725 (a steadier output), INA219 (current), a two channel low voltage relay module
Load the program
- Hold the BOOTSEL button while you plug the Pico into the computer. A drive named RPI-RP2 (Pico) or RP2350 (Pico 2) appears.
- Download the MicroPython file for your exact board from micropython.org and copy it onto that drive. The Pico restarts.
- Install Thonny from thonny.org. In Thonny, choose the MicroPython (Raspberry Pi® Pico) interpreter.
- Download main.py from this page, open it in Thonny and save it to the Pico with the name main.py.
- Close Thonny, unplug the Pico and plug it back in. The program starts by itself.
From a terminal with mpremote installed, this does the same as steps 3 and 4:
mpremote cp main.py :main.pyTo get the normal MicroPython prompt back, hold GP14 to GND while you plug the Pico in.
main.py 16 KB
Pico firmware (MicroPython). Save it on the board as main.py.
SHA-256 9b3a15858e56c16cdbee15d639da0ba731b1d461312a6fee871c76394439c9ea
Wiring
- ADC0 input: GP26, pin 31
- ADC1 input: GP27, pin 32
- ADC2 input: GP28, pin 34
- Ground for the inputs: AGND, pin 33, joined to the circuit ground
- PWM output: GP15, pin 20
- Relay K1: GP16, pin 21. Relay K2: GP17, pin 22
- Optional I2C parts: SDA on GP4 (pin 6), SCL on GP5 (pin 7), power from 3V3 OUT (pin 36) and GND (pin 38)
- Self test: a jumper from the output point (top of the 10 µF capacitor) to GP26
The output is a PWM pin turned into a steady voltage by a 10 kΩ resistor and a 10 µF capacitor: pin, then the resistor, then the capacitor to ground. The output point is the top of the capacitor. It gives a DC level only and can supply very little current.
Measuring more than the pin voltage: a divider
- Use two resistors: 30 kΩ from the circuit point to the input pin, and 10 kΩ from the input pin to ground. The pin then sees one quarter of the voltage.
- With 30 kΩ and 10 kΩ, up to 12 V at the circuit point gives up to 3 V at the pin.
- Before you connect the pin, measure the middle point with a meter at the highest voltage your circuit makes. It must stay below the pin limit.
- In the Bench panel, type 4 in the Divider box of that input, so the readings show the voltage at the circuit point.
- Keep the circuit itself at 12 V or less, divider or not.
Connect from the circuit simulator
- Open the circuit simulator in Chrome, Edge or Firefox on a computer.
- Build or open your circuit and run the simulation.
- Open Bench, read the safety note and tick the box.
- Choose USB cable, then pick the board in the list the browser shows.
- For each input, choose the point of the circuit it measures and, if you use a divider, its ratio. If the simulation expects more than the input can read, the panel says so before you wire it.
- Calibrate each input once: ground first, then a steady voltage you have measured with a meter.
- The Live tab shows measured and simulated values side by side, with the difference.
First check
- Wire ADC0 to the 3V3 OUT pin. Connect, and look at the reading in the Live tab.
- Measure the same pin with the meter and compare.
- With the self test jumper in place, press Self test. Without the jumper, the first check fails, as it should.
If it does not connect
- The board is not in the list: try another USB cable (some carry power only) and another USB port.
- Only one program can use the port at a time. Close Thonny, the Arduino Serial Monitor or the micro:bit editor tab first.
- The device did not answer: unplug it, plug it back in and connect again. Check that the Dreiym program is on the board.
- Safari cannot open USB serial devices. Use Chrome, Edge or Firefox, or the PC bridge with its serial plugin.
More bench guides
Get your project started
We typically respond within one business day.