Using HC-SR04 digital sonar with APM

Hi there,

I was wonderining if is possible the wire up the HC-SR04 digital sonar with APM 2.6 board. I've read different forums about this topic, and haven't found any answer (or, that's what I think so). 

Nowadays I'm buliding an Coax-Copter with an avoid collision module. Firmware for flyinig is working allright, so now the problem is avoid collision module and that's why I'm asking for the sonars. I have 2 ideas for wiring it Up.

1.- There is an NewPing library for Rangefinder like HC-SR04, but for each sonar it requires 2 digital inputs. As I want to use 4 sonars, I'd need 8 digital channels, but isn't possible because digital input pins on APM are thought to be used with RC inputs. So, there's a problem.

2.- I don't know if it's possible to use the Analog Rail on APM 2.6 as digital inputs. If possible, problem should be solved.

3.- Try to convert the 4 pins sonar in one of 3 pin sonar with analog output. Not sure if possible or how to do it. 


I've seen this video: https://www.youtube.com/watch?v=aNZLQPg6CEE, and seems that the guy could use an HC-SR04, but he plugs it with APM only with 3 bus servo wire pin. Isn't weel explained the way he has done. Any help will be appreciated, 

Juan Pedro

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • As I have posted on a few different threads on a few different forums the SR04 is less than worthless. It only "kind" of works when it is pointed directly at a VERY smooth surface and after a foot or so even then the return signal is so sporadic that it is just worthless. The scatter is horrible, the resolution is horrible.

    Do yourself a favor and toss them in your "no good" parts drawer and be done with it. I have probably 10 or so in my bin drawer. 

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…