A Brief Background

As a father of four, I feel it’s important to find meaningful ways to bond with my children. As an engineer and self-proclaimed nerd, I often find it difficult to enjoy the types of activities that my young children want to do. Macaroni art just doesn’t do it for me anymore. Additionally, finding an activity that appeals to my twin 5-year-olds, my 9-year-old, and my 13-year-old is tough. However, recently I was struck with an idea that we could all enjoy together.
Ever since I was a teenager, I’ve collected my spare change into an oversized crayon-shaped “piggy” bank. My kids enjoy counting and sorting. Their father is an engineer after all. We set out to count everything. After separating out the nickels dimes and quarters we counted what was left and found that we had collected almost two thousand pennies.

My 5-year-olds figured that we were rich. It’s over 10 pounds of zinc and copper. How could we not be? Someday they’ll figure it out but until then I’m going to let them live in their fantasy world. So instead of buying my family half a meal. We decided to do an art project with them.
I thought making a mosaic from the pennies would be fun. We had a spare 16”x20” canvas from a previous project and decided to use it. 21 by 26 pennies cover the canvas so we needed to have a minimum of 546 pennies total sorted by shade. We decided to separate the pennies into 10 shade groups.

Manual Attempt

Sorting the pennies by hand quickly proved to be a difficult task. Recognizing the difference between any two sequential groups was nearly impossible to our untrained, subjective eyes. Getting enough pennies in the right groups was going to take days. We sorted through approximately 1 dollar and decided that the project wasn’t going to be worth the effort to do by hand.

As every engineer does to one degree or another, I decided to do battle against subjectivity. This was going to require some code, 3D printing, and some less subjective sensors/eyes.

Leverage Image Processing

Scilab is a free and open-source numerical computational package similar to MATLAB and has image-processing libraries that make image manipulation relatively easy. Although, I have some experience with image manipulation in code and I’m sure I could have figured out exactly how to write the code completely on my own that’s just not something that we have to do anymore. I asked Google’s Gemini AI for a code in Scilab syntax to resize and greyscale an image and in a few seconds, I had a code that was ninety percent of what I wanted. Someday AI will do one hundred percent I’m sure but until then I’m happy to only have to tweak a few things. I then took that code and augmented it to reduce the image to 10 shades of gray, make the pixels circles, and spit out an array of values that we could use as our guide when placing pennies on the canvas.

 

BEFORE SCILAB PROCESSING

AFTER SCILAB PROCESSING

ARRAY OF CORRESPONDING VALUES

Unfortunately, I had no idea that I would be writing this blog post at the time when we created this project and so as part of project cleanup, I deleted the image that we used for our art. We had decided to lean into the AI craze and asked Microsoft’s copilot AI to create a cartoon style smiling face with a dark background. It was similar to this image but not exactly the same.

Once we had the code figured out it was time to figure out how to more efficiently sort through the five and a half dollars we would need.

SIMILAR PROJECT IMAGE

SIMILAR PROCESSED IMAGE

Once we had the code figured out it was time to figure out how to more efficiently sort through the five and a half dollars we would need.

Once we had the code figured out it was time to figure out how to more efficiently sort through the five and a half dollars we would need.

Fabrication and Setup

I’ve owned a 3D printer for about 9 years, and I tend to rely on it heavily in my personal projects. I love the ability to make a part that is exactly what I need for any random project. I get a kick out of hearing my kids specify paper printers vs 3d printers. I worked with my 13-year-old to design two 3D-printed parts, a sensor mount, and a penny hopper. The hopper drops a penny into the sensor mount right in front of the sensor. The brightness of the penny is sensed and then removed and categorized.

This is where I had to dial back my vision a little bit. I had wanted to build a system to be fully autonomous and not only sense the brightness but then also sort the pennies into 10 different bins mechanically. However, taking the time to design such a system wasn’t immediately feasible. I have 4 children and a full-time job after all.

PENNY HOPPER

SENSOR MOUNT

SORTING SETUP

SORTER IN USE

I purchased two TCS34725 color recognition sensor modules. This was the first time that I had used a sensor with I2C protocol, and I was impressed. Only 4 wires to connect my seeeduino Xiao microcontroller to the sensor and after downloading the Adafuit_TCS34725 library in Arduino I was getting high-resolution Red, Green, Blue, and clear values. My 13-year-old and I picked the 5 brightest pennies and the 5 darkest pennies that we could find and checked how the values from the sensor changed. We found that the Clear brightness value had the largest change between the light and dark pennies.

Once we had the values for the brightest and darkest pennies it was a simple matter of setting brightness ranges for 10 categories and having the category printed to the serial monitor on my computer. We were finally ready to sort again.

SENSOR PLACEMENT

Sorting

Sorting went much better this time around. I read the category from the computer and then handed each penny off to my older daughters to place into each bin. My 5-year-olds loved loading and making sure that the hopper was topped off. Every dollar or two we would switch things up and take turns with the different tasks. We sorted through around half of our two thousand coins in an hour or so. Since I had been collecting these coins for many years and because nobody uses cash anymore, we had a lot more darker coins than the bright ones. For this reason, we decided we needed an image with a dark background.

At this point, we had everything we needed to finally put pennies to canvas. Glueing over 500 pennies didn’t take long and we found that a small dab of hot glue was sufficiently strong for our purposes. My 5-year-old crossed off each number in our array as my daughter placed hot glue and I placed pennies. Working with 5-year-olds did lead to at least 1 error where a row of pennies ended up offset by 1 from its proper place but it’s all in the name of fun so we just left it.

In the end, it was a great project, and we had a great time making Abraham Lincoln smile together. I hope that they learned that making an idea into reality is not only possible but can be fun. I tried to teach them that you can take a seemingly large problem and break it into manageable pieces. I know they learned that watching and hearing pennies roll back and forth through a 3D-printed hopper is extremely satisfying.

Bonus points if you can spot one Queen hiding amongst all the bearded gentlemen.