distance sensor

Discussion in 'Electronics & Electrics' started by magicsun, Sep 9, 2008.

  1. magicsun

    magicsun Member

    Joined:
    Jul 6, 2004
    Messages:
    657
    Location:
    Brisbane
    Ive been trawling the net for a sensor for ages, cant find anything so I thought maybe somebody here would know of a technology that does what im after. Basically looking for a sensor that would be able to tell the distance to some sort of micro chip through other solids. Im basically wanting it so i can leave the sensor in my room and let my pc record the distance my dog is from the sensor :p its for a project im doing. any help would be much appreciated. :thumbup:
     
  2. spludgey

    spludgey Member

    Joined:
    Jun 30, 2001
    Messages:
    5,451
    Location:
    Sydney
    How much do you want to spend?
    You could just get reverse parking sensors.

    You aren't really specific here, there are a lot of ways you can do it, you can do it by IR, ultra sound or even using something like RF and attaching an emitter to your dog and three receivers to your computer and triangulating the dogs position.
    Or you could build a vision system that can do it.

    More information required, but I hope my post gave you a glimpse of what is possible.
     
  3. nEBUz

    nEBUz Member

    Joined:
    Feb 14, 2007
    Messages:
    824
    Location:
    Wanaka, NZ
    you can either get:

    1. insanely accurate gyros (expensive/not possible?)
    2. some sort of triangulating radio - directional antennas in two/three places to tell you the direction of the dog(ish) and then work out distance/direction from that (feasible)
    3. some sort of radio based timer/ping type setup where you see how long a signal takes to bounce like with uSonic sensors but active in both directions...
    4. gps
    Of all these, I'd def not suggest 1.
    2 is feasible if you know how to/can find directional antennas and suffers the least from environmental effects that change the time your signal takes to travel (downside is, more hardware, reasonable errors).
    3 is good for longer distances where you can accurately tell apart the travel times of each signal. This is of course how GPS works (to a point).

    4 seriously the easiest to implement. Really.If you need real-time then interface a gps unit with class 1 Bluetooth transceiver (100m range) via a uC and then connect to your pc via serial over bluetooth (done this before, works a treat). Failing that, there are plenty of radio modems (400ish MHz, 4.2GHz etc) out there with the capacity to send serial data from your dog to your pc - some will operate at high speeds up to 160 km :D

    Either way, it is a shed-load of work provided you aren't looking at 1m ranges... which if you're tying the thing to a dog I'm guessing you're not.
     
  4. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    Going by the "through other solids" you want to track the dog's position around the house, through walls etc? Basically infeasible I'm afraid. Wireless signals bounce off stuff, and propagate at different speeds through different materials. The dog might be in the next room, and it could appear to be 100m down the road in the opposite direction. Hook up a bunch of cameras and a DVR if you're really curious, but it doesn't sound like the cost/benefit would stack up. If it's raw curiosity, you'll go to an awful lot of trouble and expense for something that doesn't really work. If it's to stop him shitting in your shoes, there are far more practical methods available.
     
    Last edited: Sep 9, 2008
  5. spludgey

    spludgey Member

    Joined:
    Jun 30, 2001
    Messages:
    5,451
    Location:
    Sydney
    Not personal criticism, but I don't like three out of four of your options.

    Gyros: You want to use it as an IMU essentially, but IMUs need to be calibrated, so after a few minutes you'll be getting more and more errors.
    Also the dog might to pull it off.

    Triangulation: Not a bad solution.

    Ping: As you mentioned, as it all travels at the speed of light it might be hard to get an accurate reading as it's all in the realm of nanoseconds.

    Gps: It's indoors by the sounds of it and a GPS isn't hugely accurate anyway.
     
  6. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    Triangulation won't work, as I just said (I'm betting you were already typing when I posted, so I'll give you a pass :p). GPS is rough in terms of accuracy, but it will work, to a degree. If 1m or thereabouts isn't tight enough for the OP, we're back to it being infeasible.
     
  7. nEBUz

    nEBUz Member

    Joined:
    Feb 14, 2007
    Messages:
    824
    Location:
    Wanaka, NZ
    Yeah, I guess I assumed outdoors like the dog roaming to god knows where outside or something.


    Aaanyway, the OP can clear this up for us! Indoor or outdoor? (or a bit of both?)



    Also, how about a beacon type approach if indoors..., could have a beacon in each room with low power, make sure it'll struggle to get thru walls.
    Then ping from each beacon and get the strength of the response, that'll give you a decent indication (not perfect by any means... and I'm talking a LOT of signal conditioning) of where the dog with regards to distance within that room.
    Hell, do response-power based triangulation per room.. (and there goes your budget :lol:)
     
  8. spludgey

    spludgey Member

    Joined:
    Jun 30, 2001
    Messages:
    5,451
    Location:
    Sydney
    Kind of contradicting yourself then, GPS is triangulation!;)

    I would still go for triangulation, sure the permittivity of different materials is different to that of free space (close enough to air), but it's still going to be a fair estimate.
     
  9. nEBUz

    nEBUz Member

    Joined:
    Feb 14, 2007
    Messages:
    824
    Location:
    Wanaka, NZ
    Really depends on the number/material of the walls/obstructions. You could get a pretty darn accurate estimate if you knew the geometry/materials of the house (if indoors) using triangulation. Trouble is that the maths becomes tricky.

    It's really one of those cases where you'd have to try it and see... otherwise there's really no hope of guessing.
     
  10. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    Well, yes, but it won't work if you try to knock up some kinda terrestrial system.
     
  11. OP
    OP
    magicsun

    magicsun Member

    Joined:
    Jul 6, 2004
    Messages:
    657
    Location:
    Brisbane
    how i love ocau :)

    Would be indoors so yeah needs to go through solids >< if it is entirely impossible let me know else ill be chasing my tail for ages again :p. Around one meter accuracy would be fine really, its just a dog not mission critial tracking of a termite :lol: I guess even if there is a way you know of thats gonna cost heaps still let me know because I could just do a theoretical setup for the project.

    Thanks for all your replies, much appreciated.
     
  12. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    A beacon?! (29:50-ish)
     
  13. OP
    OP
    magicsun

    magicsun Member

    Joined:
    Jul 6, 2004
    Messages:
    657
    Location:
    Brisbane
    The per room idea wont work for what im aiming for unfortunately. has to travel through the solids :mad:
     
  14. Pugs

    Pugs Member

    Joined:
    Jan 20, 2008
    Messages:
    9,155
    Location:
    Redwood Park, SA
    maybe as others have suggested post some more info to help "us" help you
     
  15. spludgey

    spludgey Member

    Joined:
    Jun 30, 2001
    Messages:
    5,451
    Location:
    Sydney
    Starting to sound more and more like homework :shock:

    Of cause it will!, it's going to be a lot more accurate then GPS or even Galileo(not active yet).
    I've got (limited) experience with this sort of thing and I can tell you that it is possible.
     
    Last edited: Sep 9, 2008
  16. OP
    OP
    magicsun

    magicsun Member

    Joined:
    Jul 6, 2004
    Messages:
    657
    Location:
    Brisbane
    Its not homework, i dont go to school :p (doing software engineering at uni) Basically i thought it would be an interesting way to learn to program for different technologies that i dont know anything about, so as you can imagine finding what type of sensors I could use is a bit of a mission as I did't really like any of the electrical engineering subjects. My house is an average sized one, dog is small. The system doesnt have to be extrememly accurate, as stated earlier to within in a meter would be plenty. Also I guess the use of more than one sensor could work with some sort of triangulation running to get a more accurate reading, but using the one sensor per room, then pinging for response times idea is not what i was after. If it is going to cost stupid amounts id still like to know purely out of interest, but otherwise if its reasonable then i can go ahead and implement it. If there was any other specific information you need then shoot because id love to get this working so I can track my dog in and and around the house to see what he is up to :)
     
  17. spludgey

    spludgey Member

    Joined:
    Jun 30, 2001
    Messages:
    5,451
    Location:
    Sydney
    Is the dog allowed to wear an emitter? If so, up to what size?
     
  18. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    I didn't say it's not possible. I said it's not feasible.
     
  19. nEBUz

    nEBUz Member

    Joined:
    Feb 14, 2007
    Messages:
    824
    Location:
    Wanaka, NZ
    Well, as has been said: directional sensors with triangulation... yes, even on the ground, will work.

    The sensors can be radio (or heaven forbid IR if you set your dog on fire maybe... and have thin walls) and the source (if using reasonably strong rf) will be quite visible through most solids. You then need some directional antennas to basically function like a passive radar (the dog sends out pings that you listen for). When you establish the direction in which the signal is strongest from each antenna you will know where your dog is (direction and distance).

    Think of it like two passive radars. In fact the spinning radar antennas you see on boats/at airfields etc do exactly this... (tho they are probably active). So you can get away with just two antennas if you set them up to spin nicely.

    A key point is to have the source be strong enough to not get confused, or to key it (ie have it transmit on a particular frequency). Of course there are restricted frequencies/transmission strengths that you have to abide or some angry lookin guys in suits may well come pay you a visit (the ACMA deals with all the legal bits).
    Simple signal conditioning ccts also help trying to pick out a weak signal amidst noise etc (filters/amps etc).

    In short, this project is very much doable... after all, we had radar in WW2.
     
  20. malloc

    malloc Member

    Joined:
    Dec 15, 2005
    Messages:
    529
    Location:
    Adelaide
    Do you need to access the positions in real-time?

    If not, I'd get a portable GPS unit with logging capability. Stick in a flash card and it'll record positions every second until the battery runs out.

    If it's a small unit you should be able to strap it to the dog (maybe attach it to the back of one of those walking harnesses?) provided your dog isn't too tiny.

    Take it off when you get home and download the data to your pc. Done!

    Another option would be mount a small wireless camera + battery on it's back - send the pics to your pc or a DVR and watch it when you get home.
     

Share This Page