Changes between Version 6 and Version 7 of ControlSystems/Electrical/Training/Arduino/Lesson5


Ignore:
Timestamp:
Oct 13, 2015, 10:03:36 AM (10 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/Electrical/Training/Arduino/Lesson5

    v6 v7  
    1111Potential problems: The ultrasonic sensor transmits a burst of ultrasonic sound and then listens for the echo.  The echo is received by a transducer that converts sound energy to electrical energy.  The further away the target is, the weaker the received signal.  To accurately measure long distances, the sensor must be able to measure the very small voltages generated by the reflected signal and if the power supply to the sensor is fluctuating rapidly (a noisy supply line) it is tough to do (try making fine measurements while bouncing on a trampoline).  You can reduce noise on the power supply lines by adding a decoupling capacitor: a small capacitor placed between +5v and Gnd as close to the ultrasonic sensor as possible.  The capacitor serves as a reservoir that absorbs spikes in supply voltage and supplies current when the supply voltage dips.  For more information on power supply decoupling, see [DecouplingCapacitor here].  NOTE: some capacitors are polarized (ask a mentor if you are not sure), if you are using a polarized capacitor, you '''must''' connect the '-' lead to ground and the other lead to +5v...otherwise, the capacitor will turn into a firecracker.
    1212
     13To see what happens when capacitors are used incorrectly, watch this [https://youtu.be/sW0a9d_vWoc video]
     14
    1315**Exercise**: Use your arduino to trigger the ultrasonic module and convert the resulting pulse duration into a distance; change the blink rate of your LED based on the distance to the target (faster=closer).
    1416