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:

Adding Extra Switches - ZynthianWiki

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