RPi project on breadboard effected by inductive coupling? - Page 1
Forum section: electronics / beginners

author: pandemic_virus
author_rank: Newbie
timestamp: December 28, 2013, 05:51:21 pm
content: I've recently got a Raspberry Pi and was working with a simple circuit and project, essentially I have an LED I'm powering up if a switch is open, details on the circuit and software below. Something that I have happening is the circuit appears closed pretty quick. I worked with the switch, jumpers, LED, the breadboard and everything in between in an attempt to see if there was something amiss there, everything appears fine, I noticed that even with the switch and input jumper removed altogether, the circuit would still occasionally see high input on the specific pin. I realized this was happening when I was touching the jumper, or even if I got close to the whole project; although when I had the switch and jumpers installed, I could far "enough" away and I'd still see this issue. I believe the current powering the LED is causing some interference with the input jumper for the switch and some degree of body capacitance might be playing an effect. I believe this is an example of inductive coupling? I lack any tools to measure what's going on, only a DMM which shows the appropriate voltages but is too slow to see those particular wires in the brief period of time.Is this normal, or am I just prototyping this all wrong? The project is very simple:I have high output on one pin leaving the rPi to a breakout board at 3.3v. This powers an LED and returns to ground. I also have 3.3v power being fed to a NO momentary switch (the Omron tactile kind), with the 3.3v returning to an input on the board. The software loops such that if the input is False or low, the LED lights up. The voltages are appropriate for the input/outputs being used. The jumpers are just these cheap breadboard jumpers, solid core 20AWG.Attached is an picture of the project. The Yellow jumper I believe is the problematic one, this is the wire returning the value of the switch.I'm still just beginning the practical electronics journey, so if anyone can shed some light on what I'm seeing, how I might be able to prevent it, or any other useful tips I'd appreciate it. This seems like a simple, electricity 101 problem, but I want to understand the phenomenon more than just "fixing it".

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: December 28, 2013, 06:47:25 pm
content: Have a read on pull-up and pull-down resistors.http://www.youritronics.com/atmega8-protostack-simple-demo/even uses your situation as an example

author: pandemic_virus
author_rank: Newbie
timestamp: December 28, 2013, 07:27:40 pm
content: Ah ha, this makes sense. Essentially digital systems don't have the tolerance for noise that I can expect with analog. I knew it was some noobie stuff, but this definitely helps fill in a bigger picture. When I get back I'll run some numbers and play around with some resistor values and see what I get. Thanks for the direction!

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: December 28, 2013, 07:42:02 pm
content: The issue is the floating input when the switch is open. Consider the following analog circuit. What's the op amp output? Is it 0?

author: pandemic_virus
author_rank: Newbie
timestamp: December 29, 2013, 08:16:02 pm
content: Finally got back around to addressing this, I don't have an op amp in the immediate circuit, but I've got 3.3v going into my switch.I remember reading about the floating input issue, but for whatever reason it didn't sink in. I had a resisitor in earlier for that purpose but it didn't appear to do anything as this issue existed then, revisiting the design shows why it (the pull up resistor) wasn't working as expected. The original circuit was more complex and I trimmed it down to troubleshoot, removed the resisitor for that purpose.We're good now though, I've got more of an understanding of what I'm doing and not doing here. Not a the hardest of lessons, but usually when a mistake is made you tend to remember it easier. Thanks again.

author: Dave Turner
author_rank: Frequent Contributor
timestamp: December 29, 2013, 10:59:11 pm
content: As a matter of principle I'd avoid putting an LED directly between the + & - rails of your breadboard even if that isn't what you are using those rails for; unless the LED has an inbuilt resistor. It's just too easy to forget what you were doing at a later stage and end up zapping things.Where are you applying power on this setup?