Arduino 2560 - Delay/Lag on release on digital inputs #154
-
Hello ! First of all a gigantic thank you for this formidable tool ! We are building a music spaceship with two Arduino 2560, and currently have some latency on some buttons, but only on the release of the button. When we push it, the midi message is sent immediately. When we release, it take between 1 and 4 sec to send the note off signal. It seems like the Arduino have trouble to get back to the 5v value. Even more weird, when we connect a voltmeter to the 2 pins of the button, it get stuck in ON state, and it's only when we remove the voltmeter that it get back to off after 2 sec. It only happen on some digital inputs. It gets even more weird because when we use a cable to connect make the connection between the two sides of the button, we don't have this problem.. We've been searching for a while, we thought it might be the buttons first, but we changed it and experience exactly the same issue. Would you have any hints on where we should continue searching ? Could it be related to wiring ? Here are some pictures of this uncommon "controller" 😁 Thank you ! PS : I saw the other post about lag on analog inputs on mega 2560 but it doesn't seemed related. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hey, the spaceship looks crazy. :) Do you know which pins are related? You said you were using two Arduinos, is the issue the same on both of them, and if yes, is it always the same pins? |
Beta Was this translation helpful? Give feedback.
-
Quick update We thought we had found the solution : It worked ok but now that we are on another electrical installation we have the same’ issue. Still on the same buttons. It’s definitely related to ground but it’s hard to find a solution. We are using a Mac mini that isn’t connected to ground (only 2 wire power adapter). When using only the Mac mini and the arduino we have no problem. Then if we plug a screen (connected to ground) or sound card (connected to an amp connected to ground), then the issue is back. We are not sure how to deal with this so still searching.. We will post if we finally find a solution (I’m sure we will !) |
Beta Was this translation helpful? Give feedback.
-
Hi ! So after much more tries, it seems indeed to be related to a fault in grounding. The Mac mini that we are using has no ground. So, after some time we see a voltage around 30V between ground of the computer (and so for the Arduino), and the "true" ground (that is used elsewhere in the circuit). I can't explain how but it was preventing open deck to run smoothly (buttons would stay "on" and not go back to zero, or after some time - so we first identified it as a lag). We ended up "grounding" each problematic button with a resistor (like on the analog inputs). It has been running smoothly for a month, varying places and electrical installation, so hopefully we can consider this solved ! 😚💨👻 Here is a quick video of the spaceship running : Hvala lepo ciao |
Beta Was this translation helpful? Give feedback.
Hi ! So after much more tries, it seems indeed to be related to a fault in grounding.
The Mac mini that we are using has no ground. So, after some time we see a voltage around 30V between ground of the computer (and so for the Arduino), and the "true" ground (that is used elsewhere in the circuit).
I can't explain how but it was preventing open deck to run smoothly (buttons would stay "on" and not go back to zero, or after some time - so we first identified it as a lag).
We ended up "grounding" each problematic button with a resistor (like on the analog inputs).
It has been running smoothly for a month, varying places and electrical installation, so hopefully we can consider this solved !…