Shop OBEX P1 Docs P2 Docs Learn Events
PING to Earth — Parallax Forums

PING to Earth

rjo_rjo_ Posts: 1,825
edited 2008-03-17 17:05 in Propeller 1
A while back, Ken (http://forums.parallax.com/forums/default.aspx?f=25&m=134377) was using a PING and every time he got the sensor
within about 20" of his VGA screen, the screen went nuts.

This morning I decided to mind my own business and play with my PING module. The documentation is really nice. One of the threads gave a fabulous
link about ultrasonics: http://www.seattlerobotics.org/encoder/may97/sonar2.html. The circuit seemed too simple to screw up and the object was really straight forward.
Aside from the fact that a sonar type device is not a laser range finder... what could go wrong?

The first thing was that I wanted to use my 4D 96 bread board set up, which is already 5V and which has a Prop built in and works just fine, but then I didn't know exactly which numtowhatever function to use to convert the value coming back from the ping object so that I could display it on my 96. I futzed around for a while, got impatient and finally took the 96 out of the 5V circuit and just hooked up a signal line from a proto board I/O into my existing circuit and set up my tv terminal.

Of course I got unusual results... nothing greater than about 46 inches and really funky data mixed in with strikingly good values... 0,0,good result,0,0,garbage,0,0, good result,0,0 etc. So, like everyone else I was thinking about a filtering strategy and playing with various software modifications. So, after a while, I was beginning to think that maybe my pinger was too close to a capacitor... so I moved it. And I "neglected" to turn everything off before I went yanking away at stuff... low and behold, before I had a chance to plug everything back in... I was getting readings... really regular readings ... 46 inches. With nothing plugged in to power!!!

So, I took my pinger module out and put it aside and just plugged my 14 inch connecting wire into the IO pin on the protoboard and nothing on the other end, the wire was just hanging in the wind... and low and behold I still get 46". So, I moved my wire one pin over from my PROP IO line and I still got readings.

I tried it all again with just a short jumper... and my reading decreased!!!

So, the conclusion is... 1. Ken had his io pin too close to his VGA pin, his wire was too long and there was something funny about his ground.

HERE's MY QUESTION: how do you know when you really are grounded? Obviously, I needed to ground my 5V circuit through my proto board as well as through my powered 5V circuit. This just doesn't seem like a good idea[noparse]:)[/noparse]

Any thoughts or reflections would be appreciated.

Rich

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-17 17:05
    Rich,
    Remember that what we're dealing with here is really RF energy where the energy tends to travel on the outside of conductors and there's a lot of capacitive and inductive coupling between conductors. Pulses reflect from discontinuities like a sharp bend in a wire, etc. The only way to really tell whether you're really grounded is to look at the waveforms on the conductors (without changing the characteristics of the conductors too much) and look at radiated signals around your device.

    General rules for high frequency signals:

    1) Keep wires as short as possible.

    2) Use twisted pairs or shielded cable where possible when there's more than a few inches involved.

    3) Use a power supply bypass capacitor (0.1uF typically) at every complex IC (like a microprocessor or peripheral) and every 2 or 3 simple ICs.

    4) Avoid running several wires together in a bundle for distances of more than a few inches unless they're twisted pairs or shielded.

    5) A ground plane is helpful. You can sometimes approximate this by having multiple short ground wires connecting parts of a device to other parts (sort of a grid).

    6) Be careful about ground loops when there are long ground connections between parts of a device. See: en.wikipedia.org/wiki/Ground_loop_(electricity).
Sign In or Register to comment.