Simple, easy-to-use hardware counter (EC = easy, easy counter). Raspberry Pico basis. 16*2 LCD display. micronEC.
counter.py | ||
lcd_driver.py | ||
lcd_screen.py | ||
LICENSE.md | ||
micronec.py | ||
Pinout_-_Pico-W.png | ||
README.md | ||
welcome.py |
micronEC
Simple, easy-to-use hardware counter. Raspberry Pico basis. 16x2 LCD panel. micronEC.
1. Name
For micronEC, the name says what it does. "EC" stands for Easy Counter. "EC" can also be read as "easy", which alludes to the utility.
2. Hardware
Required Hardware:
- Raspberry Pi Pico W
- 16x2 LCD with PCF8574* backpack
- [In standard configuration: 2 Hardware Buttons]
Measured power consumption (Raspberry Pi Pico W, LCM1602 LCD panel, PCF8574T backpack, generic button):
- ~40mA in idle mode, + ~2mA when handling button events
- ~43mA at startup
3. Hardware preparation & Software installation
3.1 Hardware preparation
If you've got all the hardware stuff, let's start building your micronEC!
The only thing to say here are the standard pinouts (all of these can be changed, see 3.2 Software installation).
A pinout sheet can be found here.
Component | Pin (name) on component | Pin name on Pico | Pin number on Pico |
---|---|---|---|
LCD backpack | SDA | GPIO0 | 1 |
LCD backpack | SCL | GPIO1 | 2 |
LCD backpack | GND | GND | 3 |
LCD backpack | VCC | VBUS¹ | 40¹ |
Button 1 | Pin 1 | GPIO2 | 4 |
Button 1 | Pin 2 | GND | 3 |
Button 2 | Pin 1 | GPIO3 | 5 |
Button 2 | Pin 2 | GND | 3 |
[¹]: This pin provides 5V to the backpack - but only when the pico itself get's its power via USB.
3.2 Software installation
- To get your Raspberry Pi Pico W ready for micronEC, make sure you've already installed microPython on it.
- Clone this repository to your local filesystem.
- Open Thonny
- Open the following files:
- counter.py - library providing counting stuff
- lcd_driver.py - the lcd driver (working for PCF8574*)
- lcd_screen.py - library providing a class for displaying counters
- welcome.py - library providing a welcome/startup screen shown on the lcd
- micronec.py - the main.py
- In micronec.py, you can make changes as you need to - it's all commented and explained
- (Connect yout Raspberry Pi Pico to your computer)
- Upload all previously opened files (except the micronec.py!) to the Pico
- Now decide:
- if you just want a preview, upload the micronec.py as it is (no renaming) and press F5 to run.
- ONLY DO THAT IF YOU KNOW WHAT YOU ARE DOING: if you want to use that version for production, upload the micronec.py as main.py
- WARNING: the pico always runs the main.py file on startup, so there's no chance to connect to it via USB. If you do so, and want to change things later, you have to completely reinstall microPython on your Pico and all previously uploaded files will be gone. ONLY DO THAT IF YOU KNOW WHAT YOU ARE DOING.
- Have fun!
4. License
micronEC is licensed under GPLv3, a copy of it can be found in LICENSE.md.