Benjamin Mosley

Coin Counting Device + Dashboard

Category: Hardware Design

Gallery

This was a project I had a lot of fun doing, and it taught me a lot not only about software and networking, but hardware as well.



Part 1: Background




The story behind this project goes as follows:


I have a very large jar of coins. It has to weigh about 20 pounds as of today. I started collecting these coins over the summer, and I wanted to find a way to keep track of them. It would be great to know how many I have, what denominations, and how much total money I have.




Enter: The Raspberry Pi Pico WH








Part 2: The Pico




The Raspberry Pi Pico is a neat little device that I believe all programmers should tinker with at least once. It is similar to Arduino Microcontrollers, with some slight differences:


-The Arduino primarily work with the C Programming Language


-The Raspberry Pi Pico primarily works in the Micropython Programming Language


Micropython is almost exactly the same as plain old Python. However, it is lighter, and designed to perform better on lesser hardware. It is great for beginners attempting to learn hardware and the software that communicates with it.




The base-model Pico has no network-connectivity, and is just a simple microcontroller. The model I used, the Pico WH, not only has network connectivity, but came pre-soldered with headers to connect to a breadboard.









Part 3: The Logistics




I began by placing the Pico on a breadboard. And learned quite a lot about wiring as I began finding the best way to wire the screen and buttons I needed.

The layout was as follows:





-Upon booting up, the pico attempts to connect to the internet. It will not let you perform any actions until you do. My wifi settings are configured on the pico itself.




-The four small buttons represent the four main denominations of coins (Penny, Nickel, Dime, Quarter).




-The screen communicates with the Pico, which updates the screen on how many times the buttons have been pressed.





-The Big Red button collects the data from the button-presses, packages it up, and ships it away for storage.




But where does the data go?








Part 4: The Server




Upon pressing the red button, the data is packaged up and sent on a trip over the internet. This data ends up on my web-server! In a SQL database. This data gets formatted into a nice, readable format I can check at anytime.




You can actually view this coin database too! If you navigate to https://www.coins.benjaminmosley.com.

I left it open to the public, as the pages are static, (No CRUD features) as the only way to update the coin count is in one of two ways:





-Using the coin device




-Manipulating the SQL database on the server-side




Therefore, I am happy to let people visit the site and see what I have built. All of the code I used is present on my github as well, (Link is on the front page) if you would like to view it, and perhaps build your own!

Thank you for reading, I hope you found this as interesting as I did!