View Full Version : wiring and installing a sensor
HuskieRobotics
03-03-2004, 13:28
we need to know where the sensor wires need to be placed and how to program it
we also need to know the degrees of the sensor too for positioning
Greg Needel
03-03-2004, 13:33
what kind of sensor?
HuskieRobotics
03-03-2004, 13:38
the kind we need for following the white line
its also a banner brand
jacob_dilles
03-03-2004, 15:21
the kind we need for following the white line
its also a banner brand
the banner sensors that first gives us are tricky little felers. the are IR, and have a built in source which makes it nice and easy. they run on 12v and out put 5 to a normaly open and a normaly closed output. in order to wire it do the following:
brown wire - this is the postitive. connect it to +12V
blue wire - this is the negitive. connect it to ground (on the battery)
black wire - N.O. wire
white wire - N.C. wire
you then can choose between N.O. and N.C. (it REALY doesnt matter). you connect the one you choose to the digital in. for our sake, were gonna say you plug it into digital input 10.
now to code it, in the code first you have to set it as an input. this is done for you in the default code:
digital_io_10 = 1;
(autonomus or otherwise) you can look at the variable every single loop by saying:
if(rc_dig_in10 == 1) {
//do this if its ON
} else {
//do this if its OFF
}
i hope this helps you
HuskieRobotics
03-03-2004, 16:10
Thank you!!!!!
the banner sensors that first gives us are tricky little felers. the are IR, and have a built in source which makes it nice and easy. they run on 12v and out put 5 to a normaly open and a normaly closed output. in order to wire it do the following:
brown wire - this is the postitive. connect it to +12V
blue wire - this is the negitive. connect it to ground (on the battery)
black wire - N.O. wire
white wire - N.C. wire
you then can choose between N.O. and N.C. (it REALY doesnt matter). you connect the one you choose to the digital in. for our sake, were gonna say you plug it into digital input 10.
now to code it, in the code first you have to set it as an input. this is done for you in the default code:
digital_io_10 = 1;
(autonomus or otherwise) you can look at the variable every single loop by saying:
if(rc_dig_in10 == 1) {
//do this if its ON
} else {
//do this if its OFF
}
i hope this helps you
but doesn't FIRST supply us with the red LED banner sensors? Do we wire these the same way?
KenWittlief
15-03-2004, 14:28
the banner sensors are little yellow boxes with a red lens - they send out a pulsed infrared light, and look for it to be reflected back - usually the carpet will not reflect it, but the tape or white paint will
the little sensors FIRST gave us that are about a 1/4" square with three leads are infared recievers that are designed to pick up the beacon from the center of the field - there is a whole page of stuff on those on the innovationfirst.com website - under FIRST robotics / documents / beacon section
they are a little more complicated - you pretty much need to wire them to rc_dig_in_01 or 02 and use the interrupt flags to detect when they change state - also they need to be enclosed because they will pick up the IR signal from almost all directions the way they are.
thoughtful
26-03-2004, 10:49
Hello,
Can someone please kindly tell me if last year's banner sensors are allowed in this years competition
THnx
Can someone please kindly tell me if last year's banner sensors are allowed in this years competition
They are allowed if they are available from Digikey, Future-Active, or Newark-In-One and you account for their cost.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.