Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Jdog on March 15, 2009, 03:39:16 PM

Title: Cheap tilt sensor
Post by: Jdog on March 15, 2009, 03:39:16 PM
I found this instructable which might be beneficial to some people on this sight.
http://www.instructables.com/id/Five_cent_Tilt_Sensor/ (http://www.instructables.com/id/Five_cent_Tilt_Sensor/)
Although, I don't like the way he wired it. I would personally recommend wiring positive to the nickel, negative to a 10k resistor and to the nickel, and then each corner pin to a digital input. I think that makes more sense.
Title: Re: Cheap tilt sensor
Post by: Razor Concepts on March 15, 2009, 03:54:59 PM
You don't need a 10k resistor, or have positive connected. Just connect the nickel to ground and the pins to the digital inputs and treat them as buttons.
Title: Re: Cheap tilt sensor
Post by: Jdog on March 15, 2009, 04:10:23 PM
Every time I've seen a button I've always seen it with a 10k resistor.
Title: Re: Cheap tilt sensor
Post by: airman00 on March 15, 2009, 06:31:46 PM
Every time I've seen a button I've always seen it with a 10k resistor.


Probably because the resistor is when you want a Pull-Up or Pull-Down design - meaning the input pin will constantly be HIGH or LOW until the button is pressed, in which case it becomes the inverse logic value( constant HIGH would become LOW , etc.)
Title: Re: Cheap tilt sensor
Post by: Razor Concepts on March 15, 2009, 06:40:46 PM
With AVRs you can just enable an internal pull-up resistor in the programming.
Title: Re: Cheap tilt sensor
Post by: Jdog on March 16, 2009, 08:08:48 PM
Every time I've seen a button I've always seen it with a 10k resistor.


Probably because the resistor is when you want a Pull-Up or Pull-Down design - meaning the input pin will constantly be HIGH or LOW until the button is pressed, in which case it becomes the inverse logic value( constant HIGH would become LOW , etc.)

Oh that makes sense, I always wondered why they did that.