[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 176 KB, 1500x1500, 71hHhe1lZML._SL1500_[1].jpg [View same] [iqdb] [saucenao] [google]
2048669 No.2048669 [Reply] [Original]

I know literally nothing at all about electronics. I can solder two wires together and that's about it.

I want to wire piezo components to the buttons of a NES controller. I know I also need the electrical equivalent of a noise gate, whatever the fuck that would be, between the piezo and the controller so it's not constantly sending signal due to ambient vibration.

A) How do I do this or
B) If you don't want to spoonfeed me, where do I start learning what I need to accomplish this?

>> No.2048690

>>2048669
It's not clear what you are trying to do here. Are you wanting to use piezo sensors in lieu of button presses? or activate piezo buzzers when you press buttons? or upgrade the controller to have some sort of vibrational feedback?

>> No.2048693

>>2048690
Sorry, I want to use piezo sensors in lieu of button presses.

>> No.2048705

>>2048693
use a microcontroller with built in ADC to interface the piezo and "press" the buttons. most simple path is prototype with arduino then use a bare atmel micro as final. sparkfun has a tutorial on hooking piezo to arduino. not sure how nintendo buttons are interfaced in the controller without looking it up, if they just pull a line to ground then it should be easy to pull a line low with an atmel output pin, should take only a handful of lines of code.

>> No.2048721

>>2048705
NES polls the same pin 8 times per frame to get each of the 8 buttons.

>> No.2048819

>>2048693
why

>> No.2048823

>>2048819
already know how to program asm for NES. want to write a program that takes button inputs and plays sounds, so you can use drum triggers to play NES music live.

if i can't do it on actual hardware then it's not worth it tho

>> No.2048900

So as stated in the OP I know fuck all about electronics. Do I actually need a microcontroller for this?

Why can't I just use the piezo transducers to bzzt the right part of the circuit board as though a button was completing its circuit?

(genuine question. if it's a retarded question, it's because i am retarded)

>> No.2048912

>>2048900
Because the piezo sends out an AC signal possibly of very short duration and you need to detect that and send a pulse to the button which will probably involve pulling it to either logic low or logic high for a short amount of time similar to a natural button press by a finger. Also potential "noise filtering" if the piezo responds weird to small vibrations. The micro both has all the circuitry to do this in one chip, plus, the ability to be programmed as to how long a pulse is a "beat" vs noise and how long to hold the button for. Converting the AC without the micro with an ADC will take some discrete circuitry that will both be a pain in the ass to design, and be more expensive, and take up more room, than a $3 atmel chip.

>> No.2048918

>>2048912
Is there a type of component I can put between each piezo and the microcontroller to gate the signal (so it doesn't respond to ambient vibration).

That would be better than doing that in software.

>> No.2048936

>>2048918
Different poster here, arduino makes it braindead simple. Connect piezo to arduino, and gpio out to button contact. Logic will be something like, if analog pin = (above certain value), send low signal to pin 1. Then copypaste that logic to every other pin. You can also tweak the sensitivity by changing the value needed to trigger an output.

>> No.2048955
File: 47 KB, 800x547, FASBGILI4SCSNBA[1].jpg [View same] [iqdb] [saucenao] [google]
2048955

>>2048936
sounds good.

might require more reading about the NES controller specifically, but would i wire the output to the spots indicated on this diagram? or close to where the buttons themselves actually are?

>> No.2048963
File: 52 KB, 800x547, nescontroller.jpg [View same] [iqdb] [saucenao] [google]
2048963

>>2048955