Thursday, October 7, 2010

Chapter 5 - Exercise 32 Debugging


Suggestions are coming in on ways to test or fix the problems I'm encountering. Let me explain what's happening now.

I've inserted the diode that j suggested... works! The buzzing has disappeared (see video below). So we're getting close. Right now, pushing either switch (that will serve the robot as a trigger to stop and back away from an obstacle) does not stop the motor from spinning - pushing either button is SUPPOSED to cause a drop in voltage on pin 2, so I think my next step is to use a chip tester to see if pin 2 is being triggered. (Right? No?)

I'm including some pictures here - one is the schematic and the rest are close-up photos of my circuit - maybe I've got an unseen error in my wiring. Be warned - my use of the breadboard is obviously that of a newbie, so I've got wires running all over the place. If I can't figure this out soon, I think I'll start over and try to rewire a bit cleaner and closer to the layout of the schematic.

Thanks in advance for all your comments and suggestions - I love learning by doing... and making mistakes is another favorite technique of mine as I tend to remember what I did wrong versus what I did right... and that's what drew me to this book in the first place!

First video below is WITHOUT the diode.



Second video is WITH the diode.




(FYI - family visiting this weekend so I may not get much more work done on this circuit until early next week.)

6 comments:

  1. It's hard to tell from the photos whether all the wiring is correct but I think you have a definite problem with the relay wiring.

    You appear to have the motor connected between pins 6&11 instead of 4&13 (& vice versa)
    See http://twitpic.com/2w5x3s for numbering.

    If you add the diode it should be connected across the coil (Pins 1&13) and not in-line with the connection to IC1 pin3. Looking at the picture it doesn't appear connected anyway as it is shown connected to the non-existent pin 15.

    ReplyDelete
  2. ... *cough* obviously I meant pins 1 & *16* for the coil.

    See http://en.wikipedia.org/wiki/Flyback_diode for an explanation of why the diode might be used and which way round it should be connected.

    ReplyDelete
  3. After looking at that Twitpic, I think you're totally correct about my wiring of the relay - will take a look at that shortly. Thank you!

    ReplyDelete
  4. Ooops again.
    I changed my original picture to reduce the amount of rework you needed to do but this would actually result in the motor running in reverse until a microswitch is activated. For numbering that actually matches the circuit see the picture at http://twitpic.com/2w5mlf

    ReplyDelete
  5. As an afterthought. While the motor direction may not matter in a tabletop exercise if you planned using it in a real robot situation you might prefer to choose the option where the coil is not energised by default. Thereby reducing power consumption by that last little bit.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete