New connector "SW1" in All-In-One PCB v1.1

hi, just received the all in one board i ordered -thanks :slight_smile: I have started my build, and i notice the board has pads for a 5 - pin header marked sw-1 which is not shown anywhere on the site - what is it for?

1 Like

Expansions of some sort or another. It offers up the pins for other uses. . .

Hi Andrew!

This connector SW1 is not documented yet. It gives access to the spare
MCP23017 (GPIO-expander) ports and it could be used for extending Zynthian
hardware in several ways:

  • Adding extra switches to the interface, adding short cuts or new
    functionality

  • Adding MIDI actuators, like sustain/trigger pedals, connected directly
    to the Zynthian hardware.

  • Others? :wink:

Kind Regards,

1 Like

Others? :wink:

“User programmable” button/switch. Handling for example via zyncoder library midirouter part, something like MAP BT#1 CC#nn …

And now another “fun to be have”.
Two expander reserved inputs are assigned, but at least maybe this gives an idea to tinker with:

Port extender chip pins can be used also as outputs in mixed configurations - some are inputs, some are outputs and pins configured as outputs don’t interfere with interrupt logic to INTA/INTB pins. This is important part. Now comes fun part:

Pushbutton and LED, integrated inside or mounted above switch. This button can be used by program as some kind of toggles (state may indicated by LED), even in context (for example on admin screen Start/Stop options toggles), tapping some kind of tempo, doubling as encoder switch, user programmable actions etc. LED can be also used independently by Pi, for example as visual metronome, for Zynthian “busy” indication (loading programs or samples from card/usb stick) - same way as Zynthian logo does by now on screen. And of course one usage too - programmable LED always helps for debugging hardware/software cooperation :slight_smile:

1 Like

Those GPIO expanders have 3 address pins, so you can connect EIGHT of them on the same i2c bus. For a grand total of 128 I/O. If you want all those blinkenlights, just add another expander used as output only and light’em up! :smiley:

Just to say… :wink:

One problem with blinking lights is the power drawn raspberry pis suffer enough from low volts… That Saif thou at least we don’t have accurate voltage references that used to get affected. I’ve built analog synths that (initially) changed their tuning as the lights flashed…

Yes, i know this (addressing MCP23017-s), but this goes against KISS and requires redesigning All in one board. Just adding one LED requires only 470 Ohm resistor from +5V rail and nothing more. So i think that one MCP23017 (or pin compatible part MCP23S17 with faster serial SPI) is enough for one Zynthian. :slight_smile:
My addiction to one blinkenlamp :wink: for debugging goes back to time when i played with 8051 compatible controllers and using even serial terminal goes a bit complicated, when UART used for other things.

8051… Shudders… :grin:
It’s just one of those things that doesn’t always get considered when the design is on paper, please forgive my slightly patronising tone. :flushed:
It’s certainly obvious there is the demand for this sort of expansion and laying down some parameters and requirements is certainly sensible.
One thing I’d like to see is a standardised spi line driver board so we could run control panels remotely from audio handling zynths. A pedal board zynth with big display on the floor and an operating set of knobs and switches clamped to a mic stand would certainly make for a lot less scrabbling around on the floor at gigs…

Imho SPI is not good for remotely controlling Zynthian (outside unit) as this is mainly local bus. Even USB is better. I can imagine a possible situation, when disconnecting/reconnecting SPI “on the fly” freezes entire board - someone on live stage turns mic stand over…
About LED-s and currents - hm. Midi interface has three in official box (not to be counted LED-s inside optocouplers). And as it said, this is just an idea to consider, until free (reserved) extender pins are not yet officially assigned.

Good point. Slight over concern about how things work and not enough thought about how they fail

I copy here the current hardcoded configuration for the 4 zynswitches allowed by the new connector:

  • pin 1 => GND
  • pin 2 => WiringPi GPIO 106
  • pin 3 => WiringPi GPIO 107
  • pin 4 => WiringPi GPIO 114
  • pin 5 => WiringPi GPIO 115

And the current hardcoded configuration is like that:

  • PANIC switch (6th zynswitch) => pin 2 (106)
    • short => All Notes Off
    • bold => All Sounds Off)
  • Unused (6th zynswitch) => pin 3 (107)
  • Unused (7th zynswitch) => pin 4 (114)
  • MIDI CC64 (Sustain Pedal) (8th zynswitch) => pin 5 (115)

Switches are normally open, closing to pin 1 (GND).

I’m thinking about the best way of implementing a config interface for this :wink:

Regards,

When I played with 8051, without UART available, I had my own debugger output using a serial stream transmitted by a single IR led and read by another board (wich used a PIC 16C54JW… yes… the one with the glass window for UV erase :D) and shown on a 16x2 LCD display. I feel your pain.

But nonetheless a synth should have lights and buttons. No, it MUST have them. Many of them :smiley:

And knobs… Lots and lots of knobs…

… and all eventually failed… one after another… :smiley:

Which reminds me yet one more thing. Selector switch (CTRL_4) is most important and probably gets most intensive usage - turning etc. If CTRL_4 fails, then you are out of luck (ok, there is another lifebuoy with touchscreen). I’d like to see one more encoders to be capable of use scrolling up and down in menus, until intended usage is needed. For example CTRL_2 (back) scrolling works too in admin menus, layer selection, midi channel selection, instrument select etc. Pushing works as previously - back to previous screen. Menu item selected by CTRL_4 (select) as usual. Just scrolling through options on screens, where other encoders sit “useless” and CTRL_4 gets all the banging…

The reason why I have not yet rewrote the full Zynthian UI and made a Zyntian with a panel with so many potentiometers and buttons to shame a moog modular is that I do not have free time: D
Last week my boss asked me about my vacation, and I said that I don’t want vacation, I want that EVERYONE ON THE PLANET to believe me dead for a year! :smiley: :smiley:

image

Encoders fails (and fails often)… but the d-pad and data entry on my SY77 was still perfect when I gave it to a friend… let’s talk about BUTTONS and POTENTIOMETERS again :slight_smile:

1 Like

but the d-pad and data entry on my SY77 was still perfect when I gave it to a friend…

Offtopic, but you get an representation…
Evening on restaurant, one/two man bands, as those are common at least in east europe on 90-s. Drunken customer, standing and moving with difficulties and liquor glass in hand, going to ask from musician her favourite song: “Ee…goshhh…eee… hick, can you… hick… play… slurps… Oops, sorry! Ee… is that drrrink in your instrrrument is prrobblem… hick? You are so … hick-hick, nice guy, play now misty for me, all right? Ee?”

I got this Yamaha next day… cleaning with ethyl alcohol takes hours.

Ahahaha… yeah I’ve seen something similar (I mean, I was the one who had to clean the keyboard of a friend, who suffered a similar (worse, much worse) fate…

That’s now documented on the wiki:

http://wiki.zynthian.org/index.php/Adding_Extra_Switches

Regards,

3 Likes

I would avoid to rebuild my zynthian so I simple ask the community where the Pin 1 of the extra connector is. If I look from the small side where the midi connectors are is it on the left or right edge?

Thanks for answering my stupid question.
Roman