Replies: 3 comments 3 replies
-
|
Hi, sorry, I'm a bit confused where exactly you got stuck.
So you are using a normal IO (i.e. non ADC) pin? Have you checked that the voltage consistently crosses the threshold voltage for a logical high when hit? How did you connect the sensor, did you use any additional components? How do you try to read the input pin in software?
So you tried with a button instead of a piezo and it works? Then it should not be a software issue. Cheers |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Thanks for the quick response. Let me answer your questions: Pin type: Yes, I'm using GPB7 on the MCP23017 I2C GPIO expander (digital pin), not an ADC pin on the XIAO (although I did try several GPIO pins on the XIAO, even though most pins seem to be used already in the circuit). Voltage measurement: I haven't measured the actual voltage output from the piezo circuit yet - that's likely the key issue. The piezo circuit works perfectly when connected to the ADC inputs on the existing drum sensors, but I suspect the voltage may not be reaching the logic high threshold (typically ~2.4V) needed for reliable digital detection. Circuit: I'm using the same protection circuit as the working drum sensors in the hybrid circuit that I built.
Software: Reading through MCP23017 I2C in the controller processing loop, similar to how the navigation buttons work. Additional findings:
I suspect the issue is that the piezo circuit's voltage output (designed for ADC) isn't sufficient for reliable digital GPIO detection on the MCP23017. Would you recommend:
The kick pedal definitely works - it triggers perfectly when connected to any of the existing drum ADC inputs. I just remembered, I DID try a microswitch at first - However, it was just a quick splice into one of the navigation buttons (the SHARE button in TATACON mode) for proof of concept, and it worked just fine. I quickly realized that I now wanted to make a piezo sensor for quicker response time and rapid-fire hits with the pedal. In addition to the nicer pedal, I wanted it so that the trigger wasn't simply spliced an existing navigation buttons.... I wanted to give it its own, dedicated pin as well as make an entry into the firmware to turn the kicker pedal on and off (just because). If it helps, with the PIEZO connected, I do get continuity whenever I tap the sensor and that continuity comes right at the pin on the board that I'm connected to so I know it's getting there. It's just not flowing past it. So, I guess that's tells us that the piezo sensor may not be putting enough for the software to read. BUT, like I mentioned above, if I'm getting a continuity at the board and ground when I tap my pedal Perhaps there are multiple variables at play here. The piezo sensor works, but I now have something incorrect in the software for the dedicated pin. Do you see any reason why pin A7 or B7 (both unused) on the expansion board wouldn't be allowed to work if my code changes were correct? Thanks again for your help! |
Beta Was this translation helpful? Give feedback.
-
|
That makes thinks a bit more clear, thanks :) A few unsorted thoughts on this:
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
So, I built a kick pedal with a piezo that acts the same as the drum sensors in your circuit. I can plug it into any of the drum pad units and it triggers perfectly well.
I'd LOVE to be able to connect my kick pedal as an additional sensor/trigger so I can play Clone Hero with a bass drum.
I have tried adding an additional input to the XAIO board directly to a GPIO and I was having issues with that. (I wish it had ONE more ADC pin, lol). I also tried coding it so that I could use one of the spare pins on the i2c expansion board as well, But I keep running into issues. It's almost as if there's not a single pin free to properly add this.
I don't need anything crazy I just need something that converts the Piezo after a certain voltage to a digital button press - and it would be even fine just assigning that button press the spacebar or a single button.
If it's a big deal, disregard, but if it's just a few lines of code that could be altered I would appreciate that if it was possible.
Like I said, I tried several things and the button works to the point that continuity at the board will trigger when I press the button so I know the Physical connections are right. It's just something with the software.
Than you in advance!!
If you'd like me to send you what I've tried I can do that as well.
Also, I'm more than willing to help test it out if needed.
Beta Was this translation helpful? Give feedback.
All reactions