Skip to content

Commit 3c13a48

Browse files
committed
more pages
1 parent 23d49f4 commit 3c13a48

File tree

8 files changed

+593
-0
lines changed

8 files changed

+593
-0
lines changed

docs/ppuc/getting_started.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Getting Started
2+
3+
## Planing
4+
5+
If you want to run an existing playfield with PPUC you need to take some decisions:
6+
- Should the original wiring be kept?
7+
- Should lamps (inserts, GI and/ flashers) be replaced by addressable RGB LEDs?
8+
- Should switches be wired using a matrix or directly.
9+
- Which switches should drive coils as fast as possible or directly without involving the CPU?
10+
11+
(Pros ans cons will be described later.)
12+
13+
Multipe boards can be cascaded to to have enough input and output ports. The communication happens via a RS485 BUS and the
14+
protocol enhances the DOF protocol which is known from the virtual pinball world.
15+
16+
## Get IO Boards
17+
18+
Dependeing on your decisions abouve, you you might need different IO boards and a different amount.
19+
The entire hardware is open source and you can order the boards from your prefered PCB manufacturer.
20+
Gerber and BOM files are part of the repositories:
21+
- [IO_16_8_1](https://github.com/PPUC/Hardware_IO_16_8_1)
22+
- [IO_16x8_matrix](https://github.com/PPUC/Hardware_IO_16x8_matrix)
23+
- [Out_8X10](https://github.com/PPUC/Hardware_Out_8x10)
24+
- [Opto_16](https://github.com/PPUC/Hardware_Opto_16)
25+
26+
## Flash the IO Board Firware
27+
28+
Download the latest firmware for your boards from https://github.com/PPUC/io-boards/releases/latest
29+
30+
Pres and hold the `Boot` button of your board and connect it to your computer via USB.
31+
Release the button after a removable mass storage device is detected by your computer.
32+
Copy the appropriate `uf2` file from the download above to that mass storage device.
33+
The board will automatically flash the firmware and reboot.
34+
Repeat that procedure for every board.
35+
36+
## Wiring the boards
37+
38+
todo:
39+
- Power
40+
- RS485 bus
41+
- Coils
42+
- Switches
43+
- Lamps
44+
- Motors
45+
46+
todo: Explain the board addresses and BUS termination.
47+
48+
## "CPU"
49+
50+
The IO boards need a CPU, regardless if you replacing broken or missing electronics or creating a homebrew game.
51+
52+
### PinMAME
53+
The platform independent [PPUC command line tool](https://github.com/PPUC/ppuc) can run on any old or small computer like a Raspberry Pi and leverages libpinmame to emulate the ROM.
54+
55+
### PPUC Config-Tool
56+
57+
[PPUC config-tool](https://github.com/PPUC/config-tool)

docs/ppuc_hardware/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PPUC Hardware

docs/ppuc_hardware/io_16_8_1.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# IO_16_8_1
2+
This is the hardware for a standard IO card which was designed for the PPUC pinball project, but can be useful in other applications as well.
3+
It is designed for being low cost and functional for experimental use.
4+
Not everything is tested nor does it fulfill EMC or any other specifications.
5+
Use at your own risk!
6+
To make use of anything of this project a basic understanding of electronics and programming is necessary. Nothing of it is "plug and play". I'm surely not liable for any damage to assemblies, pinball machines or even persons.
7+
8+
## Picture of the Board
9+
![PCB Pic](https://github.com/PPUC/Hardware_IO_16_8_1/raw/main/IO_16_8_1/PCB_V010_TH.jpg)
10+
11+
## Name
12+
[IO_16_8_1](https://github.com/PPUC/Hardware_IO_16_8_1/) as it has 16 inputs, 8 outputs and one special output.
13+
Actually the inputs can also be used as outputs (see later in this document).
14+
15+
## Power Supply
16+
The IO card must be supplied by 5 V (+-0.5 V) for logic and inputs. Additionally nominal 48 V for high power outputs. As these outputs are open drain, the voltage can actually be up to 60 V. In the circuit diagram the voltage is called 48 V.
17+
18+
## Controller
19+
A RP2040 is used for it's cost/performance ratio. It is the same controller that is used in the Raspberry Pi Pico.
20+
21+
## Communication Interfaces
22+
* RS_485: main communication interface for controlling outputs and scan inputs. Usually connected to a host interface like a PC or Raspberry Pi or similar.
23+
* USB C: for programming, debug and flashing
24+
* Serial Wire: alternative for programming, debug and flashing
25+
* IIC: the PCB can be populated with an QWIIC connector (normally not mounted). This can be used for connecting to other PCBs or experimental use. It uses the same UART as for the RS485.
26+
* UART, I2C, SPI: instead of using the input pins for inputs they can also be used as an additional interface (see docu of RP2040 for pins and function). Speed up to 10 kHz should be possible (100 kHz for In_2 and In_3).
27+
28+
## Switches (on board)
29+
* Reset: hardware reset for controller (RP2040)
30+
* Boot: if active the board connects to a PC like an USB stick. Usually used for programming the code into the flash memory on the board.
31+
* DIP-switches: usually used to select an address for RS485 (16 combinations)
32+
33+
## Inputs (and low power outputs)
34+
The 16 inputs are used for reading the state of an external switch. The switch is normally connected to ground (GND). Internally the input is pulled up to 5 V by a 10k resistor.
35+
36+
All inputs can also be used as signal-outputs (if programmed accordingly). The output is internally pulled up by a 10k resistor to 5 V. A higher voltage can be applied externally (max. 30 V) but be sure to have your hardware and software! setup correctly as no protection for damage is provided in that case. A maximum of 2 mA can be sinked/sourced.
37+
38+
The inputs In_2 and In_3 are designed for higher speed (100 kHz). The Pull-Up can be soldered to other pads to be pulled to 3,3 V (instead of 5 V). An input capacitance can be added (soldered) for better noise immunity but lower speed. Since version 1.0.1 the caps are soldered by default and must be removed if a high-speed serial connection is needed.
39+
40+
The input terminals can also be "miss"used for a switch matrix. To do that (no matter if used as coloum or row) the input resistor (330 Ohm) must be short cut (or replaced by a zero Ohm type). Background: the 330 Ohm resistor protects the circuit if the terminal is used as an output and accidently a short cut is done at the terminal. Unfortunately the low voltage value gets too high when used in a switch matrix (diode voltage plus voltage drop due to added up currents through the resistor). This happens when more switches are closed at the same time. Instead you could also use the specially designed PCB "Hardware_IO_16x8_matrix" for your switch matrix.
41+
42+
The inputs In_13 to In_16 have an additional open drain output transistor that allows higher currents in case of being used as an output (up to 3 A at 25 °C ambient temperature). The outputs are internally pulled up by a 10k resistor to 5 V. A higher voltage (max. 30 V) can be applied externally but be sure to have your hardware and software! setup correctly as no protection for damage is provided in that case. Please be aware that the default state (before software takes over control) is "on".
43+
If used as input In_13 to In_16 feature a memory (similar to a relay self-holding function). If the input has ever seen a low signal (e.g. switch closed to GND) it will stay that way until it gets an active high signal from the RP2040 (make the corresponding pin an output with signal "high" and then make it an input again). If this behavior is not wanted you can lift pin 3 of Q13 to Q16, then you have an input/output like e.g. terminal 1 with static behavior but no additional output power.
44+
45+
## High Power Outputs
46+
There are 8 high power outputs available. Usually they are connected to pinball solenoids or flashers. A recovery diode for the solenoids is placed on the pcb, so no need for diodes at the coils. The outputs are open drain and drive currents up to 20 A with a load connected to a voltage of up to 60 V. Be aware that the current is limited by the fuse F2. It will blow within about 1 s at 20 A. You might use a 10 A fuse if necessary.
47+
48+
It's recommended to use 2 wires (back and forth) for each solenoid. That improves the EMC a lot.
49+
50+
## Special Output
51+
One special output is available for high speed signals. The voltage is 5 V, it is a push pull output that can drive a current up to 8 mA. It can be used to e.g. control a WS2812 LED strip.
52+
53+
## Recommendations
54+
* Connect only one Flipper to a pcb if possible. The advantage is, that all the energy of the big capacitor is available for the flipper, which is usually the solenoid with the highest current. If you have more flipper fingers than PCBs then spread the flipper solenoids as even as possible across the PCBs (e.g. if you have 6 flipper fingers it's better to connect 2 per board instead of all 6 at one board).
55+
* Wire related switches and solenoids for fast flip devices (e.g. flipper, bumper, sling, kick back) to the same pcb. Then you can archive the shortest possible time lag between activating the switch and firing the solenoid.
56+
* RS485 termination: short JP2 at the end of the RS485 bus. There should also be a 120 Ohm resistor at the beginning of the bus (e.g. USB to RS485 adapter).
57+
* RS485 biasing: short JP1 and JP3 exactly once at any point of the RS485 bus. Only do this if no resistors are installed on the USB to RS485 adapter.
58+
* It's recommended to use flipper coils for higher voltage (like 40 - 50 V) as they draw less current. Since Version 1.1.1 low resistance coils (designed for 24 V) should work as well. You should also change the fuse F2 to 10 A for that application.
59+
* If the MOSFETs on the high power outputs are not available (or you want to use the big player brands) here are some alternatives (I haven't tested any of them, but they should work according to their specification): GL40N10A4 (seems to be the same as NCE0140KA), RD3P200SNFRA, NVD6824NL, IPD90N10S4L-06, LSGG10R085W3
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# IO_16x8_matrix
2+
This is the hardware for a 16x8 switch matrix card which was designed for the PPUC pinball project, but can be useful in other applications as well. The intentionally usecase is to connect an original equipped pinball playfield (including cable harness and diodes). Normally I'd prefer direct switches but if all the switches and cables and diodes are in place already, it is useful to connect the switch matrix directly. The board can also be used for 16 direct inputs and 8 low power signal-outputs (no matrix).
3+
It is designed for being low cost and functional for experimental use.
4+
Not everything is tested nor does it fulfill EMC or any other specifications.
5+
Use at your own risk!
6+
To make use of anything of this project a basic understanding of electronics and programming is necessary. Nothing of it is "plug and play". I'm surely not liable for any damage to assemblies, pinball machines or even persons.
7+
8+
## Picture of the Board
9+
![PCB Pic](https://github.com/PPUC/Hardware_IO_16x8_matrix/raw/main/IO_16x8_matrix/PCB_IO_16x8_matrix.jpg)
10+
11+
## Name
12+
[IO_16x8_matrix](https://github.com/PPUC/Hardware_IO_16x8_matrix/) as it has 16 inputs and 8 signal-outputs to form a 16x8 switch matrix but could also be used as direct inputs and low power outputs. Actually it has an additional high speed output (see "Special Output" below).
13+
14+
## Power Supply
15+
The IO card must be supplied by 5 V (+-0.5 V). In the circuit this is named 5V_IN.
16+
17+
## Controller
18+
A RP2040 is used for it's cost/performance ratio. It is the same controller that is used in the Raspberry Pi Pico.
19+
20+
## Communication Interfaces
21+
* RS_485: main communication interface for controlling the outputs. Usually connected to a host interface like a PC or Raspberry Pi or similar.
22+
* USB C: for programming, debug and flashing
23+
* Serial Wire: alternative for programming, debug and flashing
24+
25+
## Switches (on board)
26+
* Reset: hardware reset for controller (RP2040)
27+
* Boot: if active, the board connects to a PC like an USB stick. Usually used for programming the code into the flash memory on the board.
28+
* DIP-switches: usually used to select an address for RS485 (16 combinations)
29+
30+
## Signal Outputs
31+
There are 8 outputs that can be set to 5 V or GND. They are intended to drive the switch matrix (column at WPC, row at S.A.M.). The 5 V signal is derived from the 5 V supply by a 1 kOhm pull up resistor. Therefore it is only good for signaling, not for power load. If used as a matrix please be aware that every switch must have a diode in series.
32+
33+
## Inputs
34+
There are 16 inputs intended to receive the switch status of the matrix (row at WPC, column at S.A.M.). They are pulled up to 5 V and switch at a voltage of about 1.9 V. The inputs are made for low active signals (switched to GND). If used as a matrix please be aware that every switch must have a diode in series.
35+
36+
## Special Output
37+
One special output is available for high speed signals. The voltage is 5 V, it is a push pull output that can drive a current up to 8 mA. It can be used to e.g. control a WS2812 LED strip.
38+
39+
## Connectors
40+
There are pads for connectors that fit S.A.M. systems and also WPC systems. The pinning of the returns (rows at WPC) is unfortunately vice versa to S.A.M. so the connector of the original WPC cable harness has to be rotated by 180° (cables go to the inner side of PCB).

docs/ppuc_hardware/opto_16.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Opto_16
2+
This is the hardware for a opto board which was designed for the PPUC pinball project, but can be useful in other applications as well.
3+
It is designed for being low cost and functional for experimental use.
4+
Not everything is tested nor does it fulfill EMC or any other specifications.
5+
Use at your own risk!
6+
To make use of anything of this project a basic understanding of electronics and programming is necessary. Nothing of it is "plug and play". I'm surely not liable for any damage to assemblies, pinball machines or even persons.
7+
8+
<!--
9+
## Picture of the Board
10+
![PCB Pic](tbd.jpg)
11+
-->
12+
13+
## Name
14+
[Opto_16](https://github.com/PPUC/Hardware_Opto_16/) as it has 16 inputs and 16 led divers. Additionally it has one special output.
15+
16+
## Application
17+
Please be aware that in pinball many different opto types are used. You have to know which type of opto coupling you need for your purpose. I found the following types:
18+
* Optos with photo transistors as a receiver and common collector (used for example in Dirty Harry with board A-16998.1).
19+
* Optos with photo transistors as a receiver and common emitter (used for example in Rollergames with board C-13205). Commonly used for drop targets and flipper buttons.
20+
* Optos with photo diodes as a receiver (used for example in World Poker Tour with board 520-5239-01).
21+
22+
The transmitter LEDs I've seen so far, are either single (2 pins) or share a common cathode.
23+
24+
This Opto_16 PCB can be used to drive transmitter LEDs from a 5 V power supply and can cope with common collector photo transistors and photo diodes.
25+
There are 2 groups of inputs (2 x 8). One group is for photo transistors. The other group can be configured to be inputs for photo diode or photo transistor. Jumpers are used for configuration. You can only change the whole group (8 inputs), not a single channel. If no jumper is placed (all open) then the configurable group of 8 inputs are good for photo diodes. If you want them to be for photo transistors you have to close jumper JP2 and also put jumpers on the channel-connectors J18 to J25. Actually only the connectors for used channels has to be shorted by a jumper, not used channel can be left open.
26+
27+
If you have an application with common emitters you can use the inputs of the switch-matrix board (IO_16x8_matrix) of the PPUC project. The inputs of the standard IO board (IO_16_8_1) should work as well. In either case you need to drive the transmitter LED with a constant current of about 20 mA. This can be done with a 180 Ohm resistor at a 5 V supply (you have to wire this yourself).
28+
29+
If you have an opto board already (e.g. from an existing pinball machine) you can use this with the inputs of the switch-matrix board (IO_16x8_matrix) or the inputs of the standard IO board (IO_16_8_1). Connect the output transistor of the opto board to the input of the PPUC board in a way that the transistor switches to ground. Be aware that opto boards are powered with either 12 V or 5 V in existing pinball machines. Both can be used with PPUC.
30+
31+
## Power Supply
32+
The IO card must be supplied by 5 V (+-0.5 V). In the circuit this is named 5V_IN.
33+
34+
## Controller
35+
A RP2040 is used for it's cost/performance ratio. It is the same controller that is used in the Raspberry Pi Pico.
36+
37+
## Communication Interfaces
38+
* RS_485: main communication interface for controlling the outputs. Usually connected to a host interface like a PC or Raspberry Pi or similar.
39+
* USB C: for programming, debug and flashing
40+
* Serial Wire: alternative for programming, debug and flashing
41+
42+
## Switches (on board)
43+
* Reset: hardware reset for controller (RP2040)
44+
* Boot: if active, the board connects to a PC like an USB stick. Usually used for programming the code into the flash memory on the board.
45+
* DIP-switches: usually used to select an address for RS485 (16 combinations)
46+
47+
## LED drivers
48+
There are 16 outputs. Each of them drives one LED (usually red or infra red).
49+
50+
## Inputs
51+
There are 2 groups of inputs, each with 8 channels:
52+
* A group of 8 inputs are designed to be used with optos that use a photo transistor as receiver and are connected to have a common collector.
53+
* A group of 8 inputs are designed to be used with optos that use a photo diode as receiver. They are usually single (two pins) or share a common cathode.
54+
55+
## Special Output
56+
One special output is available for high speed signals. The voltage is 5 V, it is a push pull output that can drive a current up to 8 mA. It can be used to e.g. control a WS2812 LED strip.
57+
58+
## Additional analog functions
59+
* There are 2 ADC channels from the RP2040 made accessible through a connector. Filtered by a 1st order low pass (1 kOhm/100 nF, fg = 1.6 kHz).
60+
* 6 GPIOs are also routed to this connector. They are also filtered by a 1st order low pass (1 kOhm/100 nF, fg = 1.6 kHz) and could be used for analog output per PWM.
61+
62+
## Connectors
63+
There are pads for connectors that fit the A-16998.1 board. Additionally for 8 inputs and drivers there are pins for single LEDs (transmitter and receiver) in 2.54 mm pitch.
64+
65+

0 commit comments

Comments
 (0)