Mt8870 Arduino

0 views
Skip to first unread message

Rita Seliba

unread,
Aug 5, 2024, 3:50:02 AM8/5/24
to causondipos
Myproblem: when I first power up DTMF circuit, arduino recognizes my if statement as true and serial answers with "Input detected.", evendo all 4 DTMF outputs are low. When MT8870 gets first dtmf signal (doesn't matter from which key), arduino starts working as it should - I only get "Input detected." if '1000' combination is active (key 1). If I turn the power off and then back on again, I'm stuck with the same problem again, until a key get pressed.

And btw, grounds from arduino and my circuit are not connected, should they be? Because if I connect the grounds, keys 1, 2 and 3 from mobile aren't detected by MT8870. If I seperate the grounds, all keys work.


So by using an external power supply I've got it to work as I wanted - with first key press I choose a device that I want to control and with second key press I turn it on or off. I want to simplify the code now, but I'm no expert in programming, so any tip would be aprecciated.


It sounds as if you've got an unexpected voltage difference between the Arduino and your DTMF decoder. Can you measure the difference between the two grounds when the system is wired up in the way that works? Can you measure the signal voltage on those four pins relative to Arduino ground? If the grounds are close and you are getting a positive voltage in the right sort of range, it should work. So presumably you aren't. So you need to see what's actually happening on those pins.


PeterH:

It sounds as if you've got an unexpected voltage difference between the Arduino and your DTMF decoder. Can you measure the difference between the two grounds when the system is wired up in the way that works? Can you measure the signal voltage on those four pins relative to Arduino ground? If the grounds are close and you are getting a positive voltage in the right sort of range, it should work. So presumably you aren't. So you need to see what's actually happening on those pins.


I'm powering my arduino via USB and my circuit from external 5V (230V) supply. Ground difference is 0,36V. If I join grounds only, half of the keys stop working. If I join grounds and external 5V + arduino 5V it starts working again. Does this make sense? Does is maybe have to do something with laptop power supplies and/or some 230V installation having GND an N joined together?


I mean it's not a huge problem if I don't use a tweaked code, but as you said, it would help me if I start adding more devices. Thanks anyway, I'll try some more minor changes and see if it starts working.


wicket:

I'm powering my arduino via USB and my circuit from external 5V (230V) supply. Ground difference is 0,36V. If I join grounds only, half of the keys stop working. If I join grounds and external 5V + arduino 5V it starts working again. Does this make sense? Does is maybe have to do something with laptop power supplies and/or some 230V installation having GND an N joined together?


Can you measure the DC voltage from the signal line to ground on your DTMF detectors and the same on the Arduino when you have the grounds connected? It may be that those fractions of a volt difference are enough to take your signal below the threshold that the digital input will detect.


Read the datasheet - your circuit is broken. In particular, INH and POWERDOWN (pins 5 and 6) should be tied to ground. I'm also not convinced the 5k resistor on the ground side of the input is needed - it may result in too much attenuation. a 0.1uF for C2 should be sufficient for headphone/speaker level audio sources. How large are the LED resistors? Check the datasheet to make sure the 8870 Qn outputs have enough drive, or just disconnect them temporarily.

3a8082e126
Reply all
Reply to author
Forward
0 new messages