-1

I've built a switch key matrix (thus the diode, contextually useful schematics below) and me being me, I realised after that I misunderstood a few things about how button really works, to say the least... So anyway, I want to save it so I plan on a solution which, to my surprise, is half-working: When I remake the entier circuit on a breadboard (mistake & solution), it's working but when I do it with my PCB, it doesn't...

The 5V+ is from a digital pin set to HIGH and I've mesured w/ an oscilloscope the tension between the ground and a digital pin ("Arduino INPUT") on the breadboard and on the PCB, with the input pin connected and not connected:

Connected Not Connected
BreadBoard 2.5V+ 5V+
PCB 0V+ 5V+

So it's seems like the pin is becoming one with the ground but I can't find anything that could explain this. I've been testing and trying to understand what the hell was going on for multiple hours now and I runned out of ideas... Does anyone here have an idea of whats might happening ?

enter image description here

4
  • this may help ... electronics.stackexchange.com/questions/562412/… Commented Sep 8, 2023 at 19:16
  • Well, that is helpful ! I still need to really understand it but this link seems to help a lot: gammon.com.au/forum/?id=14175 Commented Sep 10, 2023 at 15:22
  • look at the "initial case" circuit ... change arduino input to arduino output .... add arduino input to switch pin 1 Commented Sep 10, 2023 at 17:57
  • Yup, I got it but I still would like to understand why it "sinks" the tension... Commented Sep 11, 2023 at 6:46

1 Answer 1

0

Are you supplying the breadboard from a 5v power source, other than the one that is supplying the Arduino?

Is there any reason why you are using a diode between the button and the arduino pin?

Arduino can sink and source current and with the 10k resistor that diode is just "dropping" some voltage, i would remove it if you really don't have any other use for it.

If you are supplying the PCB with a different power source than the arduino, you have to "join" the 2 grounds, connect the groud from the power source of the PCB to any ground pin of the arduino. if you could take a photo that could help.

Something like this :

enter image description here

5
  • 1
    There's a diode because it's a part of a key matrix. The 5V+ is from a digital pin set to HIGH so the breadboard is fed with that. Regarding the 10k resistor, I know it's a mistake and I'm trying to fix it. The thing is, the fix is acting strangely... What are you using for your schematics btw ? Commented Sep 8, 2023 at 17:18
  • But can't you bypass the diode? can you post a picture of how you have the thing connected? I'm using an old software called Circuit Wizard Commented Sep 8, 2023 at 17:22
  • It«s really important that you connect the ground of the pcb power supply (if there is a different one) to the arduino ground Commented Sep 8, 2023 at 17:23
  • 1
    @O'Schell the info about the diode belongs in the question ... please edit your question and add the info Commented Sep 8, 2023 at 19:00
  • Diode info added and the ground on the PCB isn't used in the circuit: I only use the arduino one Commented Sep 10, 2023 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.