It’s bin a while since my last post for the challenge – that’s because I’ve been wading through piles more trash, some of which might as well make it to the final product. It’s been a while since I’ve last built anything major, so I’m feeling a bit rusty and my component junk bins are kinda full …

That being said, being another week, we’ve also had another bin-emptying cycle. One of my neighbours’ bins was spotted, laying on its back. But so was mine … one house down the road! I guess I’ve got to start building the system because this is a real problem.
The Project Gets a Name!
In my first post, I launched a poll to name the project. There were a number of interesting and imaginative suggestions in the comments thanks to the readers, some of which spilled over into the second post.
If I go strictly based on polling results, the name for this project would have been:
“I am suggesting my own name in the comments ...”
Which only means one thing … everyone likes a different name and there’s really no clear winner. So, I suppose, you can all go and ‘s/TRASH_PROJECT_NAME/whatever_you_want/g’. But if I look at my original set of names, it’s a two-way tie between Lil’ Raccoon and Bintellect/Bintelligent. While I might consider myself quite the bintellectual, I decided that a cute and cuddly name would be best. Thus, I now christen the project Lil’ Raccoon.
Given that I don’t live where raccoons are native, nor do I have much in the way of artistic talent nor do I want to accidentally dox myself with a real photo of my house and its bins, I’ve decided to enlist the help of OpenAI’s ChatGPT GPT-6 Luna to produce the project’s official mascot -

The prompt for this photo was:
“Generate a large photorealistic image containing a cute, mischievous little raccoon in proximity to a wheely bin which is situated on the kerbside, ready for garbage collection. The image should be in dusk or evening light, with a mixture of artificial street lighting, houses, driveways and hedges or shrubs in the background. The raccoon should be looking at the camera with a mildly surprised expression, whilst its body should be facing the bin and showing an intention to raid the wheely bin. Ensure the bin has a realistic aspect ratio. Ensure the wheely bin is closed. Add the text "Lil' Raccoon Project" in white to the visible side of the bin.”
Here are some more raccoons for your viewing pleasure. These are generated by DeepAI, Google Gemini and Perchance.org (Stable Diffusion), respectively.

As cute as they might be, I suppose I’ll have to teach the AI just how to orient a bin when it is kerbside ready-for-collection as all of the models have a very odd idea of the angle of bin placement. A human wouldn’t do that! Perhaps if you run this prompt yourself, you’ll get an interesting result – feel free to share.
The Missing LEDs Arrive
After the last post went up, I reached out to e14Alice and the team and while we don’t know what happened, they have graciously re-ordered the LEDs and sent out a package containing them. The package arrived for me just the other day.

It was a small satchel ….

The CamdenBoss IN514-series LEDs were all individually wrapped in their own small plastic bag.

A closer look at the LEDs themselves seem to suggest they might be regular 5mm LEDs packaged inside a bezel with some optics. The legs look about the right length and the square profile sort of gives it away. The LEDs themselves also seem to be loose within the bezel – the legs sort of move back and forth.

A closer look at the plastic moulding and it seems there’s a bit of mould flash – it’s not quite the smooth finish I might expect.

I checked the datasheet and it says the LEDs are rated for 10mA operation, but did not specify the voltage drop (which would be nice to know). I presumed it was somewhere in the 3V ball-park of modern high-intensity LEDs, but I measured them with a DMM and at 1mA it seemed they measured 2.85V for blue, 1.9V for green and 1.7V for red. Running them from a USB supply, they lit up nicely with the optics spreading the light into a round “spot”.
The LEDs are intended for push-fit into 8mm cut-outs in panels – I’m not sure how tightly they might hold. But I do feel that the way they’ve been designed is a little odd – they’d have to be fitted through the panel first and then soldered from behind to bare legs which is a bit old-fashioned. I’ve used ones in the past which had terminals with eyes in them for passing a wire through and soldering. There is also the older-fashioned alternative of simply having a LED plastic “clip” in the cut-out such that the LEDs can all be pre-assembled, stuck into the clip and backed down into the hole, leaving the head of the LED and a bezel poking out of the panel. These indicators also don’t have any integrated resistor or current limiting – while that makes it compatible with low-voltage outputs, it does increase work for those looking for an indicator that will run directly from a voltage source. Some might expect the word “indicator” to imply a pre-assembled system that can just be run from a voltage source.
Perhaps there are other products in their catalogue which are a better match for those needs … but I guess I’ll be trying these out to report bin status hopefully run directly from a microcontroller’s GPIO pins with an appropriate resistance.
Sometimes, what you need is MORE trash …
What’s been supplied in the kit is not going to be enough to build the system – so let’s finish the kit out by digging around for some items that would work better. While rummaging around in my junk boxes, I began to realise just how busy I’ve been in the last couple of years – to the point I recognised so many project ideas that were never realised, with parts that are on the verge of becoming obsolete. Other bits come from projects that were part-completed but never achieved their true goal for one reason or another. But I suppose it’s good to give them a new life, in a project about trash … call it taking out the recycling.
Displays
My system’s going to need a way to tell the user about their bin, what’s happened to it and when it’s time for them to take out their bin (and whether that’s one bin or two).

My digging unveiled some SSD1306 OLED displays of 128x64 pixel dimension. Unfortunately, the physical size of these screens is under 1” diagonal in terms of viewing area, so it’s going to be a bit too small for practically displaying a lot of information. Based on prior experience, OLED pixels fade pretty badly too, if left on continuously.

Then, I came across a LILYGO T-Display I had spare from a project several years back. The colour LCD is 1.14” in size, so a tiny bit bigger, with 240x135 resolution and doesn’t mind displaying static imagery as much. The nice thing is that it has an ESP32 and a battery charger IC already integrated, but unfortunately, that’s the original ESP32 (which means no Bluetooth 5.0 Coded PHY goodness) and it seemed tuned for smaller batteries.

I also had a spare LILYGO T5 with a 2.13” ePaper display. This old v2.3 board also ends up with an original ESP32 and the same limitations as the one above, but the eInk is nice in terms of viewing contrast. Refresh times are a potential downside – but at least it would be an easy way to show which bins are being taken out on a given week and whether it’s bin night or not. Maybe the solution is to have multiple microcontroller boards, each doing their own job!

Finally, I have this monochrome LCD from China marked GMG12864-06D Ver 2.2. This is, as implied, a 128x64 pixel display, but has a larger viewing area of 2.14”. It’s based around a ST7565 controller and communicates in SPI. I had actually bought a few of these displays because my Keysight U1461’s OLED screen had failed a second time and this time, the OLED display panels were not available anymore. I decided I would design a board that would replace the OLED display and install this LCD instead, using a Raspberry Pi Pico W (or regular version) to try and emulate the original SSD1305T7 using its PIO capabilities.

Unfortunately, while I did some reverse-engineering of the original board and designed a replacement board just fine and it worked for running the display, I didn’t account for the increased thickness of the stack which meant that the lid would not close. Add to that, the plastic casing of the multimeter was cracking and crumbling in places, I decided to abandon the meter rather than spend any more effort on it (or money for that matter, as someone has another replacement screen but for a whopping AU$160). Because the project wasn’t successful in the end, I never bothered blogging about the project and it never saw the light of day until now.
So I suppose this RP2040-based board and display might be part of this project as well – in true raccoon scavenging style, but the Pico W probably won’t be able to do BLE Coded PHY either.

Microcontroller Platform
Based on walking around the house with a set of Bluetooth headphones on, I already know that 2.4GHz signals from inside the home can only barely make it out to the street. While my Wi-Fi fares better than Bluetooth, it’s not a guaranteed success either – signal strengths there often are below -82dBm and the issue of the other band users increasing the noise-floor means that radios rarely achieve good reliability down to their sensitivity ratings. But I also know that Bluetooth Low Energy Coded PHY is a bit of magic, having previously RoadTested the Cypress EZ-BT Module Mesh Evaluation Kit, I know that the ~12dB theoretical coding gain you get from Coded PHY reliably extends my BLE coverage up to about two, sometimes three, houses either side of mine while maintaining the low energy consumption that is characteristic of Bluetooth.

As a result, I had to shop for a suitable platform – in the end, settling on the ESP32-S3 platform. The revised version of the ESP32 chip has Bluetooth 5.0 support, included Coded PHY, whilst retaining support for Arduino IDE which is my preferred platform.

This particular board marked YD-ESP32-23 2022-V1.3 uses a module containing 16MiB Flash and 8MiB PSRAM. It appears to be a clone of the ESP32-S3-DevKitC-1 but revised using USB-C connectors and with a different module that supports an external antenna with modifications. It’s not expensive – about AU$10 or so each, but the quality of construction isn’t great (some suspect soldering) and the design is so wide that if you place it into a breadboard, one side has no pins available and the other has just one pin. You’ll need a special wider breadboard, or perhaps use two instead and have it straddle the power buses instead to make convenient connections. But I suppose for me, this isn’t so much of an issue if I’m intent on Veroboarding or Dupont-wiring my way out of this mess.
Sensors
Whilst the challenge kit does come with a few sensors, I thought it’d be nice to dig out some backup, just in case things don’t go to plan.

The STMicroelectronics VL53L4CX infrared time-of-flight sensors would be a good choice for measuring the trash inside the bin. I had purchased these for evaluation for a different project, but they settled on a different sensor before these were even deployed, leaving them surplus. But Analog Devices have provided their own infrared-based sensor solution too, so I suppose I should use that first …

I had this Adafruit breakout for the Sensirion SGP30 MOX gas sensor which can sense TVOCs and report CO2-eq. While it wasn’t the first sensor to come to mind, perhaps I can use this to gauge how smelly the bin is as an added bonus …

I also came across these old TSL2561 lux sensors which could be used to sense light. Perhaps that might be a non-mechanical way to sense when the lid has been opened and be one that can be easily weatherproofed – but that won’t work in the dark! So maybe not …
I was really hoping I’d come across a long-forgotten BMP280/BME280/BME680 or Si7021 type temperature/humidity/pressure sensor. While it may not seem obvious, bins are often kept outside and knowing your local outdoor temperature is quite a nice thing when it comes to energy management – deciding when to open the windows or to turn off the air conditioner. Why not do double-duty of protecting the bins and being a useful weather-station sensor? Alas, no luck … rummaging raccoons can’t be choosers …
Power

When it comes to power, I managed to buy an affordable (AU$18) glass and aluminium framed solar panel. The polymer-based ones that solar garden lights use simply don’t last the test of time, so I opted for something with a proper construction.

While it’s still not fully serious (that junction box is not “weatherproof”), it will be good enough. It’s got a 6W rating with an open-circuit voltage of 7.67V and a maximum power point at 6V. For proper use, I’d probably add a run-of-the-mill 1N4004 diode in series just to ensure there’s no reverse current flow at night, which would knock off anywhere from about 0.6V to 1.1V depending on the current flow.

When it comes to batteries, I have a stack of old cells harvested from refurbished Dell laptops. I recently posted on my personal blog about how these refurbished laptops often have <60% claimed battery health but when cracking them open for their cells, they all seemed to test just fine. These are extended-voltage cells, so I’d expect to lose some capacity when charging them to just 4.2V rather than their 4.4V, but it should also help them last somewhat longer too. With three cells in parallel (of mixed batches), I’d anticipate a usable capacity close to 11Ah or about 40Wh. That means my sensing platform should target a power consumption of about 0.3W to ensure that there’s enough power reserve to make it through a string of cloudy days. That should be fairly easy if I make use of sleep modes.

With regards to charging, I have these compact linear charging and protection boards, marked LX-LBES, they are based around a ME4057 linear charger IC which can operate up to 1A (often thermally limited) and a BRCL3130ME single-cell protection IC. The over-discharge current is 3A and the short circuit detection is 15A, both of which are plenty, while the over-charge voltage is 4.3V (safe for these cells capable of 4.4V) and the over-discharge voltage is 2.4V which is just a hair below the 2.5V I usually use. In all, a seemingly good match, especially since the ME4057 apparently can handle up to 8V input (although at a thermal cost, which will likely reduce charge current). The panel’s output will be less, since it won’t always see perfect sun and the flat angle on the bin lid is not going to be optimal. I think this is going to work …
Ancillaries and Other (Aborted) Dreams

I might need a breadboard, so I managed to find one that element14 supplied previously for the Light Up Your Life challenge, complete with a transistor-based logic level shifter (also, another useful piece of kit, just-in-case).

Users of the system might have to interact with the unit, so some push-buttons (these are old-style mechanical panel-mount ones) could be useful for navigating a menu or acknowledging an alert.

The system should be able to make some alert noises – e.g. your bin lid is opened, your bin has fallen over, so I managed to find some beefy 3W speakers. Perhaps a MOSFET on a GPIO would be enough to make a loud beep-boop or two.

Then, I managed to find some 13.56MHz NFC stuff I had that I never got around to doing anything serious with. Perhaps if I had a solenoid, I could turn this into a bin-locking mechanism too … but that’s scope creep and you’d be pretty annoyed if a firmware bug meant your bin didn’t open to empty on bin night … or because of a bug or a loss of power, that you couldn’t throw your garbage away. But it did remind me of just how much I used to build things … and how time seems to have run away from me …
“You wouldn’t steal a bin!” Well, I did … and how did that work out?
As my project involves wheely-bins, I didn’t think I could just go and tamper with council-issued bins. So my thought turned to 3D printing. After downloading a model and printing it on my Marlin-based Anycubic Mega i3 (now, an antique in the 3D printing world), I managed to make quite a realistic-looking bin.

It has a lid that can be open and shut, while also having wheels that can be turned. The downside is that all of them are a bit rough – the wheels definitely don’t get much traction and the axle has a bit of friction internally. The lid, while it does close, does take quite a bit of effort.

It even has a nice generous void inside that allows me to throw rubbish into it … but my problems were only just beginning …

… because even at the largest size that would fit my print bed, the bin is simply too small to fit any components onto. Even a small mini-breadboard is about the size of the whole lid, meaning that my intended microcontroller won’t fit under the lid.
I did anticipate this issue, which is why I thought that I might have to section the model into pieces and instead 3D print the model in sections, gluing it together. But the print for this model took more than two days of continuous print time already – scaling this up is not really feasible.
Perhaps it’s time for Plan B … amass some cardboard and build myself a bin out of trash?
Conclusion
The project has a name, the missing LEDs have arrived and the bin has been printed. Through digging in my junk boxes, I’ve found quite a few things that can help the project come to life. But things aren’t going to be as straightforward as they seem – the bin is just too small and printing will take too long, so I’ll have to come up with another creative solution. As every engineer knows – it’s good to have a plan, but nothing ever goes to plan …
Time’s now really running away from me, but don’t worry because this Lil’ Raccoon has been furiously digging away at things. Unfortunately, raccoon hands aren’t so suited to typing out long updates … so you’ll just have to be patient while the next few portions get assembled.

Actual image of me at my desk authoring a blog. Looks like OpenAI knows too much! But seriously … I look away for one moment and suddenly AI seems to have improved so much. Those raccoons are so cute!
AI Disclosure: AI has been used in the generation of a number of images in this post which involve raccoons. AI has not been used to generate or modify any of the text or photographs of products and electronic items.