Jump to: navigation, search

Difference between revisions of "CobraPin"

(Switch Inputs)
 
(43 intermediate revisions by 3 users not shown)
Line 5: Line 5:
  
 
== Overview ==
 
== Overview ==
CobraPin is a pinball controller designed to offer a basic all-in-one assembled affordable solution. It is intended to be hosted by a computer running the Mission Pinball Framework ([https://missionpinball.org/ MPF]) and is based on the Open Pinball Project ([https://pinballmakers.com/wiki/index.php?title=OPP OPP]) It will be released to the public in 2021 on Kickstarter.
+
CobraPin is a pinball controller designed to offer a basic all-in-one assembled affordable solution. It is intended to be hosted by a computer running the Mission Pinball Framework ([https://missionpinball.org/ MPF]) and is based on the Open Pinball Project ([https://pinballmakers.com/wiki/index.php?title=OPP OPP]) It was released to the public in 2021 on Kickstarter.
  
 
===Features:===
 
===Features:===
Line 11: Line 11:
 
* '''38 direct switch inputs''' <OR> '''22 direct inputs''' and an '''8x8 switch matrix'''
 
* '''38 direct switch inputs''' <OR> '''22 direct inputs''' and an '''8x8 switch matrix'''
 
* '''Neopixel support''' for 512 RGB or RGBW LEDs
 
* '''Neopixel support''' for 512 RGB or RGBW LEDs
*'''24-50V power filter'''. Board also provides the common ground for the supplies.
+
*'''12-50V power filter'''. Board also provides the common ground for the supplies.
 
*'''Fuses''' for solenoid banks and Neopixels
 
*'''Fuses''' for solenoid banks and Neopixels
 
*'''Relay Control Output''' for common dual relay boards
 
*'''Relay Control Output''' for common dual relay boards
Line 18: Line 18:
 
**Transistors can be removed with simple soldering tools and replaced with through-hole components
 
**Transistors can be removed with simple soldering tools and replaced with through-hole components
 
**Fuse clips for common 5x20mm fuses
 
**Fuse clips for common 5x20mm fuses
 +
 +
===Where to Buy===
 +
CobraPin is now available on the [https://pinside.com/pinball/market/shops/1254-cobra-amusements Cobra Amusements] Pinside shop.
  
 
==Future Hardware Plans==
 
==Future Hardware Plans==
===Satellite Board===
+
===Opto Trough===
By popular demand, I will start work on another expansion board with more switch inputs to make it easier for users to avoid a switch matrix if they so desire.  
+
This is intended to give people a more affordable option for a 6-ball opto trough. I prefer opto troughs rather than mechanical microswitches. I also wanted something that could more easily be connected to CobraPin hardware.
The current plan is have:
 
* '''23 direct switch inputs'''
 
* '''8 coil outputs''' for solenoids, flashers, motors, etc.
 
* '''Neopixel output''' for 256 RGB or RGBW LEDs
 
  
This would bring the total--using a CobraPin main board and this board--up to 61 direct switch inputs, 32 coil outputs, and 3 neopixel chains totalling 768 lights.
+
[[File:CobraPin_troughTrial.jpg|500px]]
  
===Xpansion Board===
+
===Opto Flipper Switches===
The Xpansion is a beta expansion board for CobraPin. Contact cobra18t on Pinside if you would like to get your hands on one.
+
Opto flipper switches, built in neopixel lighting, better connection strategy to CobraPin hardware
It supports:
 
* '''8x8 Lamp matrix'''
 
* '''8 coil outputs''' for solenoids, flashers, motors, etc.
 
* '''8 direct switch inputs'''
 
  
The purpose of the Xpansion board is to make it easier for people to control existing machines with flashers and matrix controlled lamps.
+
===Open Source Pinball Game===
 +
I am slowly making a game! It will be open source so people can build it, mod it, and make it their own. There will be a new set of CobraPin electronics hardware developed to make the connecting and wiring task easier for people.
  
[[File:Xpansion_v0_02_small.JPG|400px]]
+
[[File:CobraPin_prototypeGame.jpg|400px]]
 
 
===Segment Displays===
 
''While regular segment displays will not be supported by CobraPin, custom alphanumeric boards are under development.''
 
 
 
''A 7-digit prototype was created that is controlled by the neopixel output and the display is mono color. Multiple color options are available. Each segment acts as a neopixel channel, so it takes the equivalent of 42 pixels to create a 7-digit display. Multiple displays can be daisy-chained together, so you can have up to 6 displays on a single CobraPin output channel (6 x 42 = 252 < 256). You can also arrange 4 displays together to create a 14x2 display that fits in the same area as something like a WPC89 display. ''
 
 
 
''Shown here are two displays next to each other, a red and blue.''
 
  
[[File:CobraPin_NeoSeg.JPG|600px]]
 
  
 
== Wiring ==
 
== Wiring ==
Line 54: Line 42:
 
Power comes in to the board on two 4-pin 3.96mm pitch connectors. The default connectors are JST VH style. The pinout is labeled in silkscreen on the board.
 
Power comes in to the board on two 4-pin 3.96mm pitch connectors. The default connectors are JST VH style. The pinout is labeled in silkscreen on the board.
  
'''J9''': Coil power input (24-50V).  
+
'''J9''': Coil power input (12-50V).  
  
 
'''J10''': Neopixel 5V input
 
'''J10''': Neopixel 5V input
Line 72: Line 60:
 
====Power Jumper====
 
====Power Jumper====
 
'''JP9''': The input goes through an NTC thermistor to limit the load on the power supply when it first turns on and charges the large power capacitors. When cold, the thermistor is about 1.5ohms, as it heats up, the resistance drops considerably (1/10th or 1/20th of the cold resistance). If you find that the first minute of play is too weak, you can bypass the thermistor by soldering a wire at JP9. This will further load your power supply at startup, so proceed with caution.
 
'''JP9''': The input goes through an NTC thermistor to limit the load on the power supply when it first turns on and charges the large power capacitors. When cold, the thermistor is about 1.5ohms, as it heats up, the resistance drops considerably (1/10th or 1/20th of the cold resistance). If you find that the first minute of play is too weak, you can bypass the thermistor by soldering a wire at JP9. This will further load your power supply at startup, so proceed with caution.
 +
 +
 +
===Fuses===
 +
There are 4 fuses that are 5x20mm size. 3 are for the coil output banks (A, B, C) and one for the LED power. You have to select the current rating of the fuses based on the load you are fusing for each. 10A is the maximum current rating of fuse you should use. I recommend only using slow blow fuses.
  
  
Line 80: Line 72:
  
  
===Coil Ouputs===
+
===Coil Outputs===
The 24 coils are broken up into 3 banks of 8 outputs. The 3 9-pin 3.96mm connectors are JST VH style. There is a ninth pin on the connector that can be used as a key. That pin is marked by an asterisk in silkscreen. The coil outputs are labeled in silkscreen with the MPF compatible numbers.
+
The 24 coils are broken up into 3 banks of 8 outputs. The 3 9-pin 3.96mm connectors are JST VH style. The coil outputs are labeled in silkscreen with the MPF compatible numbers.
 +
 
 +
'''There is a ninth pin on the connector that can be used as a key. That pin is marked by an asterisk (*) in silkscreen.''' This pin should not be connected to a coil. Quadruple check your pinout or you will burn fuses, transistors, diodes, traces, etc.
  
 
Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you '''MUST''' ensure that you connect them with the '''correct polarity'''.
 
Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you '''MUST''' ensure that you connect them with the '''correct polarity'''.
Line 97: Line 91:
 
Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup '''''without''''' high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.
 
Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup '''''without''''' high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.
  
 +
'''Pinout Information:'''
 +
[[File:CobraPin_STM32_Mappings_ALL.pdf]]
 +
 +
'''''WARNING:''''' OPP firmware versions 2.3.0.0 to 2.3.0.5 have a bug that can lead to autofire coils getting stuck on. Look into more details and your workaround options here: [[OPP_Autofire_Workaround]]
  
 
===Switch Inputs===
 
===Switch Inputs===
Line 104: Line 102:
  
 
'''J4, J5''': Remaining direct input switches <OR> switch matrix input/output. The matrix row and column numbers are labeled in silkscreen in parentheses. See MPF section below for switch matrix anomalies.
 
'''J4, J5''': Remaining direct input switches <OR> switch matrix input/output. The matrix row and column numbers are labeled in silkscreen in parentheses. See MPF section below for switch matrix anomalies.
 
'''Board Error:''' On board versions 1.02 and older, the silkscreen pin labels for J4 and J5 are swapped. As an example, the pin labelled 1-0-16 on J4 is actually 1-0-24 and the pin labelled 1-0-24 on J5 is actually 1-0-16. This only applies if you are using a Direct switch configuration. Switch matrix users will use the matrix numbering anyway.
 
  
 
'''''WARNING:''''' the switch inputs should be limited to 3.3V since the '''STM32 is a 3.3V device'''. If you are using an active switch like a drop target opto board, make sure none of the switch pins can go above 3.3V.  
 
'''''WARNING:''''' the switch inputs should be limited to 3.3V since the '''STM32 is a 3.3V device'''. If you are using an active switch like a drop target opto board, make sure none of the switch pins can go above 3.3V.  
  
The exception to this is the 5V tolerant inputs. Again, these are still only 5V tolerant so the input should be limited to 5V.  
+
'''Pinout Information:'''
 +
[[File:CobraPin_STM32_Mappings_ALL.pdf]]
  
There are '''12 inputs''' available that are '''5V tolerant''':
+
'''Board Error:''' On board versions 1.02 and older, the silkscreen pin labels for J4 and J5 are swapped. As an example, the pin labelled 1-0-16 on J4 is actually 1-0-24 and the pin labelled 1-0-24 on J5 is actually 1-0-16. This only applies if you are using a Direct switch configuration. Switch matrix users will use the matrix numbering anyway.
*'''0-0-1'''
 
*'''0-0-2'''
 
*'''0-0-3'''
 
*'''0-0-8'''
 
*'''0-0-9'''
 
*'''0-0-10'''
 
*'''1-0-1'''
 
*'''1-0-2'''
 
*'''1-0-3'''
 
*'''1-0-8'''
 
*'''1-0-9'''
 
*'''1-0-10'''
 
  
 +
[[File:CobraPin_label swap.JPG|600px]]
  
 
====3.3V Input Limiting Example====
 
====3.3V Input Limiting Example====
Line 147: Line 133:
 
The J14 fused output can be used to provide additional power taps in a neopixel chain. This is a 4-pin 3.96mm JST VH style connector. Each pin is rated for 7A continuous. The fuse holder is rated for 10A. The red D25 LED can be used to confirm you have a good fuse (F4) and are providing power for neopixels.
 
The J14 fused output can be used to provide additional power taps in a neopixel chain. This is a 4-pin 3.96mm JST VH style connector. Each pin is rated for 7A continuous. The fuse holder is rated for 10A. The red D25 LED can be used to confirm you have a good fuse (F4) and are providing power for neopixels.
  
'''J11''': NEO 0 Neopixel output (all these lights have MPF numbers with the format '''0-0-##''').
+
'''J11''': NEO 0 Neopixel output (all these lights have MPF numbers with the format '''0-0-##'''. The first LED in the chain is 0-0-0).
  
'''J12''': NEO 1 Neopixel output (all these lights have MPF numbers with the format '''1-0-##''').
+
'''J12''': NEO 1 Neopixel output (all these lights have MPF numbers with the format '''1-0-##'''. The first LED in the chain is 1-0-0).
  
 
'''J14''': Fused 5V output
 
'''J14''': Fused 5V output
Line 160: Line 146:
 
CobraPin can drive a dual relay board commonly sold for Arduino applications. These relay boards are powered by 5V and are driven by two control signals. The 5V power for the relay control comes from the Board 1 USB power.
 
CobraPin can drive a dual relay board commonly sold for Arduino applications. These relay boards are powered by 5V and are driven by two control signals. The 5V power for the relay control comes from the Board 1 USB power.
  
By default, nothing is connected to the two control outputs. On the underside of the CobraPin are two 3-way solder jumpers. Each jumper controls how one of the control outputs is driven. Connecting the middle and lower pad enables that relay control output any time there is USB power to the Board 1 processor board. Connecting the middle and upper pads gives control of the relay programmatically to MPF by using the 1-0-1 coil output.
+
By default, nothing is connected to the two control outputs. On the underside of the CobraPin are two 3-way solder jumpers. Each jumper controls how one of the control outputs is driven. Connecting the middle and lower pad enables that relay control output any time there is USB power to the Board 1 processor board. Connecting the middle and upper pads gives control of the relay programmatically to MPF by using the 1-0-1 coil output. Version 2+ of the CobraPin boards enables the use of 1-0-1 for one relay and 1-0-2 for the other relay.
  
'''Note:''' When using the 1-0-1 coil output for relay control, do not use the 1-0-1 output on J8. These are controlled by the same processor pin.
+
'''Note:''' When using the 1-0-1 coil output for relay control, do not use the 1-0-1 output on J8. These are controlled by the same processor pin. Similarly for 1-0-2 as well when it is in use.  
  
 
'''J15''': 5V power and control for a dual relay board
 
'''J15''': 5V power and control for a dual relay board
  
[[File:CobraPin_relayJumperSmall.JPG|800px]]
+
[[File:CobraPinRelayOutputSelect.PNG|800px]]
 
 
  
 
== MPF Configuration ==
 
== MPF Configuration ==
It is '''HIGHLY RECOMMENDED''' that you start your MPF game-making journey with the [https://docs.missionpinball.org/en/dev/tutorial/index.html MPF Tutorial]
+
It is '''HIGHLY RECOMMENDED''' that you start your MPF game-making journey with the [https://missionpinball.org/tutorial/ MPF Tutorial]
  
 
You should install version 0.55 or higher of MPF. As of 20210601, this means you need to install the dev version of MPF.
 
You should install version 0.55 or higher of MPF. As of 20210601, this means you need to install the dev version of MPF.
  
For detailed MPF documentation, head over to [https://docs.missionpinball.org/en/dev/ MPF Docs]
+
For detailed MPF documentation, head over to [https://missionpinball.org/ MPF Docs]
  
CobraPin specific info can be found here: [https://docs.missionpinball.org/en/dev/hardware/opp/cobrapin/index.html CobraPin on MPF Docs]
+
CobraPin specific info can be found here: [https://missionpinball.org/hardware/opp/cobrapin/ CobraPin on MPF Docs]
  
 
An [https://github.com/cobra18t/CobraPin/tree/main/MPF%20Config Example Config] is available to help you start your game's config.
 
An [https://github.com/cobra18t/CobraPin/tree/main/MPF%20Config Example Config] is available to help you start your game's config.
Line 202: Line 187:
 
[[File:OPP_SW_MAT_numbering.jpg|800px]]
 
[[File:OPP_SW_MAT_numbering.jpg|800px]]
  
 +
===Lamp Matrix Numbering===
 +
The lamp matrix is hosted on the Xpansion board. The valid numbers are 2-0-0 through 2-0-63. An example config can be found [https://raw.githubusercontent.com/cobra18t/CobraPin/main/MPF%20Config/lamp_matrix_example_config.yaml here].
 +
[[File:Cobrapin_lamp_matrix.jpg|800px]]
  
 
===Autofire Devices===
 
===Autofire Devices===
Line 207: Line 195:
  
 
'''Note:''' an autofire coil must be controlled by a switch on the same STM32 board. So a 1-0-xx switch needs to control a 1-0-yy coil and a 0-0-xx switch needs to control a 0-0-yy coil.
 
'''Note:''' an autofire coil must be controlled by a switch on the same STM32 board. So a 1-0-xx switch needs to control a 1-0-yy coil and a 0-0-xx switch needs to control a 0-0-yy coil.
 +
 +
'''''WARNING:''''' OPP firmware versions 2.3.0.0 to 2.3.0.5 have a bug that can lead to autofire coils getting stuck on. Look into more details and your workaround options here: [[OPP_Autofire_Workaround]]
  
 
== STM32 Flashing and OPP Configuration ==
 
== STM32 Flashing and OPP Configuration ==
Line 214: Line 204:
  
 
The base application must be flashed with a separate programming device while the OPP configuration can be changed over USB via Python scripts.
 
The base application must be flashed with a separate programming device while the OPP configuration can be changed over USB via Python scripts.
 +
 +
For those not familiar with python, a detailed step by step walkthrough of the process can be found here: [[Beginner's Guide to STM32 flashing]]
 +
 
===Flashing===
 
===Flashing===
 
You can download a snapshot of the OPP source here: [https://sourceforge.net/p/open-pinball-project/code/HEAD/tree/trunk/ OPP Source]
 
You can download a snapshot of the OPP source here: [https://sourceforge.net/p/open-pinball-project/code/HEAD/tree/trunk/ OPP Source]
Line 260: Line 253:
  
 
<code>python Gen2Test.py -port=/dev/ttyACM0 -ser=0</code>
 
<code>python Gen2Test.py -port=/dev/ttyACM0 -ser=0</code>
 +
 +
 +
== Expansion Boards ==
 +
As with any "all-in-one" solution, sometimes people want something extra or slightly different than the main offering. That is what these expansion boards are for. These can be used together with the main board, separately, or even alongside another board supported by MPF.
 +
== Xpansion Board ==
 +
The purpose of the Xpansion board is to make it easier for people to control existing machines with flashers and matrix controlled lamps. The lamp matrix can drive either incandescent or LED lamps.
 +
 +
[[File:Xpansion_v0_02_small.JPG|400px]]
 +
 +
===Xpansion Features ===
 +
* '''8x8 Lamp matrix'''
 +
* '''8 coil outputs''' for solenoids, flashers, motors, etc.
 +
* '''8 direct switch inputs'''
 +
* '''Switch diode protection'''
 +
 +
=== Xpansion Wiring ===
 +
[https://www.youtube.com/watch?v=te29dw7oe3o Xpansion Board Wiring Explanation Video]
 +
 +
==== Power Input ====
 +
Power comes in to the board on a 4-pin 3.96mm pitch JST VH style connector. The pinout is labeled in silkscreen on the board.
 +
 +
'''J4''': Coil power input (12-50V) and Lamp power input (usually 18V)
 +
 +
==== Coil Power Output ====
 +
The output power for the coils comes from a pin on the coil output connector (J6). It is marked with an asterisk in silkscreen. This output is fused by F2. The blue D26 LED lights when power is applied. Check this LED if you are concerned you have blown a fuse.
 +
 +
==== Coil Outputs ====
 +
The 8 coil outputs are on a 9-pin 3.96mm JST VH style connector. There is a ninth pin on the connector that provides fused coil power and is marked with an asterisk in silkscreen. The coil outputs are labeled in silkscreen with the MPF compatible numbers.
 +
 +
Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you '''MUST''' ensure that you connect them with the '''correct polarity'''.
 +
 +
'''J6''': Coil bank D outputs
 +
 +
Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup '''''without''''' high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.
 +
 +
==== Switch Inputs ====
 +
There is a 9-pin 2.54mm pitch KF2510 style connector for switches. The switch inputs are labeled in silkscreen with the MPF compatible numbers. Each connector also includes a logic ground pin. Use this for the direct input return.
 +
 +
Switches have diode protection against both high and negative voltages.
 +
 +
'''J2''': Direct input switches.
 +
 +
==== Lamp Matrix Outputs ====
 +
 +
There is a 9-pin 3.96mm JST VH style connector for matrix columns and a 9-pin 2.54mm pitch KF2510 style connector for matrix rows. Column and row numbers are labeled in silkscreen. There is an unused pin on each connector marked with an asterisk in silkscreen.
 +
 +
'''J1''': Lamp matrix Columns.
 +
 +
'''J3''': Lamp matrix Rows.
 +
 +
==== USB ====
 +
The processor board is connected to the host computer via a separate USB-C cable.
 +
 +
== Satellite Board ==
 +
The Satellite board offers more direct switch inputs to make it easier to avoid using a switch matrix. It also carries with it a number of other expanded capabilities.
 +
 +
[[File:CobraPin Satellite isoSmall.png|500px]]
 +
 +
=== Satellite Features ===
 +
* '''23 direct switch inputs'''
 +
* '''8 coil outputs''' for solenoids, flashers, motors, etc.
 +
* '''Neopixel output''' for 256 RGB or RGBW LEDs
 +
* '''5 or 12V''' LED power
 +
* '''I/O Protection''' for input pins.
 +
 +
=== Satellite Wiring ===
 +
==== Power Input ====
 +
Power comes in to the board on a 4-pin 3.96mm pitch JST VH style connector. The pinout is labeled in silkscreen on the board.
 +
 +
'''J4''': Coil power input (12-50V) and LED power input (5-12V). ''BEWARE'' J7 is the same connector type as J4 and is right next to it. Swapping them can put the coil high voltage on the 5V bus and destroy lots of things. Check your connections!
 +
 +
==== Coil Power Output ====
 +
The output power for the coils comes from a pin on the coil output connector (J6). It is marked with an asterisk in silkscreen. This output is fused by F2. The blue D26 LED lights when power is applied. Check this LED if you are concerned you have blown a fuse.
 +
 +
==== Coil Outputs ====
 +
The 8 coil outputs are on a 9-pin 3.96mm JST VH style connector. There is a ninth pin on the connector that provides fused coil power and is marked with an asterisk in silkscreen. The coil outputs are labeled in silkscreen with the MPF compatible numbers.
 +
 +
Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you '''MUST''' ensure that you connect them with the '''correct polarity'''.
 +
 +
'''J6''': Coil bank E outputs
 +
 +
Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup '''''without''''' high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.
 +
 +
==== Switch Inputs ====
 +
There are 3 9-pin 2.54mm pitch KF2510 style connectors for switches. The switch inputs are labeled in silkscreen with the MPF compatible numbers. Each connector also includes a logic ground pin. Use this for the direct input return.
 +
 +
Switches have diode protection against negative voltages. There is also bidirectional protection based on resettable polyfuses to protect switch inputs from higher voltages.
 +
 +
'''J1, J2, J3''': Direct input switches.
 +
 +
====Matrix Row Pull Resistor Jumpers====
 +
 +
If you are using a the Satellite Board to drive a switch matrix, see section above.
 +
 +
====Neopixel RGB LEDs====
 +
The neopixel chain supports 256 RGB pixels. This output is on a 3-pin 3.96mm JST VH connectors. RGBW pixels are also possible.
 +
 +
The J7 fused output can be used to provide additional power taps in a neopixel chain. This is a 4-pin 3.96mm JST VH style connector. Each pin is rated for 7A continuous. The fuse holder is rated for 10A. The red D25 LED can be used to confirm you have a good fuse (F4) and are providing power for neopixels.
 +
 +
'''J5''': NEO 3 Neopixel output (all these lights have MPF numbers with the format '''3-0-##''').
 +
 +
'''J7''': Fused LED power output (5-12V)
 +
 +
==== USB ====
 +
The processor board is connected to the host computer via a separate USB-C cable.
 +
 +
===NeoSeg Serial Segment Displays===
 +
MPF Config Information: [https://missionpinball.org/hardware/opp/cobrapin/cobrapin_serial_segment_displays/ NeoSeg Serial Segment Displays]
 +
 +
Original Kickstarter here: [http://kck.st/3QPUDRv NeoSeg Kickstarter]
 +
 +
The NeoSeg display is an 8-digit alphanumeric display that is controlled by the neopixel output and the display is mono color. Multiple color options are available. Each segment acts as a neopixel channel, so it takes the equivalent of 40 pixels to create an 8-digit display. Multiple displays can be daisy-chained together, so you can have up to 6 displays on a single CobraPin output channel (6 x 40 = 240 < 256). You can also arrange 4 displays together to create a 16x2 digit display that fits in the same area as something like a WPC89 display.
 +
 +
Here is an example of the working 14-segment 8-digit version:
 +
 +
[[File:CobraPin_Neoseg14_example.jpg|600px]]
 +
 +
There is also a 2-digit version for Ball, Match, Credit, and playfield displays where the 8 digit version may not fit or align with backglass openings. This exact arrangement was used in a custom Joust head-to-head build:
 +
 +
[https://www.youtube.com/watch?v=8hY2MuBaE14 Joust Head to Head Serial Segment Display Test]
 +
 +
A previous beta version of the displays used 7-digits of a 16-segment display module. That one will not be produced moving forward, but ''shown here are two displays next to each other, a red and blue.''
 +
 +
[[File:CobraPin_NeoSeg.JPG|600px]]
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 265: Line 382:
  
 
===LEDs on the STM32===
 
===LEDs on the STM32===
Each STM32 board has a power LED and an LED connected to a processor pin. For the USB-C version of the STM32 board that is shipped with CobraPin, the blue LED connected to pin PB21 has a useful troubleshooting purpose. It is a heartbeat and activity indicator. The LED is toggled every second and whenever there is a USB packet received.
+
Each STM32 board has a power LED and an LED connected to a processor pin. For the USB-C version of the STM32 board with white buttons, the blue LED connected to pin PB21 has a useful troubleshooting purpose. It is a heartbeat and activity indicator. The LED is toggled every second and whenever there is a USB packet received.
  
 
'''Toggling every second:''' The OPP firmware is running and it is not receiving any USB packets.
 
'''Toggling every second:''' The OPP firmware is running and it is not receiving any USB packets.
Line 271: Line 388:
 
'''On dimly or changing like there is a lot of activity:''' The OPP firmware is running and is receiving USB packets. The host is communicating with it. This is the state when MPF is running a game.
 
'''On dimly or changing like there is a lot of activity:''' The OPP firmware is running and is receiving USB packets. The host is communicating with it. This is the state when MPF is running a game.
  
'''Note:''' If you are using a micro-USB version of the STM32 board, you should ignore the LED connected to PC13. This pin is shared with an I/O pin used for another purpose and should not be used for troubleshooting.
+
'''Note:''' If you are using a micro-USB version of the STM32 board or a Type-C version with brass colored buttons, you should ignore the LED connected to PC13. This pin is shared with an I/O pin used for another purpose and should not be used for troubleshooting.
  
 
===Scenarios===
 
===Scenarios===
Line 328: Line 445:
  
 
To install a board, ensure the USB connector faces toward the outside of the CobraPin (i.e. not facing straight into the power capacitors). Set the board in place and double-check that all the pins line up. Then carefully and slowly push the board straight down, keeping it level with the CobraPin board.
 
To install a board, ensure the USB connector faces toward the outside of the CobraPin (i.e. not facing straight into the power capacitors). Set the board in place and double-check that all the pins line up. Then carefully and slowly push the board straight down, keeping it level with the CobraPin board.
 +
 +
=====Soldering Headers:=====
 +
If you are soldering your own pin headers on a new STM32 board, the right angle 4-pin programming header on regular STM32 blue pill boards needs to be removed so it can be replaced with a downward-facing straight pin header. Type-C STM32 blue pill boards generally come without this header installed anyway.
 +
 +
Use the CobraPin female headers as a jig. Carefully plug in the 3x (4-pin, 20-pin, 20-pin) pin headers into the female headers and place the STM32 board on the headers. Solder the 44 pins. See below for pics of how the boards should look when complete.
 +
 +
'''Note:''' No other board modifications are necessary.
 +
 +
 +
=====Type-C STM32 BluePill=====
 +
[[File:CobraPin_STM32_TypeC_Top.jpg|500px]]
 +
[[File:CobraPin_STM32_TypeC_Bot.jpg|500px]]
 +
 +
=====Regular STM32 BluePill with microUSB=====
 +
[[File:CobraPin_STM32_Top.jpg|500px]]
 +
[[File:CobraPin_STM32_Bot.jpg|500px]]
  
 
====Transistor====
 
====Transistor====
 +
You can replace a blown surface mount transistor with a through hole part. Most people will find this a bit easier than a surface mount replacement. The through hole transistor is a TO-251 (IPAK) package. It is a bit smaller than the typical TO-220 package that many pinball techs are used to.
 +
 +
Carefully snip the two leads on the surface mount transistor as close to the body of the transistors as possible. You want to put as little strain on the circuit board pads as possible which is why you cut flush to the transistor body. Then desolder the now vestigial leads from the board. You can leave the body of the FET attached if the two leads are gone. Then solder in the new through hole part. The metal tab side of the transistor faces the output connectors. There are some very small silkscreen marks in the footprint to further identify which side the tab is on.
 +
 +
Here are a variety of options for transistors:
 +
 +
 +
''Surface Mount:''
 +
* Infineon IRLR3110ZTRPBF
 +
* ST STD25NF10LT4
 +
* Wuxi NCE0140KA
 +
* Wuxi NCEP0178AK
 +
 +
 +
''Through Hole:''
 +
* Infineon IRLU3110ZPBF
 +
* Diode Inc. DMT10H009LH3
 +
* Alpha and Omega AOI296A
 +
  
 
====Fuse====
 
====Fuse====
Line 343: Line 495:
  
 
5. Test your setup without powering the fuse first to make sure there are no software or configuration problems
 
5. Test your setup without powering the fuse first to make sure there are no software or configuration problems
 +
 +
 +
== Source ==
 +
Source files for CobraPin can be found on the [https://github.com/cobra18t/CobraPin CobraPin Github]

Latest revision as of 23:59, 20 September 2024

CobraPin Pinball Controller

CobraPinV1 02 isoSmall.JPG

Overview

CobraPin is a pinball controller designed to offer a basic all-in-one assembled affordable solution. It is intended to be hosted by a computer running the Mission Pinball Framework (MPF) and is based on the Open Pinball Project (OPP) It was released to the public in 2021 on Kickstarter.

Features:

  • 24 coil drivers for solenoids, flashers, motors, etc. Outputs are broken out into 3 banks of 8 outputs.
  • 38 direct switch inputs <OR> 22 direct inputs and an 8x8 switch matrix
  • Neopixel support for 512 RGB or RGBW LEDs
  • 12-50V power filter. Board also provides the common ground for the supplies.
  • Fuses for solenoid banks and Neopixels
  • Relay Control Output for common dual relay boards
  • Easy replacement of at-risk components
    • Processor boards are socketed
    • Transistors can be removed with simple soldering tools and replaced with through-hole components
    • Fuse clips for common 5x20mm fuses

Where to Buy

CobraPin is now available on the Cobra Amusements Pinside shop.

Future Hardware Plans

Opto Trough

This is intended to give people a more affordable option for a 6-ball opto trough. I prefer opto troughs rather than mechanical microswitches. I also wanted something that could more easily be connected to CobraPin hardware.

CobraPin troughTrial.jpg

Opto Flipper Switches

Opto flipper switches, built in neopixel lighting, better connection strategy to CobraPin hardware

Open Source Pinball Game

I am slowly making a game! It will be open source so people can build it, mod it, and make it their own. There will be a new set of CobraPin electronics hardware developed to make the connecting and wiring task easier for people.

CobraPin prototypeGame.jpg


Wiring

CobraPinConnectionDiagram.jpg

Power Input

Power comes in to the board on two 4-pin 3.96mm pitch connectors. The default connectors are JST VH style. The pinout is labeled in silkscreen on the board.

J9: Coil power input (12-50V).

J10: Neopixel 5V input

Coil Power Supply Requirement

Since CobraPin has large capacitors, it takes high current for a short time to charge them up at initial power-on. Most switch mode power supplies (digital rather than the old transformers) have overload protection that kick in during this initial power-on state. Some protection modes are incompatible with CobraPin. The incompatible protection modes will just shut off while trying to charge the capacitors. Nothing bad happens, but you just don't have power.

DO NOT use a power supply that shuts down its output in an overload state. Meanwell SE series is an examples of this. This is not an exhaustive list.

CobraPin PS Cut.png


DO use a power supply with constant-current limiting or something that says "recovers automatically" for overload protection. Meanwell RSP, HRP, and MSP series are examples of this. This is not an exhaustive list. Most generic power supplies sold for LED strip lighting applications have constant current limiting.

CobraPin PS ConstantCurrent.png

Power Jumper

JP9: The input goes through an NTC thermistor to limit the load on the power supply when it first turns on and charges the large power capacitors. When cold, the thermistor is about 1.5ohms, as it heats up, the resistance drops considerably (1/10th or 1/20th of the cold resistance). If you find that the first minute of play is too weak, you can bypass the thermistor by soldering a wire at JP9. This will further load your power supply at startup, so proceed with caution.


Fuses

There are 4 fuses that are 5x20mm size. 3 are for the coil output banks (A, B, C) and one for the LED power. You have to select the current rating of the fuses based on the load you are fusing for each. 10A is the maximum current rating of fuse you should use. I recommend only using slow blow fuses.


Coil Power Output

The output power for the coils comes from a 3-pin 3.96mm JST VH style connector. These outputs are fused by F1, F2, and F3. Each pin provides an output for one of the coil banks. The pinout is labeled in silkscreen on the board.

J13: Coil power outputs. Each pin should be used to power the coils in its corresponding bank.


Coil Outputs

The 24 coils are broken up into 3 banks of 8 outputs. The 3 9-pin 3.96mm connectors are JST VH style. The coil outputs are labeled in silkscreen with the MPF compatible numbers.

There is a ninth pin on the connector that can be used as a key. That pin is marked by an asterisk (*) in silkscreen. This pin should not be connected to a coil. Quadruple check your pinout or you will burn fuses, transistors, diodes, traces, etc.

Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you MUST ensure that you connect them with the correct polarity.

Every coil in a bank should be powered by the associated bank power pin on J13. For example, coils in Bank A should be powered by the HV_A pin of J13.

J6: Coil bank A outputs

J7: Coil bank B outputs

J8: Coil bank C outputs

Each bank has an LED next to it to indicate if that bank has power. Check these if you are concerned you have blown a fuse.

Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup without high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.

Pinout Information: File:CobraPin STM32 Mappings ALL.pdf

WARNING: OPP firmware versions 2.3.0.0 to 2.3.0.5 have a bug that can lead to autofire coils getting stuck on. Look into more details and your workaround options here: OPP_Autofire_Workaround

Switch Inputs

There are 5 9-pin 2.54mm pitch KF2510 style connectors for switches. The switch inputs are labeled in silkscreen with the MPF compatible numbers. Each connector also includes a logic ground pin. Use this for the direct input return. The two pins labeled “N/C” are not connected to anything.

J1, J2, J3: Direct input switches.

J4, J5: Remaining direct input switches <OR> switch matrix input/output. The matrix row and column numbers are labeled in silkscreen in parentheses. See MPF section below for switch matrix anomalies.

WARNING: the switch inputs should be limited to 3.3V since the STM32 is a 3.3V device. If you are using an active switch like a drop target opto board, make sure none of the switch pins can go above 3.3V.

Pinout Information: File:CobraPin STM32 Mappings ALL.pdf

Board Error: On board versions 1.02 and older, the silkscreen pin labels for J4 and J5 are swapped. As an example, the pin labelled 1-0-16 on J4 is actually 1-0-24 and the pin labelled 1-0-24 on J5 is actually 1-0-16. This only applies if you are using a Direct switch configuration. Switch matrix users will use the matrix numbering anyway.

CobraPin label swap.JPG

3.3V Input Limiting Example

For an example of limiting a device to 3.3V, the 5768-12368-00 drop target opto board from Police Force requires 10k resistors in the R9, R10, and R11 positions (see below) to keep the column voltage under 3.3V. If you do not do this, the opto board will try to the pull the column up to 12V. If you only use the 18k resistors suggested in the manual, the voltage will be limited to 4.8V...which is still too high.

Your other option in the case of 5768-12368-00 is to power the drop target board off of 3.3V instead of 12V so there are no higher voltages even present on the board. This would require changing R1, R3, R5 to 100ohms (standard 1/4W resistor would be fine) in order to drive the opto with a similar current given the lower drive voltage. The LM339 should operate fine at 3.3V.

Wiliams 5768-12368-00 schematic.PNG

Matrix Row Pull Resistor Jumpers

When using optos in a switch matrix, sometimes the internal pull resistors on the switch matrix inputs (rows) are not strong enough to register opto inputs properly. If this becomes a problem, you can use the onboard pull resistors to augment the internal resistors in the STM32. To do so, make a solder bridge on the 8 row jumpers (JP1-8) on the underside of the board. If you have a standard active-low matrix, then the solder jumper needs to be on the PULL_UP side. If you are instead using and active-high matrix, the jumper should be on the PULL_DOWN side.

WARNING: DO NOT connect all three pads of a jumper together. This would short 3.3V and GND together and will likely destroy the STM32 processor board.

CobraPin pullupdownSmall.JPG

Neopixel RGB LEDs

There are two neopixel chains that support 256 RGB pixels each for a total of 512. These outputs are on 2 3-pin 3.96mm JST VH connectors. RGBW pixels are also possible.

The J14 fused output can be used to provide additional power taps in a neopixel chain. This is a 4-pin 3.96mm JST VH style connector. Each pin is rated for 7A continuous. The fuse holder is rated for 10A. The red D25 LED can be used to confirm you have a good fuse (F4) and are providing power for neopixels.

J11: NEO 0 Neopixel output (all these lights have MPF numbers with the format 0-0-##. The first LED in the chain is 0-0-0).

J12: NEO 1 Neopixel output (all these lights have MPF numbers with the format 1-0-##. The first LED in the chain is 1-0-0).

J14: Fused 5V output

USB

The two processor boards are connected to the host computer via two separate USB-C cables (the beta version used micro-USB cables).


Relay Control Output

CobraPin can drive a dual relay board commonly sold for Arduino applications. These relay boards are powered by 5V and are driven by two control signals. The 5V power for the relay control comes from the Board 1 USB power.

By default, nothing is connected to the two control outputs. On the underside of the CobraPin are two 3-way solder jumpers. Each jumper controls how one of the control outputs is driven. Connecting the middle and lower pad enables that relay control output any time there is USB power to the Board 1 processor board. Connecting the middle and upper pads gives control of the relay programmatically to MPF by using the 1-0-1 coil output. Version 2+ of the CobraPin boards enables the use of 1-0-1 for one relay and 1-0-2 for the other relay.

Note: When using the 1-0-1 coil output for relay control, do not use the 1-0-1 output on J8. These are controlled by the same processor pin. Similarly for 1-0-2 as well when it is in use.

J15: 5V power and control for a dual relay board

CobraPinRelayOutputSelect.PNG

MPF Configuration

It is HIGHLY RECOMMENDED that you start your MPF game-making journey with the MPF Tutorial

You should install version 0.55 or higher of MPF. As of 20210601, this means you need to install the dev version of MPF.

For detailed MPF documentation, head over to MPF Docs

CobraPin specific info can be found here: CobraPin on MPF Docs

An Example Config is available to help you start your game's config.

Switch Matrix

OPP now supports both active low and active high switch matrices. Active low and high refer to the direction that the columns are strobed in a switch matrix. The style that you want is selected by loading the respective OPP configuration into the STM32 board. See OPP Configuration below.

On CobraPin, the SW MATRIX OUT connector has the column outputs 0-7 and the SW MATRIX IN connector has the row inputs 0-7.

The default Standard configuration of CobraPin uses an active low matrix.

Active Low Matrix

An active low matrix pulls a column down when it is selected so that any active switch pulls the associated row down. In an active low matrix, the diodes always point toward the columns. Williams is an example of a manufacturer that always used an active low matrix.

Active High Matrix

In an active high matrix, the logic is just reversed. Columns pulse high so active switches are pulled high. The diodes point toward the rows. Gottlieb System 3 is an example of a system that used an active high matrix.

In many cases, you can use an active low matrix to drive a machine that was intended to have an active high matrix by just swapping the row and column connectors. Then the diodes will point to the columns as required for an active low matrix. If you do this, you will have to transpose your matrix switch numbering from what you might find in your game's manual since the rows are columns and the columns are the rows now. This method will work for simple mechanical but your mileage may vary on active switches like some optos and drop target banks.

Switches inputs from an active high matrix in MPF appear to be inverted. So when a switch is open or OFF, it appears in MPF that it is closed or ON. To fix this, you have to invert it again. So you add "type: NC" to the switch definition of a normally-open matrix switch. The NC stands for Normally-Closed. I know it is backwards, but that is how it works. This is not required for the Standard active low matrix

Matrix Numbering

The matrix is hosted by Board 1 on the CobraPin, so the valid numbers for switches are 1-0-32 through 1-0-95. See table below.

OPP SW MAT numbering.jpg

Lamp Matrix Numbering

The lamp matrix is hosted on the Xpansion board. The valid numbers are 2-0-0 through 2-0-63. An example config can be found here. Cobrapin lamp matrix.jpg

Autofire Devices

Autofire devices use a configurable link between a switch and a coil output to control the coil with the absolute minimal latency by allowing the STM32 to directly control the coil rather than the control coming from the host computer. These should be used for timing critical coils like flippers, pop bumpers, and slings.

Note: an autofire coil must be controlled by a switch on the same STM32 board. So a 1-0-xx switch needs to control a 1-0-yy coil and a 0-0-xx switch needs to control a 0-0-yy coil.

WARNING: OPP firmware versions 2.3.0.0 to 2.3.0.5 have a bug that can lead to autofire coils getting stuck on. Look into more details and your workaround options here: OPP_Autofire_Workaround

STM32 Flashing and OPP Configuration

The firmware on the STM32 board exists in two parts: the base application and the OPP configuration.

As delivered, the boards should be flashed and configured appropriately. But if you need to updated something or replace a processor board, this section is for you.

The base application must be flashed with a separate programming device while the OPP configuration can be changed over USB via Python scripts.

For those not familiar with python, a detailed step by step walkthrough of the process can be found here: Beginner's Guide to STM32 flashing

Flashing

You can download a snapshot of the OPP source here: OPP Source

The STM32 firmware images can be found in the folder Stm32Workbench / Gen3Images /

Instructions for flashing the base application on to the STM32 board can be found here on the OPP site: Loading STM32 Firmware

Configuration

Pre-made config files can be found here: CobraPin STM32 Config Files

You can use these or modify them for your own needs. For example, OPP has the capability to operate in "whitewood mode." That means that switches can be assigned to coil outputs to control a machine in a basic way (flippers flipping, pops and slings firing, but no rules) before you have MPF up and running. This is setup in the config and is unique to your own machine.

There are two processor boards on the CobraPin with the board numbers labeled on silkscreen under the boards. Board 0 is the upper board and Board 1 is the lower board. Each board requires a different config and should not be swapped without re-configuring OPP.

Putting a Board 1 config in a Board 0 slot could result in blown FETs, coils, or fuses. A Board 0 config should also not go in the Board 1 slot. Proceed with caution!

Board 0

Regular: Neopixels on J11 that glow dimly blue at power-on. The purpose of glowing dimly is to verify at a glance that all pixels are operating properly even before MPF takes control of the lights.

NoGlow: Neopixels on J11 will stay off at power up.

Board 1

There are 3 variants for Board 1. By default, all of them have neopixels on J12 that glow dimly blue at power-on. The purpose of glowing dimly is to verify at a glance that all pixels are operating properly even before MPF takes control of the lights. Each variant also has a NoGlow option.

Standard: Includes the standard active-low matrix for 64 matrix switches and 22 direct inputs.

Direct: No matrix for a total of 38 direct inputs on the CobraPin.

HighMatrix: Includes an active-high matrix for 64 matrix switches and 22 direct inputs.

Loading the Config

The OPP Config Process consists of establishing comms, erasing the existing config, loading/saving the new config, and verifying the new config. Note that Gen2Test is a Python 2 script while MPF uses Python 3. You must have both Python versions to configure OPP and run MPF.

Since CobraPin relies on processor board serial numbers to address the boards, use Gen2Test to load the serial number. The serial should be the board number (0,1,2, etc.).

As an example, here is the command sequence to load the regular config into Board 0. You may have a different port name.

python Gen2Test.py -port=/dev/ttyACM0

python Gen2Test.py -port=/dev/ttyACM0 -eraseCfg

python Gen2Test.py -port=/dev/ttyACM0 -saveCfg -loadCfg=CobraPin_Board0.py

python Gen2Test.py -port=/dev/ttyACM0

python Gen2Test.py -port=/dev/ttyACM0 -ser=0


Expansion Boards

As with any "all-in-one" solution, sometimes people want something extra or slightly different than the main offering. That is what these expansion boards are for. These can be used together with the main board, separately, or even alongside another board supported by MPF.

Xpansion Board

The purpose of the Xpansion board is to make it easier for people to control existing machines with flashers and matrix controlled lamps. The lamp matrix can drive either incandescent or LED lamps.

Xpansion v0 02 small.JPG

Xpansion Features

  • 8x8 Lamp matrix
  • 8 coil outputs for solenoids, flashers, motors, etc.
  • 8 direct switch inputs
  • Switch diode protection

Xpansion Wiring

Xpansion Board Wiring Explanation Video

Power Input

Power comes in to the board on a 4-pin 3.96mm pitch JST VH style connector. The pinout is labeled in silkscreen on the board.

J4: Coil power input (12-50V) and Lamp power input (usually 18V)

Coil Power Output

The output power for the coils comes from a pin on the coil output connector (J6). It is marked with an asterisk in silkscreen. This output is fused by F2. The blue D26 LED lights when power is applied. Check this LED if you are concerned you have blown a fuse.

Coil Outputs

The 8 coil outputs are on a 9-pin 3.96mm JST VH style connector. There is a ninth pin on the connector that provides fused coil power and is marked with an asterisk in silkscreen. The coil outputs are labeled in silkscreen with the MPF compatible numbers.

Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you MUST ensure that you connect them with the correct polarity.

J6: Coil bank D outputs

Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup without high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.

Switch Inputs

There is a 9-pin 2.54mm pitch KF2510 style connector for switches. The switch inputs are labeled in silkscreen with the MPF compatible numbers. Each connector also includes a logic ground pin. Use this for the direct input return.

Switches have diode protection against both high and negative voltages.

J2: Direct input switches.

Lamp Matrix Outputs

There is a 9-pin 3.96mm JST VH style connector for matrix columns and a 9-pin 2.54mm pitch KF2510 style connector for matrix rows. Column and row numbers are labeled in silkscreen. There is an unused pin on each connector marked with an asterisk in silkscreen.

J1: Lamp matrix Columns.

J3: Lamp matrix Rows.

USB

The processor board is connected to the host computer via a separate USB-C cable.

Satellite Board

The Satellite board offers more direct switch inputs to make it easier to avoid using a switch matrix. It also carries with it a number of other expanded capabilities.

CobraPin Satellite isoSmall.png

Satellite Features

  • 23 direct switch inputs
  • 8 coil outputs for solenoids, flashers, motors, etc.
  • Neopixel output for 256 RGB or RGBW LEDs
  • 5 or 12V LED power
  • I/O Protection for input pins.

Satellite Wiring

Power Input

Power comes in to the board on a 4-pin 3.96mm pitch JST VH style connector. The pinout is labeled in silkscreen on the board.

J4: Coil power input (12-50V) and LED power input (5-12V). BEWARE J7 is the same connector type as J4 and is right next to it. Swapping them can put the coil high voltage on the 5V bus and destroy lots of things. Check your connections!

Coil Power Output

The output power for the coils comes from a pin on the coil output connector (J6). It is marked with an asterisk in silkscreen. This output is fused by F2. The blue D26 LED lights when power is applied. Check this LED if you are concerned you have blown a fuse.

Coil Outputs

The 8 coil outputs are on a 9-pin 3.96mm JST VH style connector. There is a ninth pin on the connector that provides fused coil power and is marked with an asterisk in silkscreen. The coil outputs are labeled in silkscreen with the MPF compatible numbers.

Each coil output has a diode to help protect the transistor. You may still use coils with axial diodes installed, but you MUST ensure that you connect them with the correct polarity.

J6: Coil bank E outputs

Each solenoid has an associated yellow LED to indicate it is being driven by the processor. It is highly recommended to test a new setup without high voltage power or without the coils plugged in. Using these LEDs, you can verify that each output is being driven correctly.

Switch Inputs

There are 3 9-pin 2.54mm pitch KF2510 style connectors for switches. The switch inputs are labeled in silkscreen with the MPF compatible numbers. Each connector also includes a logic ground pin. Use this for the direct input return.

Switches have diode protection against negative voltages. There is also bidirectional protection based on resettable polyfuses to protect switch inputs from higher voltages.

J1, J2, J3: Direct input switches.

Matrix Row Pull Resistor Jumpers

If you are using a the Satellite Board to drive a switch matrix, see section above.

Neopixel RGB LEDs

The neopixel chain supports 256 RGB pixels. This output is on a 3-pin 3.96mm JST VH connectors. RGBW pixels are also possible.

The J7 fused output can be used to provide additional power taps in a neopixel chain. This is a 4-pin 3.96mm JST VH style connector. Each pin is rated for 7A continuous. The fuse holder is rated for 10A. The red D25 LED can be used to confirm you have a good fuse (F4) and are providing power for neopixels.

J5: NEO 3 Neopixel output (all these lights have MPF numbers with the format 3-0-##).

J7: Fused LED power output (5-12V)

USB

The processor board is connected to the host computer via a separate USB-C cable.

NeoSeg Serial Segment Displays

MPF Config Information: NeoSeg Serial Segment Displays

Original Kickstarter here: NeoSeg Kickstarter

The NeoSeg display is an 8-digit alphanumeric display that is controlled by the neopixel output and the display is mono color. Multiple color options are available. Each segment acts as a neopixel channel, so it takes the equivalent of 40 pixels to create an 8-digit display. Multiple displays can be daisy-chained together, so you can have up to 6 displays on a single CobraPin output channel (6 x 40 = 240 < 256). You can also arrange 4 displays together to create a 16x2 digit display that fits in the same area as something like a WPC89 display.

Here is an example of the working 14-segment 8-digit version:

CobraPin Neoseg14 example.jpg

There is also a 2-digit version for Ball, Match, Credit, and playfield displays where the 8 digit version may not fit or align with backglass openings. This exact arrangement was used in a custom Joust head-to-head build:

Joust Head to Head Serial Segment Display Test

A previous beta version of the displays used 7-digits of a 16-segment display module. That one will not be produced moving forward, but shown here are two displays next to each other, a red and blue.

CobraPin NeoSeg.JPG

Troubleshooting

You should always try a new or significantly changed setup WITHOUT coil power. Use the yellow coil LEDs on CobraPin to check if the coil outputs are behaving as expected.

LEDs on the STM32

Each STM32 board has a power LED and an LED connected to a processor pin. For the USB-C version of the STM32 board with white buttons, the blue LED connected to pin PB21 has a useful troubleshooting purpose. It is a heartbeat and activity indicator. The LED is toggled every second and whenever there is a USB packet received.

Toggling every second: The OPP firmware is running and it is not receiving any USB packets.

On dimly or changing like there is a lot of activity: The OPP firmware is running and is receiving USB packets. The host is communicating with it. This is the state when MPF is running a game.

Note: If you are using a micro-USB version of the STM32 board or a Type-C version with brass colored buttons, you should ignore the LED connected to PC13. This pin is shared with an I/O pin used for another purpose and should not be used for troubleshooting.

Scenarios

Symptom: Coil not firing
Things to check:
   1. Is there a blown fuse? There are blue LEDs for banks A, B, and C. 
      These will be lit if coil power is applied to the board and the 
      fuses are good.
   2. Does the yellow LED associated with that channel light 
      appropriately? This can be tested without coil power.
   3. Do you have continuity to your coil?

Symptom: Coil stuck on
Things to check:
   1. Is the yellow LED associated with that channel also stuck on?
      If so, is a Board 1 config accidentally loaded in a Board 0 slot?
   2. What is the resistance from the coil output pin to GND?
      Check this with power off, coils disconnected, red probe on coil 
      output, black on GND. If the resistance is low, The FET is blown.

Symptom: All/many switches report as active or inverted in MPF
Things to check:
   1. Do you have the column/row connectors swapped?
   2. Are your matrix diodes pointed the correct direction given the 
      style matrix you have?
   3. For an active-high matrix MPF requires a "type: NC" in the switch 
      definition for a normally-open switch.

Symptom: Neopixel chain does not glow blue on startup
Things to check:
   1. Do you have 5V applied to the board at J10?
   2. Is the fuse blown? Check the red 5V LED on the CobraPin board
   3. Does another set of neopixels work when plugged in?
   4. Do you have a NoGlow config loaded?

Replacing Components

Static can break electronics. Avoid touching pins or components, when possible.

If you must touch them, use a conductive wrist strap to an earth ground, discharge yourself by touching grounded metal, or at least stop shuffling your feet on the carpet.

STM32 Processor Board

To remove a processor board, pull it out. Simple, but not always easy. Work it out slowly, always keeping it level with the CobraPin board. Failure to do so could result in bent pins or damaged female headers.

To install a board, ensure the USB connector faces toward the outside of the CobraPin (i.e. not facing straight into the power capacitors). Set the board in place and double-check that all the pins line up. Then carefully and slowly push the board straight down, keeping it level with the CobraPin board.

Soldering Headers:

If you are soldering your own pin headers on a new STM32 board, the right angle 4-pin programming header on regular STM32 blue pill boards needs to be removed so it can be replaced with a downward-facing straight pin header. Type-C STM32 blue pill boards generally come without this header installed anyway.

Use the CobraPin female headers as a jig. Carefully plug in the 3x (4-pin, 20-pin, 20-pin) pin headers into the female headers and place the STM32 board on the headers. Solder the 44 pins. See below for pics of how the boards should look when complete.

Note: No other board modifications are necessary.


Type-C STM32 BluePill

CobraPin STM32 TypeC Top.jpg CobraPin STM32 TypeC Bot.jpg

Regular STM32 BluePill with microUSB

CobraPin STM32 Top.jpg CobraPin STM32 Bot.jpg

Transistor

You can replace a blown surface mount transistor with a through hole part. Most people will find this a bit easier than a surface mount replacement. The through hole transistor is a TO-251 (IPAK) package. It is a bit smaller than the typical TO-220 package that many pinball techs are used to.

Carefully snip the two leads on the surface mount transistor as close to the body of the transistors as possible. You want to put as little strain on the circuit board pads as possible which is why you cut flush to the transistor body. Then desolder the now vestigial leads from the board. You can leave the body of the FET attached if the two leads are gone. Then solder in the new through hole part. The metal tab side of the transistor faces the output connectors. There are some very small silkscreen marks in the footprint to further identify which side the tab is on.

Here are a variety of options for transistors:


Surface Mount:

  • Infineon IRLR3110ZTRPBF
  • ST STD25NF10LT4
  • Wuxi NCE0140KA
  • Wuxi NCEP0178AK


Through Hole:

  • Infineon IRLU3110ZPBF
  • Diode Inc. DMT10H009LH3
  • Alpha and Omega AOI296A


Fuse

You should use slow blow 5x20mm fuses. The maximum allowable fuse is 10A.

1. Remove the clear plastic fuse cover

2. Gently pull out spent fuse

3. Push in new fuse trying to keep it level with the board and centered in the fuse holder

4. Replace fuse cover

5. Test your setup without powering the fuse first to make sure there are no software or configuration problems


Source

Source files for CobraPin can be found on the CobraPin Github