Pages: [1]   Go Down
Author Topic: VCC/Ground Pulldown For Sensor, How?  (Read 768 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,

Need some basic help; I have an component that behaves differently depending on whether one of its pins is pulled to ground or given +5V. I'm toying with a digital pin on the arduino, the arduino common ground (that the device is grounded to as well) and the device pin. I can't for the life of me figure out how pull this off with just my arduino and a couple of resistors.

Any tips would be appreciated.
« Last Edit: December 09, 2009, 03:16:08 am by jabrooks » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34246
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, We need a bit more information.
What is this component that behaves differently and what pin is it?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a pin for a Maxbotix Rangefinder, that when pulled to ground will tell the rangefinder to stop sending signals. When given this pin is given  ~5 VCC the Rangefinder starts again.

I want to control this pin with a digital pin from my arduino.

What is the best arrangment to allow the pin to easily pull to ground, but to also access the 5 VCC when the I write the digital pin on the arduino high?

Thanks.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34246
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Simply wire this up to an arduino pin, no resistors involved.

Set the pin as an output in the software and write to it HIGH or LOW to change it from +5V to ground.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Grump_Mike,

I hadn't been writing the pin as an output in the software. However this brings up another question; if I call all my digital pins outputs, and write them all as low, my RX pin (0) and my TX pin (1) are still high. Could this be because I am plugged into a computer?

Thanks again.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

jabrooks:

Quote
Could this be because I am plugged into a computer?
Indirectly. The answer is in section 13.3.3 of the datasheet.  The Arduino uses the USART to communicate with your computer when serial communication is initiated by the Serial.begin() function.  When the USART is initiated the Rx and Tx pins are no longer configured as normal I/O pins and the pinMode() and digitalWrite() commands won't have any effect on those pins.

Don
« Last Edit: December 09, 2009, 03:51:43 pm by floresta » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34246
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Using pins 0 and 1 is tricky because it uses the pins normally used to communicate along the serial port. These lines are connected to the USB / Serial chip through resistors so it is possible to pull them high or low. However you will have to disable the serial mode that the software defaults to before they will respond to a simple digitalWrite(). It is best if these pins are left unused unless you are operating in a stand alone mode because things attached to them can hamper the downloading of of sketches.
Logged

Pages: [1]   Go Up
Jump to: