Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: Best Way to Split 5V Source? on: February 23, 2012, 07:07:56 pm
Quote
I'm working on replacing a system in which bad grounding issues are far too common
Mistake.
Fix the problem instead.

Bad grounds are a minor part of the problem. The system is 40+ years old, reliability is awful, and the wiring has been messed with by so many different people over the years that replacing it is the only option. The current system isn't even manufactured anymore, and nobody can repair the control panels anymore.

Fixing the problem at this point means replacing it entirely.
2  Using Arduino / General Electronics / Re: Best Way to Split 5V Source? on: February 23, 2012, 03:41:05 pm
I'm trying to avoid using a common ground between the switches, honestly. I'm working on replacing a system in which bad grounding issues are far too common, which is why I'm trying to avoid using a common ground.

Currently on the prototype, I do have pull-down resistors on each input pin, and every switch COM terminal is wired into the 5V power rail on my breadboard. On my final design draft, the pull-down resistors are also included. So I'm just trying to figure out the least messy way to distribute power to every switch. Terminal block perhaps?
3  Using Arduino / General Electronics / Re: Best Way to Split 5V Source? on: February 23, 2012, 03:31:12 am
http://oi41.tinypic.com/72angm.jpg

Excuse the messyness, it is 3:30am smiley Basically, all common terminals wired together on the same 5V line, NO terminals go to their respective digital input pins.

Yay or nay?
4  Using Arduino / General Electronics / Best Way to Split 5V Source? on: February 23, 2012, 02:34:39 am
Hello everyone,

Within my current project I am working on, I have 6 microswitches. All of these switches need to receive power, somehow. My problem is, I only have a single 5V line, coming from the Arduino. I need a way to split that 5V line to all the switches. Should I splice into the 5V line 6 ways, that'd be pretty messy. Or would it be a better option to take the 5V line, and run it to every switch terminal in series?

Just need a little advice, would running the 5V line from switch terminal to switch terminal work?
5  Using Arduino / Programming Questions / Re: Microswitch reading as both low and high? on: February 13, 2012, 07:19:32 pm
Quote
I have 5v connected to the common contact, and my digital input connected to the normally open contact.

You have what is called a 'floating input pin' condition when the switch is not being operated. A floating input reads not as a valid high or low, but rather switches around with electrical noise. You need to add a pull-down resistor from the digital input pin to ground, anything from 1k - 20k ohms would be fine. That will supply a valid low signal when the switch is not operated.

Lefty


Okay, that makes sense. So I should add the resistor to ground, attached to the digital pin. What's the best way to go about that? Should I splice the resistor into the input pin wire, attach that to ground, and attach the digital pin wire as normal?

I appreciate the help! smiley-grin

 That would work, but whatever works out easier for you. You could wire it from the normally open contact and any shield ground pin.

Just added a pull-down to my breadboard (10k), on the same rail as the digital input, going to ground. My solid state relay now turns it's AC load on reliably and stably, instead of intermittently which is bad for the motor. This solves my biggest issue with my current project, thanks for your help!
6  Using Arduino / Programming Questions / Re: Microswitch reading as both low and high? on: February 13, 2012, 07:05:59 pm
Quote
I have 5v connected to the common contact, and my digital input connected to the normally open contact.

You have what is called a 'floating input pin' condition when the switch is not being operated. A floating input reads not as a valid high or low, but rather switches around with electrical noise. You need to add a pull-down resistor from the digital input pin to ground, anything from 1k - 20k ohms would be fine. That will supply a valid low signal when the switch is not operated.

Lefty


Okay, that makes sense. So I should add the resistor to ground, attached to the digital pin. What's the best way to go about that? Should I splice the resistor into the input pin wire, attach that to ground, and attach the digital pin wire as normal?

I appreciate the help! smiley-grin
7  Using Arduino / Programming Questions / [SOLVED] Microswitch reading as both low and high? on: February 13, 2012, 06:37:56 pm
This is my first post, so hello everyone!

I'm really at a loss. I have a microswitch, which is true to this diagram. I am using the Bounce library, the change example. When I try to get input from the switch, the controller detects it as active when it isn't. I have 5v connected to the common contact, and my digital input connected to the normally open contact.

For anyone unfamiliar with the Bounce code:

Code:
void startSweep(){ 
int sweepRelayValue = LOW;
 
  if (resetBounce.update()) {
     if (resetBounce.read() == HIGH) {
       if (sweepRelayValue == LOW) {
         sweepRelayValue = HIGH;
       } else{
         sweepRelayValue = LOW;
       }
       digitalWrite(sweepRelay, sweepRelayValue);
     }
   }
}

It's only slightly modified from the original bounce example. Instead of 'LED', the variable to switch on is 'sweepRelayValue', and 'button' is 'resetBounce'. I've tried different switches of the same kind, and adjusting the software in all sorts of ways. This must be one of the times I"m overlooking something small, or just doing it wrong. Any help would be appreciated, thanks!
Pages: [1]