Difference between revisions of "Adding Extra Switches"

From ZynthianWiki
Jump to navigation Jump to search
(new info)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The All-In-One circuit can be tweaked for having 4 extra switches that can be used for a sustain pedal, MIDI switches (very useful for SooperLooper!), or for sending some specific MIDI message (program change, etc.).  
+
The All-In-One circuit can be easily tweaked for adding upto 4 extra switches that can be used for a panic button, a sustain pedal or other MIDI-CC switches (very useful for SooperLooper!).
  
 
The unused pins in the MCP23017 are:
 
The unused pins in the MCP23017 are:
  
pin 27 (GPA6)
+
* pin 27 (GPA6)
pin 28 (GPA7)
+
* pin 28 (GPA7)
pin 7 (GPB6)
+
* pin 7 (GPB6)
pin 8 (GPB7)
+
* pin 8 (GPB7)
The first 2 are bound to INTA and the other 2 to INTB.
 
  
You can check the schematic:
+
The first 2 are bound to INTA and the other 2 to INTB (but that is not really important to you, as it's handle by the zyncoder library ;-)
  
http://wiki.zynthian.org/images/4/44/Zynthian_allinone.sch.svg 8
+
If you have a recent version of the All-In-One circuit, you are lucky, as it includes an extra row-pin connector (SW1) that allows to easily use this extra GPIO ports. If you don't, you have to solder your wires directly to the MCP23107 pins. Not difficult at all, but not really nice.
 +
This is the pin assignment for the row-pin connector (SW1):
  
the UI active layer’s MIDI channel will be used.
+
* pin 1 => GND
 +
* pin 2 => WiringPi GPIO 106
 +
* pin 3 => WiringPi GPIO 107
 +
* pin 4 => WiringPi GPIO 114
 +
* pin 5 => WiringPi GPIO 115
  
So, the only things you have to do is:
+
You can check the schematic [http://wiki.zynthian.org/images/4/44/Zynthian_allinone.sch.svg here]
  
* update your zynthian
+
So, if you have a recent version of All-In-One circuit, you can follow these simple steps for adding your custom switches:
  
* solder a 5 row-pin connector to your AllInOne circuit
+
* Update your zynthian
 +
* Solder the 5 row-pin connector to your All-In-One circuit (SW1)
 +
* Connect some kind of switch between pins 2-5 and pin 1 (GND). The switches are normally open, closing to pin 1 (GND).
 +
* From the webconf tool, hardware menu, wiring section:
 +
** Select MCP23017_EXTRA as wiring layout. This will set your ZYNTHIAN_WIRING_SWITCHES to “100,103,108,111,106,107,114,115”
 +
** Configure the desired actions (advanced options). The UI active layer’s MIDI channel will be used for MIDI actions.
  
* connect some kind of switch between pin1-4 and pin5 (GND)
+
For instance, you could add a "Panic Button" to an official v2 zynthian:
  
* from the webconf tool, configure your wiring layout accordingly to the used pins: ZYNTHIAN_WIRING_SWITCHES’: “100,103,108,111,106,107,114”
+
[[File:Zynthian v2 panic switch.jpeg|500px]]
  
==Here are the default pin assignments:==
+
and configure the actions as follow:
  
pin 1 => GND
+
* Type: Ui Action
pin 2 => WiringPi GPIO 106
+
* Short push: All Note Off
pin 3 => WiringPi GPIO 107
+
* Bold push: All Off (All Notes Off + All Sounds Off)
pin 4 => WiringPi GPIO 114
+
* Long push: Reboot
pin 5 => WiringPi GPIO 115
 
  
And the current hardcoded configuration is like this:
+
You can read more about this subject in the next links:
  
PANIC switch (6th zynswitch) => pin 2 (106)
+
* https://discourse.zynthian.org/t/extra-switches-sustain-pedal-panic-button-etc/1843
short => All Notes Off
+
* https://discourse.zynthian.org/t/extra-switches-now-customizable-from-webconf/2765
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).
 

Revision as of 18:13, 31 March 2019

The All-In-One circuit can be easily tweaked for adding upto 4 extra switches that can be used for a panic button, a sustain pedal or other MIDI-CC switches (very useful for SooperLooper!).

The unused pins in the MCP23017 are:

  • pin 27 (GPA6)
  • pin 28 (GPA7)
  • pin 7 (GPB6)
  • pin 8 (GPB7)

The first 2 are bound to INTA and the other 2 to INTB (but that is not really important to you, as it's handle by the zyncoder library ;-)

If you have a recent version of the All-In-One circuit, you are lucky, as it includes an extra row-pin connector (SW1) that allows to easily use this extra GPIO ports. If you don't, you have to solder your wires directly to the MCP23107 pins. Not difficult at all, but not really nice. This is the pin assignment for the row-pin connector (SW1):

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

You can check the schematic here

So, if you have a recent version of All-In-One circuit, you can follow these simple steps for adding your custom switches:

  • Update your zynthian
  • Solder the 5 row-pin connector to your All-In-One circuit (SW1)
  • Connect some kind of switch between pins 2-5 and pin 1 (GND). The switches are normally open, closing to pin 1 (GND).
  • From the webconf tool, hardware menu, wiring section:
    • Select MCP23017_EXTRA as wiring layout. This will set your ZYNTHIAN_WIRING_SWITCHES to “100,103,108,111,106,107,114,115”
    • Configure the desired actions (advanced options). The UI active layer’s MIDI channel will be used for MIDI actions.

For instance, you could add a "Panic Button" to an official v2 zynthian:

Zynthian v2 panic switch.jpeg

and configure the actions as follow:

  • Type: Ui Action
  • Short push: All Note Off
  • Bold push: All Off (All Notes Off + All Sounds Off)
  • Long push: Reboot

You can read more about this subject in the next links: