Shop OBEX P1 Docs P2 Docs Learn Events
need help with ping sensor — Parallax Forums

need help with ping sensor

hummelmhummelm Posts: 3
edited 2010-07-08 01:53 in Propeller 1
i have been trying to use the ping))) sensor with the usb propeller, i have tried to get it to work with a demo ping program and i have tried to get it with one i wrote and no matter what i try i cannot get the ping sensor to turn on and work. i attached a modified program that i made·and i was wondering if someone could help me by looking at my program and telling me if there are any problems with it? please, i need the sensors to work for a school project that i am doing.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-30 15:46
    Try not using the "LONG[noparse][[/noparse] range ]" and using just "range" instead. The "LONG[noparse][[/noparse] ]" (as well as "WORD[noparse][[/noparse] ]" and "BYTE[noparse][[/noparse] ]") uses the value in the "[noparse][[/noparse] ]" as a memory address and fetches the value at that address to use ... not what you want here.
  • hummelmhummelm Posts: 3
    edited 2010-04-30 23:58
    i tried that, but either way the green light on the front of the ping))) sensor will not blink or turn on and it does work with the basic stamp 2. is there anything else that it could be?
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2010-05-01 23:08
    Hummelm, if you do not see the light on the Ping sensor go on, it could be because the voltage it is connected to is not 5 volts. The prop is different than a Stamp in that the Stamp runs at 5 volts, the Prop at 3.3 volt. If you run a Ping at 5 volts and take a 3.3 v connection to the signal pin it works fine. The servo connectors on a protoboard should work fine if you have soldered headers into them.

    It might be helpful if you described the board you are using to connect it to (and how), or even better still a picture. I have used a Ping with a prop like a zillion times on robots, it works great. Let me help you make it work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Robots
  • hummelmhummelm Posts: 3
    edited 2010-05-02 16:45
    george, thanks for that info, i am new to the prop, i am using the prop usb and i just started using it on tuesday. i will post again tomorrow when i get back to work but i think you have made me realize a problem so thanks again.
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2010-05-03 04:52
    If by "prop usb" you mean the PropStickUSB then that does not have a regulated 5v supply. You have to be careful, because while that can take up to 9v, you can wreck a Ping sensor with > 7v. So maybe you can run the whole thing on 6v, or have two different voltage supplies.

    If you mean the usb protoboard, then in the top right corner there are four sockets for servos that you can hook into the regulated 5v supply. This is a great way to run a ping sensor.

    The two big things to be concerned with a Ping in my experience is don't hook it to a circuit with too much voltage. I have wrecked a couple by hooking them directly to a 7.2v battery. The second thing is that like servos they can cause a brown out if you have low battery or weak power supply. If you burn out a Ping from too much voltage, it will not light up when it gets a signal and it has the appropriate power. It will also not light up if it is not getting enough power. If you have a brown out, your code will load, run, and at the moment the Ping is about to fire your program will reset (assuming there is something in EEPROM).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Robots
  • vanmunchvanmunch Posts: 568
    edited 2010-07-08 01:53
    Just wanted to let you all know that this thread helped me. Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My wife is very, very understanding
Sign In or Register to comment.