Timeline for Sensing NES controller plugged in with Arduino
Current License: CC BY-SA 4.0
25 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 12 at 22:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 14 at 2:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jun 8, 2023 at 12:26 | comment | added | periblepsis | @maduranma What did you measure? | |
S Jun 5, 2023 at 8:58 | history | edited | Velvet | CC BY-SA 4.0 |
fix typo
|
S Jun 5, 2023 at 8:58 | history | suggested | greybeard | CC BY-SA 4.0 |
capitalisation, further nits. For greetings and thanks, see https://electronics.stackexchange.com/help/behavior on chit chat.
|
Jun 5, 2023 at 8:04 | review | Suggested edits | |||
S Jun 5, 2023 at 8:58 | |||||
Jun 5, 2023 at 3:42 | answer | added | Tim Williams | timeline score: 1 | |
Jun 5, 2023 at 3:10 | comment | added | Hearth | @maduranma I think you're misunderstanding the point of pull-up resistors, because you keep using the term in a way that seems nonsensical to me. | |
Jun 5, 2023 at 2:20 | comment | added | maduranma | @periblepsis okey, I have it at home, I'm going later and will measure the power draw of the controller when powering it with 5V and when pressing buttons. Thanks! | |
Jun 5, 2023 at 2:19 | comment | added | periblepsis | @maduranma I think this calls for some testing on your end. You should have a multimeter (or a power supply that also includes a meter telling you the current draw, when powering a device) and should be able to clear up the issue, quickly. | |
Jun 5, 2023 at 2:14 | comment | added | maduranma | @periblepsis I cannot find where I saw it, as I've been researching a few hours. But the reason I guess is because for each button there are pull up resistors which adds power draw | |
Jun 5, 2023 at 2:12 | comment | added | periblepsis | @maduranma The 4021 draws microamps, quiescent. Even with the data out pin active, I don't imagine the controller draws 3 orders of magnitude more than the datasheet annotates. What's the source of that number? Also, I'd recommend just tethering the data line with a high-value resistor (47 k, perhaps) to ground. Easier and cheaper than bothering with detecting current at the power pin. | |
Jun 5, 2023 at 2:08 | comment | added | maduranma | @periblepsis I tought of that, but I don't know how to design a circuit which senses if there's power draw. If arduino could provide enough power through a pin, I guess it would be enough with a pull up resistor, but I read the controller draws about 250mA, which is higher thant the pin max current. | |
Jun 5, 2023 at 2:06 | comment | added | Hearth | You could also theoretically add a mechanical switch to the connector that's pressed by inserting it (barrel plugs and phono jacks usually have these; the NES controller connector doesn't without modifying it though). | |
Jun 5, 2023 at 2:04 | comment | added | periblepsis | @maduranma If the 4021 is present then the pin you will be reading is actively driven. The 4021 can sink and source current (in the small mA area.) If there is nothing connected at the connector (no 4021, and power isn't being drawn) then the pin will be very high impedance (near infinity) and you can tether it lightly to ground without harm. You could also just detect current being drawn on the +5V power pin, too. That should also be another way. Nothing connected means no current being drawn. | |
Jun 5, 2023 at 2:02 | comment | added | maduranma | @periblepsis Well, I do have the european version, but I think it's the same. To be fair I haven't tried it. The thing is, if the data pin is floating, then I'd get random 1s and 0s, so I might read 8 1s in a row, can I pull up the data pin? | |
Jun 5, 2023 at 1:58 | comment | added | periblepsis | @maduranma Is this just the old 'box' controllers sold with the NES in the US? If so, those use a 4021, I think. Since the way that the controller works, it reads "1" for buttons that are not pressed, then a controller that is just sitting there should feed back a series of 1's to you when you latch and clock them out. (The NES hardware would invert them back for the 6502 software. But you don't care about that.) If there is nothing connected, you can arrange things so that you will read "0" bits, instead. (It's very unlikely that a connected controller will have all 8 buttons held down.) | |
Jun 5, 2023 at 1:56 | comment | added | maduranma | @Hearth to be fair, I just don't know, I'm really new, the what to use is what I don't know for that purpose, it was just an idea that probably makes no sense :'( | |
Jun 5, 2023 at 1:47 | comment | added | Hearth | @maduranma Are you talking about using a current shunt? You could do that, but you'd definitely need a current sense amplifier attached to it if you don't want to use such a large resistor that it just doesn't work at all. | |
Jun 5, 2023 at 1:41 | comment | added | maduranma | @jsotola I considred that, but those pins are not internally connected, just floating, so I cannot measure continuity through them | |
Jun 5, 2023 at 1:15 | comment | added | jsotola | pin 5 and pin 6 in the connector are unused by the controller | |
Jun 5, 2023 at 1:07 | comment | added | maduranma | @Hearth well, 5V from arduino would go to 5V of the controller, and GND pin of the controller would go to GND pin of the arduino (to get usb power). I tought maybe between the GND pin of the controller and GND pin of the arduino adding a resistor to a pin? Or something similar? Again, I can't imagine a way. | |
Jun 5, 2023 at 1:04 | comment | added | Hearth | What are you proposing with a resistor? It's hard to envision what you mean. Could you draw it? | |
S Jun 5, 2023 at 0:49 | review | First questions | |||
Jun 5, 2023 at 8:04 | |||||
S Jun 5, 2023 at 0:49 | history | asked | maduranma | CC BY-SA 4.0 |