Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

NP2 - Wired Button 15ft+ away fires randomly

netduino plus 2 wired button long wire fires randomly

  • Please log in to reply
24 replies to this topic

#1 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 06 July 2014 - 11:48 PM

Hello, I'm still sorta new to the whole electronic hardware portion, but I'm having an issue with what I thought to be a simple project.  I have a button wired to one of my NP2's Digital I/O's, and it works as desired.  The only issue is it also fires on it's own occasionally.  The button is on the end of a 15+ ft wire.

 

Anyone else had this issue?  I've tried several different wiring methods, and all have same/similar results.

 

Anyone have any idea's on the proper wiring method to use?


My doorbell sends me a text message and a push notification, does yours?


#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 07 July 2014 - 05:45 AM

That's what I often mention as "long wiring issue".

A long wire acts as an antenna (roughly speaking), thus any noise, spark or whatever (maybe a lightning in the nearby) relatively close to the wire is "intercepted" and transformed as a little signal into the wire. The Netduino inputs are sensitive enough to catch even a small signal, and toggle the logic read, eventually as false read.

 

I'd suggest to use a shielded cable, where the shield must be the ground of the Netduino, and the core wire is the other lead of the button. That is, the button must short the input to the ground. Invert the logic in the software whereas it's not what you expect.

Do connect the Netduino ground to any suitable "real" ground (e.g. the power plug ground), but do NOT connect to the ground on the other side (i.e. the button side). In other words, the button side should be wired just on the cable: nothing else.

 

That should be enough, but I can't guarantee that the circuit won't catch other strong noise in the air.

I suggest to try, and statistically experience what's going on. If you can, add some trap in the software in order to detect false actions. If you'll see them again over, let's say, a reasonable period of time, you could add some passive part, such a resistor and a capacitor.

I'd add them anyway, but to make your life off from calculations (unless mandatory), just try without R-C filter.

 

Good luck!


Biggest fault of Netduino? It runs by electricity.

#3 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 07 July 2014 - 07:23 PM

I'm not sure what the rules are here about linking to the Arduino forums, but I found a picture of a breadboard circuit that seems to be working perfectly so far for me...  If anyone is interested, I can post a Fritzing Sketch of what I did (I'm still new to it as well), along with the Arduino forum link if I'm allowed...

 

So far, no false interrupts, and still works as desired upon pushing the button.

 

If anyone is interested, this circuit is simply a doorbell button installed outside that's hooked into the Netduino Digital I/O and sends me a text message (along with the wifey) when it's pushed.  It's a non-lighted normally-open doorbell switch purchased from Amazon.  :)

 

Thanks again!


My doorbell sends me a text message and a push notification, does yours?


#4 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 08 July 2014 - 04:23 PM

You need a pull-up or pull-down resistor to avoid this floating state that is delicate.  Assuming your button sends power to the digital pin to say it is pressed, that means you need a resistor pulling the digital pin to ground at all times.  The button will overpower the resistor anyway when it is pressed, but when it is not pressed this setup will prevent false readings.



#5 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 July 2014 - 01:09 PM

You need a pull-up or pull-down resistor to avoid this floating state that is delicate.  Assuming your button sends power to the digital pin to say it is pressed, that means you need a resistor pulling the digital pin to ground at all times.  The button will overpower the resistor anyway when it is pressed, but when it is not pressed this setup will prevent false readings.

 

I think this is what I've accomplished using the schematic I found on the Arduino Forum.


My doorbell sends me a text message and a push notification, does yours?


#6 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 09 July 2014 - 01:15 PM

I shouldn't see why it's not allowed to post a link to the solution, you're most welcome to do so :)


"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#7 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 July 2014 - 01:58 PM

I shouldn't see why it's not allowed to post a link to the solution, you're most welcome to do so :)

 

Ok, here's the link to the post: http://forum.arduino...5258#msg1605258


My doorbell sends me a text message and a push notification, does yours?


#8 Johnnie_Chimpo

Johnnie_Chimpo

    New Member

  • Members
  • Pip
  • 3 posts

Posted 09 July 2014 - 02:03 PM

You need a pull-up or pull-down resistor to avoid this floating state that is delicate.  Assuming your button sends power to the digital pin to say it is pressed, that means you need a resistor pulling the digital pin to ground at all times.  The button will overpower the resistor anyway when it is pressed, but when it is not pressed this setup will prevent false readings.

Yup, this. Helps with sharpening the edge trigger -- reducing or eliminating false readings.



#9 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 July 2014 - 05:20 PM

Yup, this. Helps with sharpening the edge trigger -- reducing or eliminating false readings.

Based on the Arduino link I shared, is that what it accomplished?  Or is that different?


My doorbell sends me a text message and a push notification, does yours?


#10 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 09 July 2014 - 06:54 PM

Based on the link he is using an extra resistor (tan one) and capacitor (orange one) that I think you should do without for now.  The blue one is the only one you need to solve your issue.  The others are for a different issue entirely that you have not mentioned experiencing.  It's worth mentioning that this diagram is opposite of the powered-button and grounded-pin I described... but it will work equally as well backwards like that guy did.



#11 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 July 2014 - 07:29 PM

Based on the link he is using an extra resistor (tan one) and capacitor (orange one) that I think you should do without for now.  The blue one is the only one you need to solve your issue.  The others are for a different issue entirely that you have not mentioned experiencing.  It's worth mentioning that this diagram is opposite of the powered-button and grounded-pin I described... but it will work equally as well backwards like that guy did.

Could you post a Fritzing of what you described?  I think I have it in my head what you're describing, but would love to make sure.  I'm not currently at home to try anything, but will be soon...

 

Also, what size resistor do you think I should use?


My doorbell sends me a text message and a push notification, does yours?


#12 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 July 2014 - 12:00 AM

Attached File  LennySh_DoorBell_Circuit.PNG   89.41KB   0 downloads Does this look right? 

 

I hope something is wrong, because I've got one false interrupt already, and nobody pushed the button outside.


My doorbell sends me a text message and a push notification, does yours?


#13 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 July 2014 - 01:59 PM

I had to switch back to my other circuit because of false interrupts...

 

I'm still not sure why it just works...


My doorbell sends me a text message and a push notification, does yours?


#14 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 11 July 2014 - 07:27 PM

Your diagram is correct, and your resistor seems sized just fine.  This is what worries me:

 

 

 

and nobody pushed the button outside.

 

If you are connecting the same doorbell switch to the Netduino and an actual doorbell chime then you have circuits crossing between the two systems.  You need them separate, either with a fancy switch called a DPDT (double pole, double throw), or by some fancy relay wiring.



#15 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 12 July 2014 - 03:39 PM

Your diagram is correct, and your resistor seems sized just fine.  This is what worries me:

 

 

If you are connecting the same doorbell switch to the Netduino and an actual doorbell chime then you have circuits crossing between the two systems.  You need them separate, either with a fancy switch called a DPDT (double pole, double throw), or by some fancy relay wiring.

It's only the button to the Netduino...  It sends a text message/Pushover notification when pushed.  I want this part working great first before I try to do anything with a chime or anything...


My doorbell sends me a text message and a push notification, does yours?


#16 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 13 July 2014 - 03:12 AM

Then I don't know man, I could probably figure it out if I was there.  I think your problem is something you are taking for granted.  I would test everything again and trust nothing.  Maybe bad connection, something shorted, damaged netduino, damaged power regulator???



#17 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 15 July 2014 - 02:58 AM

Did you find your issue?



#18 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 15 July 2014 - 12:04 PM

Did you find your issue?

Wiring it up to the 3.3v with the two resistors and capacitor like was on the Arduino page works flawlessly...  That's the current circuit I'm using...

 

I just don't know "why" it works, lol...


My doorbell sends me a text message and a push notification, does yours?


#19 Joshk

Joshk

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 15 July 2014 - 11:57 PM

Good deal



#20 LennySh

LennySh

    Member

  • Members
  • PipPip
  • 29 posts

Posted 16 July 2014 - 12:24 AM

Is it safe to hook the 3.3v to a Digital I/O ?  Just making sure...


My doorbell sends me a text message and a push notification, does yours?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.