This Readme file focuses on the hardware of Porsche Mü(h)k.
The main part is the Raspberry Pi Pico MCU.
All the configuration data is stored on an external (64 Kb) EEPROM, so that the MCU can be exchanged and used for other projects.
An 8-channel 12-bit ADC is used to interface up to eight analog sensors.
An 8:1 analog multiplexer is used to further reduce the used pins of the Pico for up to 24 digital inputs.
The board has connections for a rotary encoder (with button) and an I2C LCD.
The board also has an area and connections to add an extra shield that can add various functions.
All buses (SPI, I2C, UART) are routed out for easy debugging and/or add-ons/modifications.
It has two LEDs for debug purposes.
There is a 8x3 button matrix, with n-key rollover.
So each combination of buttons can be pressed and there is no ghosting.
-
U1: Raspberry Pi Pico (Raspberry Pi Pico)
-
U2: 8-Channel 12-Bit SPI ADC (Microchip MCP3208)
-
U3: 64 Kb I2C EEPROM (Microchip 24LC64)
-
U4: 8:1 MUX (Microchip CD74HC4051)
-
Display: Basic 20x4 I2C LC-Display (e.g. LCD 20x4 AZ-Delivery)
-
Rotary Encode: Simple Rotary Encoder with button (e.g. Rotary Encoder AZ-Delivery)
-
Connector housings for digital connections PSK 254/2W
-
Connector housings for analog connections PSK 254/3W
-
Connector housings for display connection PSK 254/4W
-
Connector housings for encoder connection PSK 254/5W
-
Crimp contact for the housing PSK-Contacts
Note
0 = Axis/Button 0 in software.
If an axis/button is connected to port 2,
but in software only two axes/buttons are selected, the input is not sampled and no output.
+-----------+ +-----------+-----------+-----------+ | | | | | A | GND | Vcc | | | | | +-----------+-----------+-----------+
- A = Analog Input
- GND = GND
- Vcc = Vcc (3.3V)
Analog input should not exceed Vcc (3.3V)
+-----------+ +-----------+-----------+ | | | | S1 | S2 | | | | +-----------+-----------+
- S1 = Button contact 1
- S2 = Button contact 2
The Button must close or open these two connections.
+-----------------------+ +-----------+-----------+-----------+-----------+ | | | | | | GND | +5V | SDA | SCL | | | | | | +-----------+-----------+-----------+-----------+
- GND = GND
- +5V = +5V
- SDA = SDA (GPIO 4)
- SCL = SCL (GPIO 5)
SDA and SCL have a logic level of Vcc (3.3V)
+-----------------------------------+ +-----------+-----------+-----------+-----------+-----------+ | | | | | | | CLK | GND | DT | GND | BT | | | | | | | +-----------+-----------+-----------+-----------+-----------+
- CLK = CLK-Pin of Encoder
- GND = GND
- DT = DT-Pin of Encoder
- BT = Button pin of Encoder
CLK, DT and BT are pulled up to VCC. To get a signal, they need to be connected to GND.
Note
During testing, I found a problem with presumably voltage spikes from the encoder when it is turned.
To reduce them put a ceramic capacitor in parallel with a resistor in series with the CLK signal.
This should be as close to the encoder as possible.
In a next version of the pcb, this maybe could be put on the pcb itself.
+------------+ +-----+ +-----+ | +------------+ | | 100Ω | | | CLK from Encoder +---------+ +---------+ CLK to CLK Pin on Header | | | | | | | | | | +---------+ +---------+ | | | | 100nF
Note that all pins are only 3.3V tolerant.
The various other connectors (SPI, I2C, UART, GPIO) are labeled on the silkscreen of the PCB.
CS of the ADC is on GPIO 14.
LED 0 (L0) is connected to GPIO 2.
LED 1 (L1) is connected to GPIO 3.
All the connectors for the shield are spaced with multiple of 2.54mm, so normal 2.54mm PCB can be used.
All dimensions in mm.
KiCAD files and gerber files can be found here
( ._.)