Adding Extra I/O with the Zynaptik Module
The Zynaptik module includes extra circuitry that is not soldered. You can solder on it 3 extra submodules and a 40 pin header for interfacing them:
+ Secondary MCP23017 (Digital I/O): It uses I2C address 0x21 and the 2 interrupt lines are connected to the RBPi GPIO. INTA to GPIO27 (pin 36) and INTB to GPIO25 (pin 37). The digital I/O are labelled as GPAx & GPBx on the Zynaptik's header schematic.
You can use it for adding up to 16 extra switches to your zynthian.
+ ADS1115 (MOD-1 Analog Input): It uses I2C address 0x48 by default. The 4 analog input pins are labelled as ADx on the Zynaptik's header schematic.
You can assign the Analog Inputs to MIDI events like Pitch-Bending, CC or ChanPress. This can be used for connecting CV-IN or for controlling sound engine parameters using analog sensors.
+ MCP4728 (MOD-2 Analog Output): It uses I2C address 0x60 by default. The 4 analog output pins are labelled as DAx on the Zynaptik's header schematic.
This is currently being implemented, but it's not available yet.
Installing Zynaptik Expander Kit
The core Zynthian kit is designed to allow novice to build a full device. Beware that the Zynaptik expander kit installation is more challenging, requiring some electronic construction skills including soldering and cutting. An intermediate hobbyist should be able to tackle the installation.
Insert one of the 10-pin 90 degree headers into the ADS1115 module. The pins go into the component side of the PCB extended through to the solder side. The ADS1115 is on the bent pin side of the header's plastic strip, not the straight pin side.
Ensure the header is pushed against the ADS1115 module then solder the 10 pins. It may be easiest to locate the module tightly against the header by soldering one pin first then reflowing the solder (reapply the iron) and relocating the module into position then soldering the remaining pins. Be careful to avoid prolonged (approx. 2s) heat applied to each pin. Use a small side cutter to cut each of the 10 pins flush with the top of the solder joint. Make the pins as short as you can without reducing mechanical integrity, approx. 2mm.
Repeat for the MCP4728 module. You should now have two modules with 90 degree header pins on their edge.
If your Zynaptik board is installed in your Zynthian, remove all the cables from the Zynaptik board then remove the board from the case by removing the four fixing screws.
It is advised to use a 28-pin IC socket (not supplied) to mount the MCP23017 chip. This will reduce the risk of damage to the chip. Be aware that 28 pin sockets are available in different sizes. The dual-in-line narrow socket is required. You may solder the IC directly to the PCB if preferred. (You may use two 14-pin sockets (or another combination) if you do not have a 28 pin socket.) Insert the IC socket or the MCP23017 into the Zynaptik board. The socket should have a notch or indicator at one end. The MCP23017 has a dot near pin 1. This should be oriented towards the edge of the PCB. There is an outline of the IC drawn on the PCB with a notch in one end. This should align with the notch of the socket and the dot of the MCP23017. The component should sit on the same side of the Zynaptik board as the other components like the header pins.
Solder the socket or MCP23017 in place. Use the previous tip of soldering one pin first then reflowing to ensure the component is fitted snug against the board. WARNING: If soldering the MCP23017 directly to the PCB be careful to apply heat for a very short period (approx. 2s) to each pin. Integrated circuits are fragile and can be damaged by heat. Tip: The MCP23017 is supplied inserted in a piece of foam. Use this to support the IC socket or MCP23017 whilst soldering.
Insert the 40 pin header into the PCB with the short pins extending from the component side, through the PCB so that the plastic base sits on top of the component side of the PCB with its longer pins pointing up above the component side. It does not matter which way round this is inserted. Solder the short pins to the PCB.
Identify pin 1 on the ADS1115 module. This is indicated with the letter 'V' on the PCB.
Insert the ADS1115 module into the Zynaptik board from the component side with its pin 1 ('V') inserted into the hole with the square line around it, nearest the label, "MOD-1". Insert the MCP4728 module into the Zynaptik board from the component side with its pin 1 ('V') inserted into the hole with the square line around it, nearest the label, "MOD-2".
Support the modules with your fingers whilst turning the board over then solder the 10 pins of each board. Be careful to avoid prolonged (approx. 2s) heat applied to each pin.
If using an IC socket, insert the MC23017 into the socket. This can be awkward because the pins may splay too far. Gently locate all 14 pins on one side of the MC23017 in the jaws of the socket then supporting the whole of the MC23017 with your fingers press to bend the pins slightly to locate the other row of 14 pins in their corresponding socket jaws. Only when all 28 pins are located, gently but firmly press the MC23017 into the socket with even pressure over the whole chip.
Install the Zyanptic board into the Zynthian. Use a 40 pin IDC DIL connector with ribbon cable to extend the "Zynaptic-1" connector through the slot in the front of the Zynthian case. You will need to build your own external hardware interface.
Configuring the Zynaptik Module from the Webconf
First, you should choose the right configuration for your zynaptik module depending on the extra modules you have soldered on it:
- 16xSWITCH => Only MCP23017, use the 16 GPIOs as customizable switches
- 4xAD => Only ADS1115 (use the 4 ADs for Analog Input, obvious)
- 16xSWITCH + 4xAD => MCP23017 + ADS1115, use the 16 GPIOs as customizable switches
After saving, you may want to configure your switches and/or analog inputs.
Configuring Zynaptik Customizable Switches
Simply add the extra desired pins to the list (Switches Pins). Zynaptik's digital pins start at 200. You don't need to add all the 16 available switches:
- If you only want to use 2, simply add "200,201"
- If you want to use 8, add "200,201,202,203,204,205,206,207"
After saving, the extra custom switches will be available for configuration.
Configuring Zynaptik Analog Input
Simply configure your analog inputs from the webconf's wiring section in the same way you configure your custom switches.