Ultrsonic sensor HC-SR04 and URM37 - Theremin issues

Hello! Im new around here so thanks in advance for the support and amazing comunity you guys Keep up!...

Anyway I hope someone can help me out with this issue I have... Im not really an expert in to code, I just have the right knowledge to change some things in the code, adapt very simple sketches... but right now I know I need help with this one :slight_smile:

I recently fund parts of a project kind of a MIDI controller (theremin like), using two Ultrasonic sensors URM37, a 20x4 LCD, encoder and 2 buttons. It uses a library called URMSerial.h for the sensors.

I have around 4 HC-SR04 Ultrasonic sensors... and I would love to be able to use them instead of the URM37, as they cost around 20€ each!...

URM37 http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/xz227_gm348/xz227_gm348/URM3.2_Mannual_Rev2.pdf
HC-SR04 http://www.micropik.com/PDF/HCSR04.pdf

My questions are:

  1. Is it possible to adapt the sketch and use it with the Ultrasonic.h library that the HC-SR04 uses?
    or
  2. Is it possible to use the HC-SR04 as a URM37?

Many thanks in advance!!
All the best.

Multiman:
Hello! Im new around here so thanks in advance for the support and amazing comunity you guys Keep up!...

Anyway I hope someone can help me out with this issue I have... Im not really an expert in to code, I just have the right knowledge to change some things in the code, adapt very simple sketches... but right now I know I need help with this one :slight_smile:

I recently fund this project http://www.buildbrighton.com/wiki/Theremin which is an amazing MIDI controller (theremin like), using two Ultrasonic sensors URM37, a 20x4 LCD, encoder and 2 buttons. It uses a library called URMSerial.h for the sensors.

I have around 4 HC-SR04 Ultrasonic sensors... and I would love to be able to use them instead of the URM37, as they cost around 20€ each!...

URM37 http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/xz227_gm348/xz227_gm348/URM3.2_Mannual_Rev2.pdf
HC-SR04 http://www.micropik.com/PDF/HCSR04.pdf

My questions are:

  1. Is it possible to adapt the sketch and use it with the Ultrasonic.h library that the HC-SR04 uses?
    or
  2. Is it possible to use the HC-SR04 as a URM37?

Many thanks in advance!!
All the best.

PD: This is the Sketch - Therething:

https://github.com/tub/Therething/blob/master/Therething.pde

For sure, I would start by using the NewPing library instead of Ultrasonic.h. You'll have nothing but problems with Ultrasonic.h, even worse problems if you're trying to use 4 sensors. NewPing is specifically designed to be fast, simple, small, accurate, and allow you to ping multiple sensors.

http://arduino.cc/forum/index.php/topic,106043.0.html

Tim

Hello Tim, thanks for the link...

I will experiment with the library a bit, and try to find a way of using it in the sketch... I still finding a bit hard to find inside the Therething.pde file the lines which are using the URMSerial library... in order to swap them

Anyway, thanks a lot for the info!
Julian

Hello Julian / Multiman,

Did you ever get it working with HC-SR04 sensors? I am embarking on a similar path, and like you I'm a newbie at this stuff.

Let me know if you found any helpful resources/designs out there. There are quite a few but most are missing pieces or are using different sensors.

Thanks,
John

Hi John,

Unfortunately, as you say, there is not a lot of consistent info, the net is full of missing pieces, not enough information or just not suitable for this project needs... I ended up giving up regarding the HCSR04, there are other more versatile and cheap solutions like Light Dependent resistors, or the Sharp GP2022 and others alike... it all depends on what you want to achieve.

Good luck with your project!