Friday, November 04, 2016

Success

Thursday, November 03, 2016

Let's get right to it then

Later that life...

I have a cat now and sometimes I worry about her getting bored when I'm gone to work all day.  Like all minor life inconveniences, I set out to solve this problem with Amazon.com.  I wanted something that amuse the kitten, but with an added dimension of having automatic and random engagement.  In my mind I was picturing a motion-activated cat toy.

Turns out, that thing doesn't exist, not for a reasonable price (just- believe me on this.  I'm an internet shopping ninja.)

This led to frustration because I know Woot.com is flush with cheap battery-powered motion detection lights and Amazon is flush with cheap, battery powered cat toys, yet my cat is left to blandly poke at a spring-animal-thing??

So I set to it:  A $5 LED light plus a battery operated cat toy showed up in two days and I took to disassembly.



The spinny-butterfly was straightforward: One AAA battery -> slide switch -> Brushed DC motor.

My first though was to make the light behave as the slider switch, but also I'm in the middle of some larger projects that are looming over me, and decided I would make this cat-toy project work as quickly and simply as possible.  That meant tying the brushed motor directly to the pins that were meant for the LED.  Because the light has THREE AAA batteries, the motor was spinning WAY faster than before, and probably pulling more current than the original LED circuit.  (I mean, I could have measured it, but nothing seemed to be letting out smoke, so I assumed all was well).


I figured I should at least talk up the light circuit and see what it knows.  The LED light uses a PIR (passive infrared) sensor and cheapo PIR driver chip, as seen here:
Now I know your secrets
There's a datasheet for this BISS0001 chip as well, but trying to interpret said datasheet will quickly unravel men with more delicate grips on reality's soft fringe.  I did however re-jigger the RC circuit on pins 2/3 to reduce the "on-time" of each activation, from about 20 seconds to about 5, as a way to save batteries and keep the kitten more involved.

I figured the delicate I.C. wouldn't much care for switching an inductive motor load, so I tossed a flyback diode and capacitor across the motor pins (Still not 100% sure if the controller is PWM-ing the lowside drive, and because I wasn't about to set up an O-scope for this project, I figured what the hell).  This seemed to improve smoothness of operation a bit.


The last modification needed was to replace the photo-resistor (which tells the light to only turn on, in darkness) with an on-off switch.  This isn't as "tidy" as putting the switch on the power-supply side of the circuit, but it's easier, because the pins were sticking out of the PCB, and again- faster.


Amazingly, the white light plastic piece snapped perfectly into the brown toy plastic piece.  I was thinking about clever ways to join the green top end to the lower assembly (with a PCB in between that didn't quite fit).  Then true inspiration struck:



And here it is, operating grandly, before I joined the two halves:

(I"m sorry- it's easier to hold the phone that way, and also, I don't know what that noise is I made)

The kitten loves it, I had a short and sweet story for a new blog entry, and everything worked out way better than expected.

Wednesday, November 02, 2016

Oh Shit Waddup

I haven't heard that name in years.