Pi Binary Clicking/Blinking Device Utilizing Raspberry Pi Pico
by cyril4 in Circuits > Raspberry Pi
6 Views, 1 Favorites, 0 Comments
Pi Binary Clicking/Blinking Device Utilizing Raspberry Pi Pico
 (2).png)

This is a rather useless and nerdy project, however I take joy in both of those things. This uses a solenoid and the onboard LED on a Raspberry Pi pico to blink out the digits of pi in binary. On the solenoid is a 3D printed Pi shape, which moves up and down. When the Pi is up, its signaling a 1. When its down, its signaling a 0. The LED flashing tells us when it is switching digits. For example, if the Pi is down and the light flashes once, it is signaling one zero. If the Pi stays down but the light blinks again, it is signaling another 0. If the Pi goes up and the light flashes again, it is signaling a 1, and so on and so forth.
Obviously this has very little practical use, however I think it is a very fun nerd toy and is rather satisfying to watch/listen to it blinking and clicking. Hope you enjoy!
Supplies






- Raspberry Pi Pico (2, W, 2W, or just the original all work fine)
- Mini Solenoid (I used this one)
- Small NPN transistor (e.g., 2N2222, PN2222, S8050, etc.)
- 1kΩ Resistor
- Something to mount everything on (e.g., plastic, wood, cardboard, etc.)
- Glue!
Wiring

1. Solenoid Power:
Connect one wire of the solenoid to the 3v3 pin on the Raspberry Pi Pico.
2. Solenoid to Transistor:
Connect the other wire of the solenoid to the collector pin of the transistor.
3. Transistor to Ground:
Connect the emitter pin of the transistor directly to the GND pin on the Raspberry Pi Pico.
4. Control Signal from Pico:
Connect a 1kΩ resistor between a GPIO pin and the base pin of the transistor. (I used GPIO 0, however you can pick any as long as you modify the code accordingly.)
In the circuit diagram, please regard the motor as the solenoid.
Software

- Download the correct MicroPython on to your Pico.
- Download the attached code to your Pico and save it as main.py.
Downloads
Pi Solenoid Topper

.png)
- 3D print the attached file
- Glue the Pi to the shank of your solenoid
Downloads
Board Attaching
 (1).png)
Attach your Raspberry Pi Pico, solenoid with Pi topper, and other components to a wooden, cardboard, or plastic piece to keep it all contained. Now, you're all finished! The device will blink and click out Pi in binary! Thank you for reading.