Range finder for dancers

Discussion in 'Embedded Systems and Microcontrollers' started by jb8256, Jul 16, 2016.

  1. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    Hello all!

    I have been working on an idea in which pedestals on a stage each contain a device which outputs continuous audio, i.e. an environmental sound machine or chant box plugged in to a small amp. The volume is controlled via an optocoupler (AKA vactrol - consisting of an LED/LDR pair). The LED brightness is controlled by a PWM pin on an embedded ATMEGA328 microcontroller. The desired effect is that as a dancer moves closer to the pedestal, the audio level increases. I have it working on a breadboard with an ultrasonic sensor, but it's quite jittery reading off of clothing. I have been trying to come up with alternative means of accomplishing this. I think IR range finders will be jittery as well. I am not opposed to having the dancers wear a small transmitter and modulating the PW by way of signal strength. I have even thought about trying to hack a laser tape measure from Home Depot, but that seems tricky. Basically, I'd like to achieve the desired effect with as little jumpiness as possible. I have been researching this in great depth, and I wanted to put out a feeler here. Thanks in advance for listening!
     
  2. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,128
    266
    Last edited: Jul 16, 2016
  3. DNA Robotics

    Member

    Jun 13, 2014
    122
    26
    I like the ultrasonic sensor. If you average out a lot of readings, 20 or more, it might be smooth enough.
     
  4. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    In addition to the averaging of readings, you might find that you need to tweak the PWM signal so that it is not linear with respect to distance, e.g., logarithmic.
     
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,646
    759
    At what level of the body you will be sensing them? Just any gesture (arms, hands, legs) could change the measurement even if staying in place. The closer the dancer is, the higher the percentage of change of the current distance for the same gesture.

    Is it too much to sense them on a grid of (maybe partly overlapped) square sectors on the floor? There is always a 1 to 1 correlation. Expensive and not simple, I know. But, what then if the choreography requires jumps of any kind?
     
  6. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    Linearity is not nearly as important as "smoothness". In the current configuration, I have an LED connected to the PWM signal as an indicator, and it sometimes jumps from dark to fully illuminated. As long as the amplitude fades up and down with some degree of smoothness, it will be effective.
     
  7. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    From what I've read, you are not supposed to average the ultrasonic data, but rather apply things like median filters in code. I'm still trying to research the best way to accomplish this.
     
  8. DNA Robotics

    Member

    Jun 13, 2014
    122
    26
    If by that you mean to discard any radical changes, that would be a good idea. That would also negate arm waving etc. like atferrari said.
     
    jb8256 likes this.
  9. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    I would be sensing them around the torso area in order to avoid all the gaps around the appendages. I have given thought to floor sensors, but I'm not sure what to sense. One of the problems is that you can't really change the physical structure under the dancer's feet, although I've considered copper plates as capacitive sensors somehow, or plates with piezo elements that would latch at specified voltage levels.
     
  10. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    That would be prohibitively expensive, as I will be creating more than one of these pedestals - however, I followed your link and it may have led me to some affordable alternatives i.e. http://www.robotshop.com/en/parallax-15-122cm-laser-rangefinder.html
     
  11. m zaid

    Member

    Jan 9, 2016
    46
    5
    What about triangulation? or you can measure power loss of a signal by the distance from the transmitter?
    (Edit: you already covered this too!)
     
    Last edited: Jul 16, 2016
    jb8256 likes this.
  12. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
  13. jb8256

    Thread Starter New Member

    Dec 7, 2013
    17
    1
    I have found a great solution that involves triangulation, but in a different way. It is a Sharp IR Distance Sensor. It works by sending an IR beam which bounces off the target and hits the receiver, which can derive the distance by measuring the angle of the incoming light. The transmitter, target and receiver make up the points of the triangle, so when the target moves closer and further from the transmitter, the reflected IR beam hits the receiver at a different angle, and the output analog DC voltage changes accordingly. There is no need for an ADC for PWM. I just amplify the sensor's output with an LM358 op amp use the output to vary the Vactrol LED's brightness. The Vactrol LDR in turn controls the amplitude of the audio signal.
     
  14. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,128
    266
    On a totally different note- if you put a camera looking down over the stage and feed the video into MAX/MSP software, you can use the "blob detection" module to locate the dancers, then write some code to modulate the audio in the same computer.

    If the visual contrast is high enough, you would have no troubles getting a very reliable signal.
     
Loading...