Hardware testing

Always do a Visual check first
this can prevent much misery.

The test programs are meant to run on a standard Raspbian OS
as pi, in a therminal ( window )
they are written in python2 (zynthian uses python3).

The first thing is tested is the MCP23008 on the 2 in 1 PCB:
https://github.com/zynthian/zynthian-hw/blob/master/doc/zynthian_scheme_2in1.pdf
https://github.com/zynthian/zynthian-hw/blob/master/test/MCP23008.py
If the start is error free you get a line with 00000000 .
If you connect a input with a little wire to GND, the corresponding input shows 1.

Now is the time to test all inputs (hw_version=“PROTOTYPE-4”)
You better check out first the document on encoders

https://github.com/zynthian/zynthian-hw/blob/master/test/ZGPIO-4.py
Because the contacts of an encoder only close some ms
it is better to test with push buttons that replace the encoder.

https://github.com/zynthian/zynthian-hw/blob/master/doc/Marnix_P1000068.JPG

If the start is error free you get:
Enc1:abs Enc2:abs Enc3:abs Enc4:abs
… 000 … 000 … 000 … 000
those are the 4 encoders, channel a and b and their push button s

MIDI
for info about MIDI:
http://www.indiana.edu/~emusic/etext/MIDI/chapter3_MIDI.shtml

The test is done at 38400 baud not on 31250 baud as in zynthian
31250 baud is not a selectable value on Debian-OS
the settings are complex to stand 31250 baud
the test can also be done at 38400 baud so we use for the convenience 38400 baud.
You can’t use a MIDI device as a test transmitter,you get only strange characters !

First we have to prepare our RPi to use the serial port
howto :

To test if the RPi is ready
connect Tx with Rx headerpins 8-10.

Open 2 terminals:
Run Rx.py in the first.
https://github.com/zynthian/zynthian-hw/blob/master/test/Rx.py
Run Tx.py in the second.
https://github.com/zynthian/zynthian-hw/blob/master/test/Tx.py
that gives the following:

I use a simple test tool as transmitter.

1 Like

Hi @Imager!

Thanks for sharing this test programs and explaining how it works. I’m pretty sure that it will be really useful for people hacking Zynthian or trying to build a unit from scratch.

I’ve included the test programs in the HW repository and i will add a link to this post :wink:

Regards!