Saturday, January 1, 2011

Chapter 5 - Exercise 32 Still Drivin' Me Crazy!

This circuit is still driving me up the wall... I triple-checked all my connections, but I'm fairly certain the connections are done properly as the motor behaves somewhat correctly - it spins forward until a microswitch is pressed and then reverses direction... but only for a split second.

I used my logic probe to check the pulse on pin 3 but I'm honestly not 100% sure what I'm looking for...

One thing I did do that puzzles me - I unplugged the motor as it's quite loud and was making it difficult to hear the relay switching... when I did this and I turn on the power, I don't hear the relay doing anything, but when I press a microswitch, I hear the relay click (once) indicating that the coil is getting power and reversing the direction of the motor... but when I release the microswitch, I don't hear the click indicating the relay has switched back... but when I release the power button, I do hear a click. Maybe this is normal, but I'm wondering if somehow the relay is not functioning properly.

I've about decided to move on - I'll puzzle over it later tonight, maybe tomorrow... but if I can't find a solution, I'll move forward as I think I've gotten out of the experiment all I can.


  1. I have not got this far yet, and so this may be very useless advice, but:

    I've already been bitten by one bad pinhole in the quick protoboards... try shifting some of the leads into a neighbor hole on that row.

    Also, I would use the relay to power something else (an LED?) as an problem-cause elimination test.

    If you sourced your own relay, I would check if it is the type which remains on when triggered, or if it reverts to off.

  2. Good suggestions, all of them, Scott.

    I'll examine the protoboard and try out a few key wire changes... but the relay does match what is needed for the exercise if I read the data sheet correctly... but it's not supposed to remain triggered except that the coil is supposed to be powered for a few seconds (maybe 5 at most) as pin 3 provides a pulse to it and then turn off, allowing the motor to continue to spin forward.

    But I'm pretty certain the circuit is working as desired... motor spins in one direction until a microswitch is pressed, then it reverses. I still think it has something to do with either the capacitors and their charge time OR the 555 chip is bad (but I've substituted 2 others in with no changes) or I'm simply missing something.

  3. Oh yeah, capacitor could be off as you say (makes sense, and I'm not experienced enough to have immediately thought of that).

    I think caps will ground some current only until they are "full", so you could attach a speaker or (resistored LED) to the negative of the cap. If the noise or light cuts out too soon, that might narrow it down. I don't fully understand theory, but that could suggest the capacitor (or something leading up to it, such as the cap's input voltage?).

    Keep up the blog - you're doing a great job here. This is an awesome book and it deserves a walk-through like yours.

  4. This comment has been removed by a blog administrator.

  5. I've come back to this project after several years. I finally got the little bugger up and running. I thought I'd go back look to see what your experience was with it. And, Oh. My. God! Your troubles with the circuit mirrored mine exactly. I never did get it to run perfectly but it does a pretty good job bumping around the house. It's still just a little glitchy. Here was my approach to the problem: I figured that the inductance of the relay coil and the DC motor probably had a lot to do with the obstinate behavior of the circuit. It worked just fine when the motor wasn't connected. With the motor disconnected the monostable 555 circuit timed out perfectly whenever I hit the switches, but with the motor attached, pfft!...completely unreliable. It behaved just as you described. So I added diodes across the relay coil and in line with the trigger pin. I put noise bypass 0.1 uF capacitors at the motor leads and at all the relay switching lines. That helped enough to get it up and running more or less, but not perfectly. I tried a regular bipolar 555 and a CMOS 555. The CMOS 555 works best. I've come to believe that the real problem is with the power supply. I'm using 4 AA cells for a total of 6 volts battery power supply. I strongly suspect that the motor is causing a big voltage drop when it reverses and that is what's causing the 555 to glitch out. Platt says he used a voltage regulator circuit with his system. I think that's why his runs properly but ours runs like crap. Anyway I'm done with this project so I can't say for sure. I haven't tried it with a voltage regulator added to the circuit. I'm moving on. This was a great project for learning how to fabricate with plastic. I got a heating element from TAP Plastics and made a plastic sheet bender from plywood and foil and fiberglass cloth according to the instructions they provided. It worked really well and didn't cost much at all.

  6. So here is what finally worked for me. I used a 6V power supply (4AA cells). It works reasonably well but the motor runs slowly. I added a 5 Volt regulator circuit (L4940V5 low dropout) which provides just barely enough voltage out of the 555 to run my 5V relay coil. Most importantly I added a 0.1 uF capacitor immediately between the two motor power supply contacts right at the relay junction points. This was key. Electrical noise generated by the motor as it switched from forward to reverse was playing havoc with the 555 so that the monostable circuit would never run consistently. It has run well after adding the voltage regulator and the capacitor. I also put a reverse biased diode across the relay coil to shunt induced voltage to ground to protect the 555 from back EMF. Once I did these things it really didn't matter if I used a CMOS 7555 or an old school bipolar 555. Both worked fine. Other things I'd change. I'd probably try using a higher power supply voltage like a 9V battery so that the motor will run faster. The chassis as it is designed in the project is a real low rider. It catches up on rugs and uneven surfaces. If I were to do it over again I'd use larger diameter wheels and set them low so that the chassis had better clearance. Also, make sure that the front wheel doesn't stick out beyond the microswitch levers. My car tends to hit the wheel first instead of the switch levels and it gets stuck without reversing when it should. All in all I learned a lot about circuit design and fabrication. My little car doesn't work perfectly but it was well worth the effort.