Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Unable to Send Logic Low

Status
Not open for further replies.

LiquidKernel

New Member
Hello everyone. I am working on a design where something triggers a relay which feeds a ground to me. In the schematic below, this is what's going to the IN pin. My AVR then detects that as being low (due to it being high biased by default) and does what it needs to.

Now, if I take that IN pin and send it to the ground of the AVR or the voltage regulator, the Atmel sees it as being sent low and it works just fine. However, the ground that the relay triggers, seems to carry a resistance. I can ring that ground (@ IN) and the one the AVR or VR uses, so it does conduct fine. However, if I measure it's resistance I get between 1ohm and 3ohms. Given R1 is ~10k, I would think that PB0 (on the Atmel) should still be sent low in the event I hook up the "ground."

So, here is the idea I had. Since I can use that "ground" and a 5V line to turn on something like an LED, why not use that to turn on a device(perhaps a logic gate?) that will then send the AVR's input high (the code can be changed, but the input that comes to "IN" cannot)?

Does anyone have any ideas for this?

**broken link removed**
 
It sounds like your problem is that you have 2 separate "ground" nodes. To get the relay to pull the IN line low the relay ground needs to be connected to the AVR ground otherwise there isn't a complete circuit for current to flow.
 
I figured that. But I can't do much to alter the design of the trigger (the relay). I need to go around that one way or another.
 
If you add how the relay is connected to your schematic it would help. If you can turn an LED on there should be a way to get your circuit working.
 
bmcculla said:
If you add how the relay is connected to your schematic it would help. If you can turn an LED on there should be a way to get your circuit working.

**broken link removed**

This problem could be easily solved if I wired my circuit to the ground of the relay, however, I have no such luxury.

I could of course have that "ground" trigger another relay that would switch one of my "real" grounds to the AVR... but that's over-kill in my opinion.
 
How about a cheap opto-isolator? These are just a LED and a phototransistor in the same package. When you turn the LED on the Phototransistor turns on and can pull your pin low. If you know how to make the Relay setup turn on an LED on just do the same with the opto-isolator.
 
bmcculla said:
How about a cheap opto-isolator? These are just a LED and a phototransistor in the same package. When you turn the LED on the Phototransistor turns on and can pull your pin low. If you know how to make the Relay setup turn on an LED on just do the same with the opto-isolator.

That's a pretty good idea. Do they drain a lot of current? I have a 100mA regulator and some 30mA is already drained by the AVR when it's running, don't want to over-load the regulator (TO92 package, no heatsink possible).
 
Nevermind; just realized the opto-isolator/coupler is nothing more than an LED w/ a phototransistor. So I can actually even use the 12V line I have available and put a 470ohm resistor to the optocoupler's LED and then that to my "ground" trigger. Viola!

Going to give this a try. Big thanks for the idea! I completely forgot about optocouplers.
 
For the opto LED enough 5...15mA.
 

Attachments

  • ground2.png
    ground2.png
    11.7 KB · Views: 533
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top