Older blog entries for ericzayers (starting at number 10)

The Billy Bass hack is coming along nicely.

  • I modified my PIC programmer with a 10 pin header in order to do In Circuit Serial Programming (ICSP). I like this much better than a boot loader, but I have to figure out if I can isolate the programming pins from the rest of the circuit. I've been programming the chip directly on my breadboard.
  • I've isolated the motor control parts of the circuit and broken them out to my breadboard.
  • I turned a 10 way switch into a voltage divider that I can read on one pin with the PIC's A/D converter. Right now, all the '819 is programmed to do is read the switch and turn some LEDs on to display the output of the switch.
  • I wired up the ISP Chipcorder chip on my breadboard and built the reference application circuit from the datasheet using all the parts I have.
  • The op amp chip that Marty Vona used is now a hard to find part. I hooked it up to a very common LM386 audio amp to the speaker output of the Chipcorder. The sound quality coming out of that thing is really poor. I'll have to figure out how to jazz it up a bit. I'm not really sure what I'm doing with this audio amplifier stuff. I think I will have it drive a PNP and NPN transistor to make a push-pull type of circuit to drive the speaker that I got from the 'techlib' web site.

I really ought to spend some time now to draw up the circuit in Eagle, but I love to solder, so it is hard to resist the temptation to lay down some circuitry.

I found some new stepper motors for the Linefollower robot on eBay that advertized "high torque". What have I got to lose? If these motors are high enough torque, then I might not have to build a gear train after all! However, these steppers are bipolar, so I won't be able to use the darlington array I have now and change to use an H-Bridge. That will mean an extra chip on board to control both motors.

My line sensors seemingly failed again after all this. I believe I was running them with too much current. OK. I am positive of this. One LED looked brown when I looked down into it. Another had actually cracked under the heat shrink. I replaced the 2 that were not working and now the readings are off. Replaced the 3rd IR LED with a part from the same soure and line detection works very well now.

I am taking a break from building the line follwing robot. The next thing is to build an improved drivetrain. The time I have to work is 4:30-6:30 am when the rest of the family is asleep. From past experience, I need to be a little more exact in my measurements, so I will have to come up to speed on some kind of CAD package so I can print out blueprints and spray mount them onto the pieces I am drilling on.

The church fall carnival comes up soon (End of September) and I want to hack Billy Bass first. I took Billy apart last night. The mouth motor isn't functioning and I need to track that down and try to fix it. I am converting Marty Vona's 8051 design to use a PIC 16F819. I'm having to consolidate a few dip switches to be read by a single pin w/ an A/D converter to make it fit onto the 18 pin PIC. Microchip has the outline of how to do this in their "Tips and Tricks" document. Wish me luck!

I drove down I-85 in North Atlanta and saw a sign for Fry's Electronics. Could it be true? Is Fry's coming to Atlanta? Their web site says nothing about it.

And the answer is that the tri-state register bit for AN0 was not set to 1 (high impedence). Things work much better now. I ended up with a 10K resistor between ground and my IR sensors. I lowered the current through my IR LEDs significantly with a higher value resistor and it still works fine, so I soldered it all back together and I'm detecting lines now.

If nothing else, at least I now have lots of useful test points on my board.

17 Aug 2004 (updated 17 Aug 2004 at 11:16 UTC) »

I've been working off and on for the past 2 weeks on the reading of the IR sensors on my line following robot. I took a break to add counters to my web pages and build a TV antenna. I've learned a lot about op-amps in the mean time and wired one up, hoping that would help.

After lots of debugging work and lots of suggestions from the AHRC mailing list, I have found a vital clue. My IR sensor circuit works great... that is, until I hook the output to the a/d input pin on the processor. I'm out of time to debug this morning, but now I have something more solid to go on.

The microphone pre-amp worked out great! I tested it out on my home stereo, then took it to church with me on Sunday and the guy that runs the sound board was trusting enough to plug it in. It could possibly be improved by adding a potentiometer to control the preamp gain, but works well enough. I'll definately try printing more circuit boards in the future. I bought some surface mount parts from 'nfceramics' on eBay.

28 Jul 2004 (updated 28 Jul 2004 at 13:58 UTC) »

Yesterday I etched my first PCB. I want to design my own for a Billy Bass Hack, but for my first try, I thought I would go with a pre-engineered circuit: A microphone pre-amplifier. I used the "toner transfer" method popularized by Tom Gootee. At first I tried cheapo inkjet photo paper from Office Depot and it was pretty much a disaster (couldn't get the paper off of the board.) So I broke down and drove the extra distance to Staples to get the paper that Tom was so excited about:

Staples' SKU (Item Number) for the "Picture Paper" (30-sheet package): 471861

If you have tried the toner transfer method before but not used this paper, it is worth another try. It gave me wonderful results. The only glitch I ran into was that it looked like the copper wasn't coming off in one place, so I grabbed a paper towel, soaked it in etchant (wearing rubber gloves, of course!) and rubbed at it. That last bit of copper just wouldn't come off! Then, after about 4 minutes, I took a closer look: It wasn't copper at all - it was some kind of company logo printed on the fiberglass board. Duh... So now I have one trace that I rubbed through and will have to solder back together.

I think I am going to like making PCBs a lot better than point to point soldering prototypes. As much as I like soldering, I hate trying to hold everything still while the solder is flowing and cooking the PVC on my wires.

The line following robot circuit is complete. I have tested the flashing of the IR leds and the A/D detection circuitry. Left to go are:

  • Attempt to build Drivetrain #3
  • Detect a line
  • Control logic to steer the motors to follow the line.

Building drive train #3 I have gotten more sophisticated. I got a center finder so that I can accurately make a hole in the center of the wooden wheels I first bought. Then I found a piece of hardware at the local ACE hardware that makes an excellent wheel hub and attaches to a 5/32 piece of piano wire for an axle.

As for building the gear train, I asked for donations of old printers/fax machines at work and now have gotten 10 devices. I have yet to take apart 8 of them. I'm sure there is a matching set of suitable gears in there somewhere.

I bought a Brother HL-5140 laser printer. After a lot of fussing and cussing I got it to work under RedHat Linux version 9 using the 'gimp-print' driver and cups. It works pretty well - I'm happy with it.

I made a web page for my line following robot project:


I built a little gear train to go with the motor. It kind of sort of works (there is a quicktime animation on the website so you can see what I mean.) Unfortunately, one wheel is larger than I wanted my entire robot to be.

I'm not sure about the line following circuit. I'm planning to flash the IR leds in sequence and then measure the current on the A/D converter. If anyone has some suggestions on that part of it, I'd be grateful.

Hey montmoney, here is a good intro to electronics including a demo on how to get started with a solderless breadboard from www.play-hookey.com:

solderless Link to breadboard intro project

My voltage regulator problem returned. Did you know that they work much better if you don't solder them in backwards? Now I'm using wire-wrap style wire for signal circuits (but still solder it). Boy - that makes things a lot easier to work with.

I'm using the little Epson stepper motor from All Electronics that costs just $1.25. Unfortunately, it's too weak to turn a 1 1/2" wheel by itself. I need to gear it down, possibly gear it down a lot. But now i'm determined to get this working so I'm going to keep at it.

Ah Ha! It was a bad voltage regulator! That was problem #1. The second problem is that I'm using a 16F876A configured for LVP and I was trying to use one of the pins on port B as a general purpose I/O and I think it keeps resetting the circuit. If I leave that pin disconnected, the logic behaves better (but of course, I can't control that coil on my stepper motor!)

The WM Berg Grab Bag was 19 lbs and ended up costing about $37 with shipping included. I got lots of dowel pins, a lot of nice gears of different types, set screws, nylon screws, and assorted other stuff (anyone need a 90V electric brake?) I think it was a pretty good deal, but now I know I have a lot of stuff I'll never use, or maybe will only be good for ballast. Anyone need 3/32" x 1/2" dowel pins? I've got lots to spare.


I am having some kind of problem with the line following project. I took the circuit off the breadboard and wired up one stepper motor and it seemed to be working fine. I wired up the second one and now it is just flaky.

I took my latest work to the AHRC meeting and got lots of good advice - use 30awg wire wrap wire, ground my digital and motor logic differently, use a crystal oscillator, not a resonator, bump up the voltage on my battery pack (add another battery). I still think the voltage regulator might be bad - it was all working before (sniff!)

I mounted the motors on some plastic I cut from the Lanier copier with my table saw. A table saw cuts plastic really easily :-) I'll make a new web page for this project soon.

1 older entry...

Share this page