-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with Ham Radio rather than Telephone #4
Comments
Hi McMullan, Can you measure the DC value? I think this should be ~1.6V. In my module, I need to detect the signal 2-3 times to get the pressed button. If you can output some debug values, you can play with the parameters to get a better result. Begin() is also important to detect the amplitude of your signal and should be called when you don't have any "sound" on the line. |
Ooops. I neglected to add the DC filter. I've added one, and now, rather than 0 .. 3.3V, the signal at the ADC is -1.6 .. 1.6V. |
Hi Ken, To be honest, I just have a single project using this library... But it works. |
I hope to get it to work in order to remove the MT 8870 from my project and basically miniaturise it down to a single small PCB. I also hope that other ham / IoT enthusiasts will pick it up and run with it. I hope you can help me understand further. I have a feeling the problem may be that there is no DC offset unless the transmitter is actually transmitting, whereas with a phone, there is always an offset. In my native setup, my output would read 0V while there is no transmission. This goes to 4V when there is a silent transmission, and the waveform is from 0 to 8V when the DTMF actually starts, How can I dump the contents of the ADC buffer acquired by the phone DTMF library? If I could get a look at it, it would help me understand if the problem is electrical or software. Thanks for your patience. |
If you are able to get an ADC from 0 to 3.3, you should get a nice signal and detect the tones. Play around with Here an example:
If nothing was detected, the 8 float array, have similar values. With the helper functions Be sure to call |
Right. I finally got back to this. The observations are:
This makes sense: I believe that the software expects this "carrier" to be permanently present (it is for a phone). If I understand the documentation correctly, the first call to dtmf.connect() "calibrates" it to the "nothing received" voltage. In my case this is zero volts, which is different from "transmission received, but it wasn't a DTMF" (4V). |
I've put the example programs on an ESP3866 Mini, connected to a handheld walkie-talkie. The radio is receiving DTMFs from a transmitter. I scoped the output from my radio jack at 0 .. 8V, and build a potential divider to split that down to 0 .. 3.3V.
When I try to use the library to recognise DTMFs, it's very unreliable. It recognises, maybe 1 tone pair in every 20.
If I write a little program to dump the ADC values, and inject 3.3V into the ADC, it registers 1023. The dump shows an average value of 15 when nothing is being sent, 511 when I press transmit and random numbers up to 1023 when I send a DTMF. This is all as I would expect, so I have confidence in my hardware.
Is if important that the sampling frequency is 6000? I set it at 12000 and MaxFrequence returned 11363, which I think is quite good. (It defaults to a little over 14000.)
I note that you mention a 12 bit ADC, which I'm confused about, since my values would suggest a 10 bit ADC with a 0 .. 3.3V scale.. I have tried "amplifier" values of 2 and 4, and also increased the sample size to 300. I believe each of these made it worse.
Do you have any suggestions for something else I might try, please?
The text was updated successfully, but these errors were encountered: