Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: mango1 on August 25, 2008, 05:01:13 PM

Title: HERBIE/JUNKBOT/MOUSEY!!
Post by: mango1 on August 25, 2008, 05:01:13 PM
lots of names for it but they all use the herbie circuit: http://downloads.solarbotics.net/misc/herbie1.gif

I'm trying to make the circuit above but am having some trouble. Only the left motor is running and it doesn’t seem to be sensitive to light. I am actually using phototransistors instead of photodiodes but I read that they’re the same (unless I was told wrong).

here is a paint drawing of my beadboard and what the circuit looks like:

http://i530.photobucket.com/albums/dd341/baller56844/breadboard90-1.png
 
now here is the real life circuit:

http://i530.photobucket.com/albums/dd341/baller56844/DSC08524.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08525.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08526.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08527.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08528.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08529.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08530.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08531.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08533.jpg
http://i530.photobucket.com/albums/dd341/baller56844/DSC08534.jpg

also, I just want to make sure my phototransistors are being put in right. I have it so the emitter is on the top and the collector on the bottom. Here is a picture to clarify:

http://i530.photobucket.com/albums/dd341/baller56844/DSC08535.jpg

any help would be appreciated! thanks :)
Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: paulstreats on August 25, 2008, 05:12:04 PM
Just a quick look...

 You seem to have gotten the way the trimpot and phototransistors are wired up wrongly. Judging by the paint picture and the picture from the solarbotics website.

 Look at the 2nd pin down on the left of the LM386. On the solarbotics picture its connected to both the trimpot and a photodiode wheras in your picture its connected to just a phototransistor.

 I havent checked the rest but looking at this mistake I would recheck the entire layout.

 Also 1 pin on the trimpot needs to be connected to both of the phototransistors....
Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: mango1 on August 25, 2008, 05:26:24 PM
ahh I had drew it wrong. The wire from the second one on the left was suppose to be on the bottom.

here is the correct version: http://i530.photobucket.com/albums/dd341/baller56844/breadboard90-2.png
Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: paulstreats on August 26, 2008, 01:25:14 PM
The top pin on each phototransistor also need joining together
Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: RobD on August 26, 2008, 04:55:59 PM
Quote
Also 1 pin on the trimpot needs to be connected to both of the phototransistors....

**edited to add:  as long as both flat sides of the phototransistors are facing the same direction.  It looks like they are but It's hard for me to tell.  **

actually....  it looks like your trimpot is not oriented right.  Look at the two closely spaced pins on the trim pot - one pin each should go to the top side (opposite the flat side) of each phototransistor.  The wiper (center pin) should be attached to the flat side of each phototransistor; shared.  That should solve the problem.  Sorry for all the edits haha!

You are only using the direct output of the right motors phototransistor.  The resistor isn't really doing anything in this setup.

Rob
Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: mango1 on August 26, 2008, 08:10:22 PM
Hi Rob,

glad you found my post here! I was gonna send you a msg to tell you I started a new section (since im no longer using the tpa81). You seem to be my only hope haha!

So I redrew my schematic based on what you wrote. Hopefully I understood everything correctly.

here is what I HOPE will work: http://i530.photobucket.com/albums/dd341/baller56844/breadboard2.png

how does that look?

Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: mango1 on August 27, 2008, 11:12:16 AM
so after lots and lots and lots and lots of research....I found a breadboard to show me how to wire it!

I uploaded it here: http://i530.photobucket.com/albums/dd341/baller56844/1c7d9c20.gif

The circuit seems to be working now. When I flash a flashlight on the sensors I can hear the speed of the motors change.

my only problems/concerns are:

The breadboard schematic shows 1 wire from both motors going into the same hole. So I twisted them together and kinda pushed them in. Is that ok?

also, my other issue is that 1 motor still spins faster than the other. Is there any way to fix this?

Title: Re: HERBIE/JUNKBOT/MOUSEY!!
Post by: RobD on August 27, 2008, 12:47:45 PM
Quote
The breadboard schematic shows 1 wire from both motors going into the same hole. So I twisted them together and kinda pushed them in. Is that ok?

I'm sure it's fine.  Those five pins in the right row 11 are all connected together so you can put the wire in any of them if you want.

Quote
my other issue is that 1 motor still spins faster than the other. Is there any way to fix this?

How do they run in complete darkness? Maybe a resistor between the collector an the trimpot.  Try different values maybe starting small and working up.