A 3D-printed Peltier mini fridge for one can, with AI agents for the maths, the design, the mistakes and a 3D assembly manual. 60 hours of PETG. Alpha of a prototype.
A cheap Chinese action cam with a hidden Android, a bad flash that bricked it, a 40-byte loader that brought it back, and a software finger that presses OK at boot.
Wake-on-LAN on the RN102 was « a hardware limit ». It was one PHY register: the Linux driver turns the wake pin into a link LED. One device-tree line, and the NAS now sleeps for real.
A Pi Zero W with aa-proxy-rs replaces a dead Android Auto dongle. Then Waze says 0 km/h: the bug was in the proxy config. Plus trip logging and a crash recorder for a car with no internet.
Every forum says the Ethernet port of a 2009 Pioneer receiver is useless. It was just waiting for an IP address, with telnet and a web remote behind it.
If you have a cat, you know that sometimes his instincts push it to eat green eatable-looking plants, whatever they are, and whatever the consequences may be.
Spoiler: most of the time, it will require manual cleanup by the humans that happen to inhabit the same place.
It happens such a cat is living at my place.
And the Cat is often tempted by a plant which is not good for him.
So a solution had to be thought, as having a cat rejecting his stomach contents while you are in a middle of a meeting as you are working remotly from home is often a distractor not only for you but for your colleagues.
As a bonus, the device we would end up building could be used to prevent the cat from accessing other forbidden parts of the house, for example tables, kitchen hot plate..
End result
Let’s break the habits of this blog, and show end results first!
Recognize the Cat
Idea is to use tensorflow/OpenCV on a cheap raspberry 3B+ to detect the cat.
After some tests, it appeared this model gave many false positives for categories others than cat, in particular « person » detection.
However, no false positives seen for the cat category, and some false negatives.
So that’s good enough to start plugging that detector to real-life world.
The link to the real world
After having thought of putting some electronics/motor in a cheap, plastic water spray I already owned, similar to that:
I realised implementation would take time, multiple 3d-printing iterations (I have not seen any prior art in thingiverse) and my 3dprinter requiring maintainance + having little time to dedicate to that presently, I decided to go for another solution.
Which – I imagined- would be easy to hack so that it could be controlled by the raspberry GPIOs rather than the original push button.
Step 1: Open the spray
Be careful with screws hidden below the plastic adhesive on the sides of the spray.
Then just use common sense to remove parts carefully, you should end up with that:
Parts we will put back together once we are done
As you can see, one can easily see the button switch located in a dedicated PCB, link to the main logic PCB with black and red wires. Both wires are shortcut when button is pressed.
So we need to simulate that shortcut.
Extend wires
First, let’s get rid of the button part, to this end you can just unsolder the two wires. This option is preferable to cutting, as wires will be longer, which will be easier to handle what comes next.
Button PCB has been unsolderedWe extend wires with new ones, and we protect conductive parts with heat-shrinkable sleeve
How to simulate shortcut with the Raspberry
So several options were considered:
using a relay
+ : easy to put in place, very good isolation
– : noisy when it operates, overkill for our application (very low current/voltage), not the least expensive, takes place (it’s big)
using optocouplers
+ : very strong decoupling/isolation, quiet
– : not the least expensive,
using transistor
– : not the best isolation, but works fine in our case as we play with small voltage (the voltage difference between the 2 pins to shortcut from the spray is <5v
+: very cheap, quiet, easy to put in place, small form factor