edrum to midi via bluetooth

I am new to Arduino so I am seeking guidance on the feasibility of this project i have planned.

I have 2 Uno's and 2 HC-05 Bluetooth things. Last night with the help of a YouTube video i got these talking.

My plan is for the slave module to register the hit on a piezo in the electronic drum. Then send the strength of the hit along with which piezo was triggered to the master module.

The master module will bundle that info into a midi packet and sent it to the Drum Module.

All this needs to happen in a matter of a few milliseconds. From hit to sound needs to be as close as possible to instant.

Last night I did a tutorial and learned how to read the piezo using analogRead(). The tutorial then said to delay(2) // wait a bit for the analog to digital converter to stabalize after the last read

I cannot afford to wait. I may play the drum 2 or more hits in rapid succession.

By the looks of what i know so far, this is not going to work.

Anyone have some insight into how I can do this?

The delay of 2ms will allow you to sample a signal 500 times a second. Sampling theory says you could sample a signal with less than half the sampling frequency. That would mean less than 250Hz.

A/D converter can convert signals that are many times faster than that. Some can sample in the GHz range (not the one in your Arduino). :slight_smile:

I would recommend you read up a bit on A/D conversion. There are a few things you need to consider.

Regarding the overall delay. The issue is more likely the Bluetooth connection.

To get more specific help. Please read the "How to post" and add some more information.

  • link to datasheets of non-Arduino components
  • schematic (hand drawn photo with smartphone is OK)
  • your source code

General Guidance and How to use the forum

I had a pointless question here.. Just edited it out.