I’ve been away from the blog for a bit – been doing some nifty stuff which I’ll relate when I can. In the meantime this is one thing I did over the weekend:
Sometimes I even make things for my own home. I’ve been slowly renovating our new apartment in Brooklyn, including making all the kitchen cabinetry. In a small kitchen its a challenge to design for best space use, and the question “what to do with all those friggin corner cabinets?” always comes up. After long debate I put a lazy susan in one and a slide-out trashcan in the other. See how fancy that drawer is? Yes there will be a front finish panel over it (maybe white – or a shade of red…)
For some reason we got a trash can that has an infrared lid opener. This was partly because it fit PERFECTLY and partly because a friend has one and after thinking it a bit silly we decided it was kind of nifty. So we ordered one from Amazon – a Nine Stars DZT-42-1. (as an aside I would like to mention how expensive simple trash cans can be if you need very particular dimensions to fit in cabinets – so I didn’t feel bad with the price of this one)
Trash can worked right out of the box fine & dandy – wave your hand in front and the lid opens smartly (inside is an IR distance sensor with circuitry). Only problem was (and I have to say I anticipated this) that when it is put in the drawer and slid closed, the electronics senses the cabinet closing around it and tries to open the lid. Well, nothing is easy so out comes my Arduino and assorted electronics gear to try to fix this. Its really a simple problem so I was able to come up with several working ideas which are not worth going into but my basic premise is as it always is when I do a project:
Find the simplest solution that will look awesome.
So first of all, it has to be all contained in the lid of the trash can. No wires coming out, nothing to get caught or broken when changing trash bags. Also – it has to work from the 6V battery pack in the trash unit. And of course power consumption should be kept to a minimum and it should look seamless.
The more I thought about it the more I was over-designing with the Arduino. Why use 600,000 – 1 MILLION transistors to do the job that ONE transistor can do? So I threw it away (not really!) and turned to a good old analog circuit. The most basic thing straight out of a Forrest Mims electronics workbook from my childhood: a simple light sensitive switch with a few resistors, a diode, a photoresistor and an NPN Transistor. Pull out the drawer, light hits the can and turns on the hand sensor with a relay. Bada bing:
See the photoresistor to the left of the interface. There is also a hole in the side to adjust a trim pot for light/dark sensitivity.
I’d be very happy if I was doing this for a client, simple solution and seamless integration.