Landing : Athabascau University

Sensors!

Sensors!

What can we use as sensors in the SparkFun Inventor’s Kit?

Our study guide instructs us to complete the exercises in the textbook’s online workbook, The Robotics Primer Workbook, but this workbook doesn’t fit our current hardware choice, the SparkFun Inventor’s Kit (SIK). The first two questions ask about the sensors and sensor space of the iRobot Create. We may not be able to answer this question, but it’s still useful to complete this exercise with respect to the hardware we do have. Imagine you had a robot built with every possible sensor in the SIK. What would these sensors be, what would this robot’s sensor space be, and what would the measurement ranges be? I tried to think outside of the box to how one could use any component as a sensor, stretching practicality for discussion. I added a tongue-in-cheek “absurdity scale” to indicate pragmatism with respect to knowledge and tools required to implement, available alternatives, and expected measurement qualities.

SIK Sensors

  1. Jumper wire (x30)
    May be used as antennae. Requires at least a buffer circuit (e.g. high-impedance, high-speed transistor).  7/10 absurd. Better to use purpose-built transceiver modules.
  2. Light Emitting Diode (LED) (x5 yellow, x5 green, x5 blue, x5 red, x1 red/green/blue)
    May be used as ambient light detectors. No external circuitry required for basic detection of intense ambient light. Buffer circuit required for small-signal detection. 3/10 absurd. Better to use ambient light sensors with buffer or conditioning circuitry built-in.
  3. Through-hole resistors (x25 330 Ω, x25 10 kΩ)
    May be used as an antennae. Requires at least a buffer circuit (e.g. high-impedance, high-speed transistor).  10/10 absurd. Better to buy transceiver modules.
  4. Potentiometer (x1)
    May be used to measure rotary position. Requires mechanical solution. 3/10 absurd. Better to use purpose-built rotary position sensor, such as a rotary encoder.
  5. Diode (x2)
    May be used to measure temperature or differences in temperature. Requires current source and amplifier circuit. 4/10 absurd. Though this PN-junction theory is used in industry for cheap, imprecise measurements, and basic calibration of temperature-sensitive components, normally a transistor is used. See this Burr-Brown Application Note.
    May be used to detect high energy particles. Requires stable reverse bias and amplifier circuit. Low count (single particle) detection requires cooling to lower leakage currents. 9/10 absurd. Better to use purpose-built detectors for whatever you think may be out there.
  6. Photo Resistor (x1 GL5528)
    May be used as ambient light detectors. No external circuitry required for basic detection. Buffer circuit required for small-signal detection. 1/10 absurd. Better to use ambient light sensors with buffer or conditioning circuitry built-in.
  7. Piezo Buzzer (x1)
    Internal piezoelectric disk may be used to measure vibrations or acceleration. Buffer and amplifier circuit required. 4/10 absurd. Better to use a purpose-built contact microphone.
    Internal piezoelectric disk may be used to measure mechanical stress. Buffer and amplifier circuit required. 6/10 absurd. Better to use a purpose-built stress/strain sensor.
  8. Temperature Sensor (x1 TMP36)
    May be used to measure absolute temperature from -40°C to +125°C. No external circuitry required. 1/10 absurd. This is a purpose-built temperature sensor.
  9. Transistor (x2 P2N2222AG)
    May be used to measure temperature or differences in temperature. Requires current source and amplifier circuit. 2/10 absurd. This is used in industry for cheap, imprecise measurements, and basic calibration of temperature-sensitive components. See this Burr-Brown Application Note.
    May be used to detect high energy particles. Requires stable reverse bias and amplifier circuit. Low count (single particle) detection requires cooling to lower leakage currents. 9/10 absurd. Better to use purpose-built detectors for whatever you think may be out there.
    May be used as radio transceiver.  5/10 absurd. Better to use purpose-built transceiver modules, though this is the basis of the Hartley oscillator and single transistor radio.
  10. DC Motor (x1)
    May be used to measure rotation speed and motor/driver load. 2/10 absurd. Over-voltage protection may be a good idea if doing this measurement through back EMF.
    May be used to measure rotational energy. This is a regenerative breaking circuit, which, when you already have an H-bridge driver, can be simply an intelligent switch to direct the back EMF to storage. A power sensor (current and voltage) and integrator is used to measure the regenerated energy. 3/10 absurd. Better to measure energy via rotational speed and known mass.
  11. Push Buttons (x4)
    May be used as switched input. 1/10 absurd. It’s a single pole normally open button.
  12. Flex Sensor (x1)
    May be used to measure flex in this strip. 1/10 absurd. This is a purpose-built sensor that varies its resistance in response to the strip bending. Take care not to pinch it.
  13. Soft Potentiometer (x1)
    May be used to measure position or positions of incident forces or small objects on the sensor surface. 1/10 absurd. This is a purpose-built sensor that varies its resistance with the location where it’s being activated.
  14. Servo (x1)
    May be used to measure stator counter-torque. 3/10 absurd. Slightly more complex that measuring DC motor load as drive circuitry is generally separate from controller power, requiring a voltage buffer.
  15. Relay (x1)
    May be used to detect electricity of sufficient power to switch relay, in this case 37.5 mA at 9 V. 6/10 absurd. Better to use other sensing methods. Note that relay function is undefined between drop out voltage and pick up voltage.
  16. Integrated Circuit (x1 SN74HC595N shift register)
    May be used to detect extreme environments, such as intense radiation or high energy particle bombardment, or high temperature exposure, through its destruction in such an environment. 10/10 absurd. I don’t think I need to explain this one.
    Any component can be used as such, but I couldn’t think of how else a shift register could be used as a sensor. Can you?
  17. LCD (x1 GDM1602K)
    May be used to measure display temperature near backlight LED by using diode temperature measurement method. 5/10 absurd. Not particularly difficult, but to use backlight at the same time would require complex calibration including thermodynamic considerations of LED heating. Better to use dedicated or LCD with built-in temperature sensor.
    May be used to measure ambient lighting by using LED ambient lighting method. If it works, great, but if the onboard LEDs were not meant for this task then they probably won’t be very sensitive. 3/10 absurd. Worth trying out to see if it works.

SIK Sensor Spaces (State Spaces) and Measurement Ranges

  1. Antenna
    Antenna state space is a continuous voltage waveform, either detecting and storing the entire waveform, filtered sections of it, or just the peaks. Measurement range using either the jumper wire  or through-hole resistorsis a small signal (uV-mV), initially, amplified to the controller’s analog to digital converter (ADC) range, 0 V to 5 V.
  2. Light Sensor
    Ambient light sensor state space is a combination of a continuous voltage level, sensor orientation, and sensor wavelength sensitivity.
    The sensitivity of the different colours would vary, though in an exclusionary manner. For example, the blue diodes would likely pick up blue light poorly as it would be reflected more than the others. This allows for the possibility of perceiving colours, or at least narrowing down possible wavelengths through elimination, especially with the tri-colour LED. Sensing also depends on ray incident angles, peaking from a direct angle (90°) and waning to near zero at the LED viewing angle (though internal reflections means that even ambient light of sufficient intensity may be sensed from well outside of the LED viewing angle).
    The state-space of a single light sensor is a combination of the measured intensity, a continuous but constrained voltage measurement for ambient light above a certain intensity, the sensing vector, and the wavelength sensitivity profile. For the LEDs, including that/those on the LCD, the measurement range is from about 0.6V to the maximum for the part (probably about 5V). For the Photo Detector, the range is that of the controller’s ADC, about 0 V to 5 V. The sensing vector is a known (not sensed) direction, and the wavelength sensitivity profile is a known (not sensed) continuous[1] measurement.
  3. Rotation Sensor (Potentiometer)
    State space is a continuous voltage range resulting from the changing resistance of the potentiometer splitting a constant voltage signal through a divider. Measured voltage would be somewhere within the controller’s ADC range, 0 V to 5 V.
  4. Temperature Sensor
    State space is a continuous voltage range that would most likely take one of two forms. For the diodes or transistors, a small signal voltage difference (compared to similar measurement of diode at constant known temperature) amplified to the controller’s ADC range or a voltage between about 0.4 V to 0.8 V. For the purpose-built temperature sensor (TMP36), it is simply a continuous voltage signal within the controller’s ADC range.
  5. High Energy Particle Detector (Diode)
    State space is a continuous voltage range between about 0.6 V and 5 V for the diodes and transistors. Due to the sensitivity of such a setup it may be wise to treat these measurements as discrete data points corresponding to whether a measurement exceeds a certain threshold, meaning a possible detection. It may be useful to reverse-bias the junctions near their thresholds, at 50 V to 100 V or more, to increase sensitivity, though this would have to be buffered to below 5 V for the controller to measure it.
  6. Sound, Vibration, or Acceleration (Piezo Buzzer)
    State space is a continuous voltage measured from an amplified small signal. This signal would have to either be filtered and/or analyzed outside of the controller, or sampled by the controller’s ADC at a rate at least twice (but better with 10 times) the expected maximum frequency measurements. This means sampling human voices, which typically go up to 3.4 kHz, at at least 6.8 kHz (telephones typical sample at 8 kHz – see G.711 standard). Dampening or filtering of frequencies above this range would prevent resonant or harmonic measurements.
  7. Mechanical Stress (Piezo Buzzer)
    State space is a continuous voltage range within the controller’s ADC range. It would have to be measured frequently, every few milliseconds, as the piezoelectric response to constant stress tends to die away with time.
  8. Tachometer (DC Motor)
    State space would be a buffered, possibly filtered, continuous voltage range.
  9. Rotational Energy Sensor (DC Motor)
    State space would be a buffered continuous calculated data point resulting from integrating a voltage measurement of the DC motor’s back EMF.
  10. Stator Load
    State space for both the DC motor or servo would be either a continuous voltage or continuous current measurement, the latter being transformed into a voltage signal for the controller’s ADC.
  11. Push Buttons
    The state-space of each of the push buttons is discrete, either on or off, though it may include a continuous known (not sensed) position of each button to infer physical geometries of that which is pressing the buttons. For example, one can infer the position of ships in the game Battleship by knowing whether some shots are “hits” (on) or “misses” (off) as well as their positions.
  12. Flex Sensor
    State space is a combination of a continuous voltage measurement within the controller’s ADC range and the initial position and orientation of the sensor.
  13. Soft Potentiometer
    State space is a combination of a continuous voltage measurement within the controller’s ADC range and the orientation of the sensor.
  14. Current and Voltage Sensing (Relay)
    State space is a discrete voltage measurement corresponding to a circuit setup to read as such.

[1] The dataset itself would be discrete in that its precision would be limited by measurement and memory.

link to pdf version (slightly different): http://tyblu.ca/misc/COMP444/blog/blog-post-20170124/blog-20170124-sensors.pdf

edit 20170205 - corrected list formatting