Shop OBEX P1 Docs P2 Docs Learn Events
Engineering school project — Parallax Forums

Engineering school project

robustrobust Posts: 11
edited 2006-04-28 01:51 in BASIC Stamp
Hey there,

I am doing a school project for which I have already ordered a BASIC Stamp II.· The basic problem is to be able to rotate a device in the direction of a person and actively track that person's position radially outward from the device.· I don't need to know distance at all, just have the ability to sense a person's position angularly in a 180 degree arc up to 30 ft away.

What I was thinking to do was getting several·IR detectors arranged in an array·to receive a modulated IR signal which would be received by a small beacon attached to the person.· Then, according to which detector was high, I would be able to roughly know the person's position.· Camera detectors seem to be too expensive for my project.· IR detectors/emitters are cheap which is something good as well.· The beacon, to my knowledge, which emits a modulated signal would be required in this setup as the device would be outdoors where there is considerable ability for noise to muck up the detectors.

Anyone faced this type of problem or have some insight they could share?

Sean

Comments

  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2006-04-11 20:19
    Hi!
    Am I correct in saying that you are monitoring a person from one central position?
    Anyway, if you are only tracking people you could use passive infrared (PIR), which tracks a person based on their heat signature Google "passive infrared sensor" . You could mount this on a servo and have it rotate to track the person. A normal servo will just give you the range of 180 degrees you need.
    Rafael
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-11 21:03
    I'd recommend using ultra-sonic sensors, myself. The IR-LED thing works OK indoors, and works well for 'bouncing' signals off white walls. For distance, they're kind of limited to about a foot, before it gets hard for the sensor to sense a 'bounce' signal.

    Ultra-sonics are good out to 30', I believe
  • robustrobust Posts: 11
    edited 2006-04-14 22:27
    well, this will be used outdoors and i would like up to 30 feet in the sun.

    In terms of an ultrasonic sensor, how would i get the angular position of someone?

    i suppose if i were to attach it to a servo and sweep the servo 180 then determine at which angle the sensor read the closest distance would be the person, assuming it's an open area. is that what you were thinking, allanlane5? the reason that's how i thought of it was because the person will not necessarily be the same distance to my device all the time, he can move in and out and around but i only care where he is angularly.

    i was thinking the modulated IR signal might survive up to 30ft outdoors as the detector would only look for 40kHz (or whatever) modulated signals and not be as affected by other interference as a result of the environment. also, im not opposed to placing a beacon on the person so the beam of the IR will not have to travel to the person and then back (reducing the intensity).

    any more insight? it's helping.
  • bobledouxbobledoux Posts: 187
    edited 2006-04-15 13:08
    I use IR beacons for my robots and get an easy 30 feet using the PNA4602 receiver often used in TV sets. IR LED's are fairly directional so a semi-circular array of them might be needed so the person carrying it could rotate and still send a signal seen by the receiver.

    Place two receivers, side by side, separated by a barrier.

    x|x x=receiver, |=barrier

    The length of the barrier determines the resolution of the locator unit. Program the servo to rotate in the direction of the receiver getting a signal. When signals are received from both receivers, the unit is pointing at the beacon. If the program makes the receiver swing back and forth so that each unit takes its turn losing the signal you can be more precise about the sensing direction.

    Look at Digi-Key for part numbers PNA4602 and QEC113. Download their documentation for each unit. The PNA is a sensitive receiver and the QEC is an IR diode. Note this particular diode has a radiation pattern of about 20 degrees. Other diodes may be wider, but with a weaker signal. IR diodes can be pulsed to very high currents, sometimes without the use of a current limiting resistor. However, watch duty cycle to avoid heat caused burnout.

    John Iovine's Book "Pic Microcontroller Project Book" actually has a similar project based on CDS cells and a DC motor fuzzy logic controller. See pages 135pp. Given your task, I think the Basic Stamp/servo combination is the better way to go.
  • robustrobust Posts: 11
    edited 2006-04-17 03:12
    thanks alot for the thorough response. i will pick up that book that you recommended.

    i feel good about your vote of confidence for the IR sensing but i have a question about sweeping the receivers with the servo. the direction of motion of the servo would be controlled according to which receiver was high last? and then you just keep sweeping it till you pick the beacon up again by both?

    thanks alot, bobledoux
  • bobledouxbobledoux Posts: 187
    edited 2006-04-17 04:07
    That book is several years old--it might be in a college library.

    I generally use my robots indoors so I have not tested them to the limits in a brightly sun-lit exterior environment. I haven't run into problems with the outdoor sun overloading the IR sensor, but you might want to test your expected environmental limits early in the process using a simple IR LED/sensor receiver test pair.

    With a fairly long barrier between sensors I can achieve resolution of about 2 to 3 degrees. My application required this precision so I chose to sweep the sensor unit back and forth to find a center location. I swept the sensor unit left until the barrier blocked the left sensor. I then swept right until the right sensor was blocked. The center between these two limits was my bearing to the beacon.

    Many applications will not require this resolution. For example, if you want a robot to travel to a beacon, it will still achieve its goal even if the two sensors have a markedly different sensitivity. The robot path may not be quite as direct, but it will still get there.

    My application required me to triangulate the position of a robot carrying a beacon by using two remote sensor receiver units. So robot position measurement accuracy was a function of sensor unit resolution. That's why I chose the "sweep around center" method.

    My robot operated in a 16 foot square "box." To calibrate the system, I put the two receiver units at adjacent corners of the box and placed the robot at a third corner. I then rotated the two sensor units until reported readings were correct. One sensor reported a 90 degree heading and the other reported a 45 degree heading across the diagonal of the box.

    While the servo pulse width required to focus on the target could be used for bearing calculations, my sensor units used resistor pots to read the actual bearing. The pots rotated with the sensor units and the resistance output was fed into an A/D convertor. I found this feedback method provided better accuracy for bearing readings.

    Your application will probably not require this level of feedback.
  • robustrobust Posts: 11
    edited 2006-04-17 05:47
    you're right. my project will not require that amount of accuracy but the writeup on your logic gives me a good idea of what i need to do. will report back about my experience with the IR outdoors.
  • bobledouxbobledoux Posts: 187
    edited 2006-04-17 13:29
    Here is an alternative approach that employs a swept laser beam and reflector system.

    http://www.seattlerobotics.org/encoder/200109/lasernav.htm

    The laser sweeps at a fixed rate. If its beam is returned to a detector that sweeps with the laser, the bearing to the reflector can be determined. It may require that laser, detector and reflector(s) all be on the same plane.

    Another possibility is to use the VOR technique used by aviation. With this method an omnidirectional radio signal is sent 30 times per second. After this signal is sent, a very directional radio signal sweeps through a circle at 30 times per second. The time between receipt of the omni signal and receipt of the directional signal gives bearing to the VOR station. The radio signals could be replaced with sonar at two different frequencies or perhaps IR at different wavelengths or modulated frequencies.
  • robustrobust Posts: 11
    edited 2006-04-18 03:05
    the only problem with the laser is that we would not want the laser to get in the eye of the person wearing the reflector as, in our situation, he would sometimes have to look in somewhat the direction of the device.

    i will look into the VOR technique.
  • robustrobust Posts: 11
    edited 2006-04-18 04:45
    bobledoux,

    i have one extra issue with which to bug you. with regard to driving the LEDs with a 38kHz modulated signal, i have found this page: http://www.robotroom.com/InfraredTransmitter.html . which I can probably emulate (basically copy) to create my beacon. i have taken courses in electrical engineering but am studying to be a mechanical engineer so i did not get the training to understand exactly what's going on in the circuit right off the bat. is that similar to how you did it?

    sean
  • bobledouxbobledoux Posts: 187
    edited 2006-04-18 13:34
    David Cook has interesting designs.

    You could use his NAND approach, or use a 555 timer to create your pulse. The output would go through a transistor switch to avoid overloading the timing circuitry. The pulse currents on a beacon could be quite high--perhaps close to 1 amp, but at a low duty cycle.

    Here's a gotcha: Some of the IR receivers stop reading the signal if the the pulsed IR signal is continuous. Read the PNA4602 datasheet. It references the maximum reception distance is determined when 16 pulses at 38Khz are sent, followed by a like period of no transmission. So they describe sending the pulse for 400 microseconds, followed by the same period of rest.

    This could be built around a 556 dual timer. One timer generates the 38Khz pulse and the second timer pulses the first on and off. Forrest Mims has such a dual timer circuit in his little Engineers Minibook on 555 Timers, once sold by Radio Shack. Look at the circuit titled "Chirp Generator." It probably in the college library.

    Google "IR Beacon", to learn more.

    Post Edited (bobledoux) : 4/18/2006 2:34:57 PM GMT
  • robustrobust Posts: 11
    edited 2006-04-24 23:58
    is there any special way to implement the pna4602's with the BS2?

    i connected the power to Vss, Output to a BS2 pin, and Ground to Vdd. seems like the output is high even with no radiation. im ok with programming just not so hot with actual electrical stuff. though i do have a mockup dual timer for the emitter on paper which i hope to implement tomorrow.
  • MuncherMuncher Posts: 38
    edited 2006-04-25 02:55
    If i am correct, your application does not need a distance measurement, so that means that the pna4602 is probably digital (not analog.) In that case, instead of hooking up the pna4602 directly to the Stamp or whatever, you could connect it to a debouncer and then a data flip-flop. You can pulse a new clock cycle after every reading.

    But then, sorry to interrupt. [noparse]:)[/noparse]

    (Edit: If faced with the choice of NAND clock, 555 timer, or -for me- preferably a crystal, go with the crystal when possible. Otherwise, the 555.)

    Post Edited (Muncher) : 4/25/2006 2:58:16 AM GMT
  • bobledouxbobledoux Posts: 187
    edited 2006-04-25 03:08
    Look at the Parallax "Stamps in Class" Robotics workbook. Chapter 5 describes an obstacle detector that employs IR LED's and the receiver unit. Your application simply separates the LED and receiver. The information in that chapter should be sufficient to get your project working.





    Here are some additional links to look at:

    http://users.frii.com/dlc/robotics/projects/botproj.htm

    http://www.physics.ubc.ca/~andre/ph253/ircircuit.html

    http://list.dprg.org/archive/2000-June/013358.html

    http://www.restena.lu/convict/Jeunes/beacon.htm

    http://www.rentron.com/Infrared_Communication.htm
  • robustrobust Posts: 11
    edited 2006-04-25 23:55
    for archiving purposes, for other users, i found this url to be of great use: http://www.seattlerobotics.org/encoder/200112/richk.htm
  • robustrobust Posts: 11
    edited 2006-04-27 04:00
    uh oh.

    how's it going guys?

    i think this is going to be a perpetual thread... =)

    my new problem is that i got the 555 to work finally at 38kHz BUT only for a short transient. the circuit would start at roughly 40kHz then come down to about 30kHz VERY slowly after about 10 minutes. im thinking now, after i got frustrated and after the lab closed, it might have something to do with the fact that i had a huge capacitor from the control pin to ground. it's stated .1uF or more and i had something like a 300uF or something but nothing between that and .02uF (i dont know where to get this stuff? anyone have local places, i'm in Los Angeles, Orange County on weekends) so i used the big one. could this be the problem? anyone experienced this?

    sean
  • MuncherMuncher Posts: 38
    edited 2006-04-28 01:51
    Capacitors from +V to Gnd are usually meant to stablize the power supply (if i recall correctly) and should be 0.1 uF for the usual project, and .01 uF for high frequency. I don't think your project qualifies as high frequency, but you should try both sizes.

    (EDIT: In short, avoid anything larger than 1uF)

    Post Edited (Muncher) : 4/28/2006 10:49:59 PM GMT
Sign In or Register to comment.