Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: qfiffle on February 10, 2011, 02:03:49 AM

Title: Mousey circuit - no current flowing
Post by: qfiffle on February 10, 2011, 02:03:49 AM
I have just breadboarded the "mousey" circuit from http://makeprojects.com/Project/Mousey-the-Junkbot/27/3 (http://makeprojects.com/Project/Mousey-the-Junkbot/27/3). I am not very experienced with electronics yet, but am certain I have the circuit right (now). I rebuilt it from scratch when I first couldn't get it to work (no voltage measured) and found a mistake, but the new version seems right and I've had a friend check it too. At some stage in my first attempt there was a short circuit (a battery got very hot), and I'm worried it destroyed the op-amp or relay (I don't know if that's likely or not, or how to check.) I can't easily replace them just to check, as my local electronics shop does not stock them, and it would take more than a week to order online.

I have tested the motors independently, and they work. The power LED comes on. The "eyestalks" seem to work, as the voltage to the motors changes depending on whether I shine a flashlight at one of the eyestalks or not. Without a flashlight, each motor gets equal voltage (4.5V from a 9V battery). But the motors do not turn at all, and when I measure current in that part of the circuit, there is none. When I hook the whole circuit up to a variable power supply, extremely minimal current flows at all (I guess it's just powering the LED and the rest of the circuit is getting skipped.)

So my questions are:
Has anyone else had this problem with this circuit and has any idea what it could be?
Is it possible I fried my op-amp or relay, and how can I tell?

One last possible issue: the circuit diagram shows an 8-pin 5V DPDT relay. I could only get a 10 pin one, but it is still DPDT and 5V. (This one: http://www.goldmine-elec-products.com/prodinfo.asp?number=G2011 (http://www.goldmine-elec-products.com/prodinfo.asp?number=G2011)). From the datasheet it looks like pins 5 & 6 are n
Title: Re: Mousey circuit - no current flowing
Post by: qfiffle on February 10, 2011, 02:05:50 AM
Sorry, somehow that cut off my last sentence: it should have read

"pins 5 & 6 are not wired to anything, so I just left them as is and connected the other 8 as though it was an 8-pin relay. Could that be my problem?"
Title: Re: Mousey circuit - no current flowing
Post by: rbtying on February 10, 2011, 03:11:27 AM
Use a battery that can actually drive the motors: 9v batteries are notorious for low maximum discharge current limits, so they can't really drive a motor at all.  If you're reading the right voltages at the motor terminals, then it ought to be fine.

Since you've got an extra relay in your 10pin relay, try swapping one of the sets over to that one - it should account for relay failures.  Also, try hooking up the relays separately to see if they are properly outputting voltage to the motor terminals. 

If your op-amp is fried, the voltage variance when you move a flashlight over the sensors will be really small to none. 

If you set up your relay separately, you can test if it's latching properly.  Alternatively, measure the potential difference between the motor terminals connections (on the relays) after removing the motor, to see if they're outputting the right voltages.  You could also try installing a high-wattage power resistor (or another load) between the relays in place of the motor, and then measuring current from your power supply.
Title: Re: Mousey circuit - no current flowing
Post by: qfiffle on February 10, 2011, 03:31:44 AM
Thanks for those suggestions. I'm actually using a variable power supply now that I have fried enough batteries that they became uneconomical :) So even when I turn the voltage up much higher than 9V, I'm not getting any current flowing through the motors.

That's a good point about the op-amp: guess it's fine, then.

I'm afraid I don't quite understand what you are saying about the relay. I don't think I do have an extra relay - the diagram on the datasheet makes it look as though those last two pins aren't hooked up to anything at all. I basically have the thing on the top line of this image: http://html.alldatasheet.com/html-pdf/197272/OMRON/G6HU-2/924/6/G6HU-2.html (http://html.alldatasheet.com/html-pdf/197272/OMRON/G6HU-2/924/6/G6HU-2.html). Am I misinterpreting it?

I really am a bit of a newbie, and haven't used relays before, so I'm finding it hard to visualise the test set-up you are suggesting with just the relay and motors. Do you mean I'd leave the motors connected to the relay as they currently are, but instead of having the op-amp output connected to them, attach that wire directly to the positive pin of the power supply? And then the transistor + capacitor + resistor bit of the circuit that is currently connected to the relay as well - should I take that out and just have that pin go directly to ground? I'm not 100% certain what the transistor is doing in this circuit - but I guess it isn't essential for running the motors (?)
Title: Re: Mousey circuit - no current flowing
Post by: qfiffle on February 10, 2011, 04:18:57 AM
Well I set up the simplest mini-mousey circuit I could with just the motors, the relay and the battery. If I number the pins on the relay 1-10, the positive terminal of the battery was connected to the positive terminal of each motor, and the negative terminals were connected to pins 2 and 9 on the relay. Pins 3 and 7 on the relay were connected, and pins 8 and 4, in the crossover wiring from the original circuit. Pins 4 and 1 were both connected to the positive terminal of the batter, and pin 7 was connected to ground.

One motor turned (the one connected to pin 2), and the other didn't. I swapped them over, and the one that hadn't been working did work when it was in the other's position. I wasn't sure if this was normal (though I suspect not). So then I put in the "bump switch" mini-circuit, with the capacitor, transistor and resistor. This didn't work as expected either. Once that was in, the motors did nothing until the bump switch was on, then the motor connected to pin 2 spun and the other didn't.

Then suddenly the motor stopped working and now neither motor will spin no matter whether the bump switch is on or not. I went back to the simple circuit, and still nothing. I'm not measuring any voltage drop across either motor any more. But they still both work fine when connected to the battery directly rather than via the relay.

This all sounds to me as though the problem IS with the relay. Is that what it sounds like to you?

Many many thanks for any help!
Title: Re: Mousey circuit - no current flowing
Post by: rbtying on February 10, 2011, 08:45:12 AM
It does sound like your relay is having some problems.  Is it possible that it wasn't designed for the amount of current you're passing through it?  It might just be burning out (or, something after the relay is shorting it out). 
Title: Re: Mousey circuit - no current flowing
Post by: qfiffle on March 13, 2011, 10:07:28 PM
Finally got my replacement parts and with a new relay and LM386 it works great. (Turns out both parts were problematic). The bump switch still isn't working as it should, though - no reversies. But at least the motors will run now!