Hey I got a quick question about a specific component. I want to build Hagiwo’s 6CH gate sequencer, but am a little stumped with the rotary encoder and what pin is connected to where. I’ve never used one before and looking at the schematic, it really confuses me with what goes to what pin. Can anyone help? And I included the schematic as an example
That’s a bit of an odd way of representing one, though technically correct.
Generally, you’ll find them with 3 pins in a row, and sometimes an additional two pins on the other side.
Those two pins are the push button. Im unsure whether that’s the push button connected to D12, or if that’s a separate one.
The three pins represent the encoder itself. The middle one is the common pin, that goes to ground. The other two go to D2 and D3. The order is unclear from this schematic. But in the worst case it works reversed, which should be an easy fix in the firmware.
I have rebuilt this. The push button is the switch from the encoder.
Hey so I need help wiring one of Hagiwo’s circuit with the rotary encoder, specifically the 6 ch trigger sequencer. So far after programming the ardiuno and other components, it looks like it works given the screen seems to be fine. But I’ve spent almost an hour trying to figure out how to properly wire the rotary encoder to be able to navigate through the screen. I’ve had it where I had the two back pins be connected to ground and D12 on the arduino as the momentary switch. And when it came to wiring the pins, no luck either. I have a 10nf capacitor wired between pin 1 (A) and pin 3(B), another between 1 and pin 2(C) with pin 2(C) grounded since it is the common pin. But I’ve wired D3 and D2 on the arduino to pin 1 and 3 respectively, still didn’t work so then I switched where they were. Still didn’t work, can anyone help?
Oh no… That won’t work. If I remember correctly, he uses interrupts. That means it’ll have to be pins 2 and 3, not any other pin. If you want to add caps, put them between the outer pins and GND, not across the outer pins.
Wait I’m a little confused especially after reading my post and editing it after realizing I did a mistake on it. So say I take D2 and 3 from the arduino, I would wire them either to pin 2(C) and pin 3 (B) to see which ever one works while pin 2 (C) is grounded? And I’m still confused with the part on capacitors. Rotary encoders are confusing
You would need to take D2 and D3 from the Arduino, and wire them into the outer two pins, while the middle pin is grounded.
That the weird thing, I’ve already done that and its still stuck, the button doesnt seem to work either and I’ve been switching the wires from the pins and still nothing. Has anyone else had this problem?
Hmm that’s odd. I’d start out by debugging the hardware. If you have a scope, hook it up to the encoder pins and trace the signal to the Arduino. If you don’t have one, you could at least check the button with a multimeter. If that seems fine, debug the firmware. Put serial prints into the calls to the encoder and the button, see whether they’re actually reached. Good luck!
Well I have a scope, one of the probes is on the ground the other one is probing both the pin on the encoder and the pin on the arduino it is connected to. From what it shows, it detects a square wave whenever i turn the knob. This for both pins 1 and 3 on the encoder as well as on D3 and 2 on the arduino. I am not sure if this is a sign that it is working or receiving signal and I have verified that the button works. But how would I test the firmware exactly using a scope and what are serial prints?
That means your hardware works, good!
So you’re probably facing a firmware problem. In order to debug this, you’ll first have to understand what the code does. Then you can find the sections where the arduino reads the encoder pins, and check whether this happens properly. A handy tool for this is the
Serial.print() function, which allows you to write messages to the serial monitor on your computer. When you’re confident the signals are read correctly, move on to the next piece of code where they’re used. So try to go step-by-step, following the logic of the Arduino, until you find the point where stuff isn’t working properly.
I could give you a whole Arduino/C++ lecture here, but there’s a million of resources online Also, maybe @HAGIWO can help you if you don’t understand specific sections of the code.
Again, good luck!