Page 2 of 2

Re: Ultra-Sonic Ranger - GH-311RT DATASHEET?

Posted: Sun Feb 15, 2009 10:22 am
by esp
Hi there:

We are facing the same problem. But the code is fixed and the module is not our own product so we can't change it. We would have our own PING-like module, maybe you could consider use the measurement module, Thanks! ... p-163.html

Re: Ultra-Sonic Ranger - GH-311RT DATASHEET?

Posted: Sun Feb 15, 2009 12:58 pm
by bleepbloop
I have an idea. I saw in a previous post that at 9V the range is 2.2 meters. At 5V the range is much shorter about 30 cm. Is it possible to vary the voltage to get a different threshold turn on distance? For example at 5.5V it would be 45cm 6V 50cm. I haven't tested this because I don't have a power supply but if the distance varies by voltage a simple circuit can be made with a microcontroller to vary the voltage multiple times to determine how far an object is and turn on and off the unit to reset it.

Re: Ultra-Sonic Ranger - GH-311RT DATASHEET?

Posted: Wed Nov 07, 2012 11:56 pm
by marc20

I just read your post about the datasheet saying that input voltage should be 6 to 12V.
The PNG sensor works on 5V and I tried your sensor on arduino 5V as per the sketches I had seen so far and not knowing your sensor needed a higher voltage.

It seems to work with 5V, but can you confirm that 5V is insufficient and that I should really look at giving it at least 6V?


Re: Ultra-Sonic Ranger - GH-311RT DATASHEET?

Posted: Thu Nov 08, 2012 1:00 am
by marc20
Something else, I'd like to double check.
I changed your sample code as such:

// ... ent_module says
// If no obstacle is detected, the output pin will give a 38ms high level signal.
duration = pulseIn(ping1Pin, HIGH, 38000);

I noticed that none of the PNG test code I've found puts a timeout on pulseIn. I have interrupt code that cannot afford to wait a full second
Can you confirm that my timeout is correct, or can I actually use a smaller timeout?

Re: Ultra-Sonic Ranger - GH-311RT DATASHEET?

Posted: Mon Nov 12, 2012 6:35 am
by marc_vd
I would still very much like someone's comments on what voltage is required (5V ok, or 6V+ required).

About my previous message, the default code given here works, but it's very inefficient since it uses a default timeout of 1sec on pulseIn.
Bounding this by 38000 us would likely be ok, but a much better answer is to use the custom library NewPing.