Friday, April 4, 2014

Making toys

Edit: Sooo... anyone with a basic electronics knowledge and about 30 seconds of actually studying the circuit below would be able to tell why it's a bad idea. For those of you not so inclined, connecting the negative side of the battery to the positive side with only a resistor in between is a recipe for two things - a lot of heat and a dead battery. That's what you get for blindly trusting circuit diagrams you find on the internet. So, if you want to build this circuit, don't do it this way.

Making toys, or specifically game pieces is pretty much my entire business now. I love it. I get to come up with cool designs for existing (or sometimes prototype) games and then create them from raw materials using a laser. Not many people get to sit around at their job and think "how can I make Settlers of Catan even more fun?" That's what I do, and it's awesome. And since I spend so much of my time thinking about making and modifying games, it's only natural that my attention occasionally turns to The Child's™ toys as well. Especially the annoying ones. 

Last year, The Child™ got a pair of monster trucks. They're pretty cool. At about 8" long and 5" high, they also have a flywheel and gearing so when you push them they'll keep the wheels going and actually climb over small obstacles. But, they are sadly, super annoying. They have giant buttons right on top that are nearly impossible not to press when you pick them up, and if God forbid you do hit them, you're treated to flashing red headlights and 30 seconds of loud engine noises. The noises had to go. But that was really no big deal. 3 screws on the bottom and a quick snip with some wire cutters and no more speaker. Now you press the button and there's no sound, just flashing red LED headlights. 

I tried to let it go. I really did "It's just a kid's toy" I would tell myself. "It can have red headlights…"
No. So during The Child's™ nap today I grabbed one, took it down to my office and started to experiment. I had initially hoped it would just be a matter of drilling a couple new holes in back, and hooking up some white LEDs parallel to the red ones. Unfortunately, the circuit driving the red LEDs wasn't providing enough voltage to light up the white LEDs. Drat. Oh hey, there's a second unused circuit labeled L2. Will that…? No. But wait a minute here… I wonder what happens if I hook the white LEDs up to the speaker circuit? Jackpot. Drill some holes, tiny bit of soldering, a bit of dremeling so the red LEDs are flush, lots of superglue and we're in business. I put it all back together and showed The Child™ after he woke up. He was thrilled and spent the entire time until dinner flashing the walls in his room, or the couch, or the dog. I noticed though that the LEDs were only about half as bright as they should be. Sometimes when it would get to a really loud part of the sound file, they would get to maybe 2/3 brightness, but that just won't do. On top of that, I can tell that it's draining the batteries relatively quickly. Since these things run off 3 of some obscure button cell, I wasn't really looking forward to trying to replace those batteries any time soon.

So in light of that, and the fact that he literally begged me to "fix the other one" I started thinking about the problem a bit deeper. And then I remembered by box full of random electronic components and got to thinking I could probably build something that would fit in there, tie in to the existing buttons, and use a battery I wouldn't have to travel to China to find. So I start digging. Grab bag of capacitors. Box of resistors. Bag of transistors. Variable pots. LCD displays. Input jacks. Power jacks. Voltage controller chips from an old USB hub. Wait, what's this? Oh yeah, a tube full of brand new 555 timer chips. Those are handy. The nice thing about 555s is they can be run in either monostable mode or astable mode. In monostable mode, you activate it and when it times out it shuts itself off. In astable mode, the output of the chip constantly oscillates between high and low output. If you attach an LED from the output to ground, it flashes on and off. If you attach another LED from the output to the positive rail, the lights flash back and forth like a police car. Obviously this is way cooler, and only 2 more solder connections, and clearly the route we want to take. Now the cool thing is if you take 1 chip wired up each way, you can use the monostable chip to turn on the astable chip for a certain period of time, and then shut of. Just like all the cool kids toys. So after some (ok, a lot) of tinkering, I came up with the design below. There are probably much better and easier ways to do this, but I'm no electrical engineer and I don't know them.



Most designs I've found online say to use a .01uf capacitor between pin 5 and ground on both designs, but I didn't have any. These seem to work. The chip on the left is the monostable chip. The 1000uf capacitor will keep the circuit on for 9-10 seconds and then shut off. It's one I had left over from when I replaced all the caps in our TV and I was hesitant to use it, but anything less than 10 seconds seems too short and I don't really want to go bigger. I tried a 1500uf cap and the circuit stayed on for about 16 seconds. Upping the resistance on the 10k resistor to about 220k allowed me to use a 47uf capacitor, but it seemed to kill the battery almost immediately.


In the video I'm pushing down on the 220uf capacitor because it has really short leads and doesn't stick in the breadboard. And apparently Blogger runs uploaded videos through the "recorded with a potato" compression, so sorry about the bad quality. It's totally 100% Blogger's fault. The original looks ok.

So what's left is to create a board for it all, figure out the right resistors to use for the lower voltage red LEDs, tie the trigger into the existing circuit board, mount a 9v battery holder inside the truck, and then figure out how to make a police siren circuit. 

Wait, scratch that last part.

No comments: