User Tools

Site Tools


2022_ball_presence_sensors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
2022_ball_presence_sensors [2022/03/23 23:15] – created tell2022_ball_presence_sensors [2023/01/19 23:20] (current) – [Third Version: custom PCB] tell
Line 2: Line 2:
 been collected by the intake, and delivered to a position just below the shooter flywheels. been collected by the intake, and delivered to a position just below the shooter flywheels.
  
-Early Prototyping+===== Early Prototyping ===== 
  
 We first tried using a Rev Color Sensor V3 to both detect ball presence and its color. The V3 color sensor incorporates an infrared (IR) detector that sometimes would detect either ball, but it wasn't quite reliable. We first tried using a Rev Color Sensor V3 to both detect ball presence and its color. The V3 color sensor incorporates an infrared (IR) detector that sometimes would detect either ball, but it wasn't quite reliable.
Line 8: Line 9:
 We also considered using an Adafruit break-beam sensor, both in break-beam and reflective mode. We also considered using an Adafruit break-beam sensor, both in break-beam and reflective mode.
  
-Banner Engineering sensor+===== Banner Engineering sensor ===== 
 + 
 +{{ :mfg_qs18vp6dq8.jpg?200 |}}
  
 Friends on team 888 donated a few of these sensors.  They're commercial proximity sensors that operate by detecting infrared light reflected back by an object.  Same general idea as the adafruit sensors in  Friends on team 888 donated a few of these sensors.  They're commercial proximity sensors that operate by detecting infrared light reflected back by an object.  Same general idea as the adafruit sensors in 
Line 17: Line 20:
 The difficulty is that these sensors operate on 10-30 volts, and that most of those we recieved are "PNP" style, in which the outputs are switched to the positive supply when active.   The difficulty is that these sensors operate on 10-30 volts, and that most of those we recieved are "PNP" style, in which the outputs are switched to the positive supply when active.  
 A stable +12v supply is easily obtained with a [[VRM]], but switched +12v is no good for input to a roboRIO DIO input. A stable +12v supply is easily obtained with a [[VRM]], but switched +12v is no good for input to a roboRIO DIO input.
 +
 +===== Interface Circuit =====
  
 Here's the circuit we came up with to interface the +12v sensor output to the RoboRIO: Here's the circuit we came up with to interface the +12v sensor output to the RoboRIO:
 {{ :bannersensor_sch.png?direct&400 |}} {{ :bannersensor_sch.png?direct&400 |}}
  
-LEDs D1 and D2 and resistors R1 and R2 are basicly our DIO test board.+LEDs D1 and D2 and resistors R1 and R2 are basicly our [[DIO tester and breakout]]. 
 + 
 +When the sensor's proximity output (pin 4, black wire) goes to +12 volts, current flows through R3, turning on Q1, 
 +which pulls the output signal to ground, sending a "0" to the RoboRio and turning on LED D2. 
 +When the sensor's output is open, R4 pulls it to ground, ensuring that no stray charge or current can try to turn on Q1. 
 + 
 +J2 provides a connection for +12v input power from the VRM or other buck-boost converter.
  
 The banner sensor's cable is either directly soldered to the J3 pads, or prepped with a 5-pin AMPMODU female connector to mate with a 5-pin male header. The banner sensor's cable is either directly soldered to the J3 pads, or prepped with a 5-pin AMPMODU female connector to mate with a 5-pin male header.
  
 +We only obtained one mating cable for these sensor, so when we put on a second sensor, we bought one from Digikey.  A spare sensor was also ordered from DigiKey.
 +  * [[https://www.digikey.com/en/products/detail/banner-engineering-corporation/MQDC-406/10651372 | MQDC-406 cable]]
 +  * [[https://www.digikey.com/en/products/detail/banner-engineering-corporation/QS18VP6DQ8/10652686 | QS18VP6DQ8 sensor ]]
 +===== First Prototype =====
 +
 +Our first prototype was built by Jake and Darya on a piece of pad-per-hole protoboard.   
 +
 +{{ :img_20230119_220640554.jpg?direct&400 |}}
 +
 +We attached a 5-pin header to the Banner Engineering cable, to mate with a 5 pin header on the board.
 +Jake designed the 5-pin pinout so that reversing the connector wouldn't cause any damage.  Just like the 3-pin PWM, power is in the center.
 +===== Second Version: DIO Tester + Proto PCB =====
 +
 +We then rushed out a slight variation on the DIO Tester board, one that incorporates a tiny area of
 +"protoboard"  holes, along with multiple holes for the Signal, +5, and Ground from the PWM/DIO cable.
 +
 +{{ ::dioboard2022-oshpark.png?direct&400 |}}
 +
 +We fabricated these at oshpark.com.  The board project can be [[https://oshpark.com/shared_projects/GGFh8RU8|found and ordered here]]. (Re-uploaded in 2023 because it somehow fell off my oshpark page)
 +
 +With to trace cuts and some careful placement, the banner adaptor circuit can be fit into this proto area.  We built several of these, including two that went to Houston for FIRST Championship.  But building the circuit in proto area tended to take rather long.
 +
 +{{ :img_20230119_220742539.jpg?direct&400 |}}
 +===== Third Version: custom PCB =====
 +
 +We looked into doing a complete PCB for the banner-sensor adapter circuit, but never completed it.
 +One idea for that board was to include two transistors, signal LEDs, and DIO output connectors.
 +That's right, two.  There are actually two output wires from these sensors.
 +
 +The stock standard black-colored Banner Engineering proximity sensor, available from digikey, has both normally-open an d normally closed contacts.
 +
 +The yellow ones we were given by another team has a normally-open signal, and another signal wire that seems to indicate when the signal on the first wire is reliable, or if the light returned from the detected object is weak.  
 +
 +Hooking up both outputs to the control computer could enable it to determine if the sensor is connected properly, but the software would have to be different for the black vs. yellow versions.
  
  
  
2022_ball_presence_sensors.1648091729.txt.gz · Last modified: 2022/03/23 23:15 by tell