Re: Opto's with Cobrapin

664 views
Skip to first unread message
Message has been deleted

jabdoa

unread,
Dec 18, 2021, 5:35:59 AM12/18/21
to MPF Users
You do not need those boards. To test your optos you can start with a simple inline current limiting resistor. I can post my Gerber files later.


Jan

Eddie Aretz schrieb am Samstag, 18. Dezember 2021 um 03:00:40 UTC+1:
Hello

Firstly thankyou to all involved, My game is getting huge code wise and its time to plan out the hardware in more detail.

So could I ask for any solutions people are using with Cobrapin for Optos? I see in the docs below that there is mention of breakout boards I could make up from China and to post in this forum for them. Any links or ideas would be appreciated.

 

Thanks in advance and look forward to sharing Sorcerer retheme with you in the future.

Regards
Ed

Cole M

unread,
Jan 25, 2022, 7:18:51 AM1/25/22
to MPF Users
If you are willing to run your IR transmitters off of 12V these are good.  The pair of RX and TX have about a 3" range.  I use 3D printed mounts for the boards all over my machine.  https://www.multimorphic.com/store/circuit-boards/single-opto-rx-tx/
Message has been deleted

Ondrej Lukes

unread,
Jan 30, 2022, 3:42:49 AM1/30/22
to MPF Users
Or you can do DIY it from the scratch.
3d-printed williams opto holders (i believe from pinballmakers), generic IR led and IR reciever, 36ohm resistor, a piece of prototyping board and jst xh connectors. Runs on 5V from cobrapin board.539e786288354d000485513a3e8989632abaedba.jpg

Dne čtvrtek 27. ledna 2022 v 1:31:18 UTC+1 uživatel Eddie Aretz napsal:
Thanks for the replies, I will check out the multimorphic opto's and will do some reading to see what resistor I need for them using cobrapin.

Ed
Message has been deleted

leeoneil

unread,
May 8, 2022, 11:44:08 AM5/8/22
to MPF Users
Hello !
I hope i'm not bothering anyone posting in this subject.
I've bought a ball trought assembly, like this one :
https://www.pinballlife.com/ball-trough-assembly-4-ball.html

There is an opto switch for the first ball.
Each side have B1+ and B1 GND pin.
I'm not sure to understand correctly the way i need to connect it to the cobrapin.

First i need to find a 36ohm resistor right ?
Is there a simple schematic on how to wire everthing ?
Or does anyone have this kind of ball trough with a photography of the wires maybe ?
Thank's for your help !

Le lundi 31 janvier 2022 à 11:36:20 UTC+1, Eddie Aretz a écrit :

Even better! Thank you.

Ralf G.

unread,
May 8, 2022, 5:16:59 PM5/8/22
to MPF Users
I have the same trough, but not connected yet, so take the following with a grain of salt still.
As for wiring, the image helps a little. Basically, you need to power the 2 transmitter diodes, each needs 1.7 V and not more than that. Check out https://www.scottdanesi.com/?p=1433 to calculate what resistor you need. I have a 5VDC rail, so his example should work for me (47 ohms, I picked 1 Watt).
The receiver side is where you connect it to your CobraPin switch input (2 switches, "Jam" and "Ball 1"). Note that diodes pass the current once within the IR light, so you need to set up these switches inverted (normally closed, NC).

Hope this helps
Ralf



20190128_091942_BallTroughOptos.jpg

leeoneil

unread,
May 9, 2022, 3:56:22 AM5/9/22
to MPF Users
Thank, it's helping me a lot , i'm starting to understand.
But i'm dumb, i'm not sure what to do with the Ball 1 GND from the transmitter !

So if i understand correctly, if i use only the first switch (no jam switch) :
wire_BallTroughOptos.jpg

Where goes the ball 1 GND ? On the  GND switch we have on the cobra ?

Thank's for your help !

Ondrej Lukes

unread,
May 9, 2022, 4:08:26 AM5/9/22
to MPF Users
You only need the resistor on the transmitter side, so your +5 goes into resistor and then Ball 1+  and Ball 1 GND goes back to the ground pin where you take your 5 volts from.
On the reciever side your Ball 1+ goes to cobrapin switch input bank and Ball 1 GND to the groud pin of the switch bank (or your common switch ground branch)
Same applies for the jam switch. Basically you need 5 volts to  generate the IR light on the transmitter and the resistor not to burn the diode.
Reciever acts like a switch (it shouldnt evn matter if you connect it the other way around)

Dne pondělí 9. května 2022 v 9:56:22 UTC+2 uživatel l...@rdtp.net napsal:

leeoneil

unread,
May 9, 2022, 4:23:18 AM5/9/22
to MPF Users
Wow ok i'm clearly stupid.
So the wire schematic should look like this :
wire2_BallTroughOptos.jpg

You spoke about a 5VDC rail.
You don't use the +5v from the cobra (wich is powered by a 5V powersupply) ?
You use something else ?

Thank's for your patience !

Ondrej Lukes

unread,
May 9, 2022, 4:47:56 AM5/9/22
to MPF Users
I only use 5VDC from Cobra, sorry if my description was confusing =) Both for opto transmitters and servos.

Dne pondělí 9. května 2022 v 10:23:18 UTC+2 uživatel l...@rdtp.net napsal:

Jhon Smith

unread,
Dec 21, 2022, 2:05:08 PM12/21/22
to MPF Users
Guys, thank you for this examples. 

I have question how should I wire to cobrapin bally/data east tough opto that has just 12v  my receiver: https://www.marcospecialties.com/pinball-parts/A-17981

Im in dead end seams, really need to order new tough?

Kyle Mudflaps

unread,
Jan 2, 2023, 4:52:55 PM1/2/23
to MPF Users
Is there a 'clean' way to solder the resistor to the opto board? I have a Spooky scoop with optos, no resistor. I ordered some resistors, but not sure if there's a best practice to get it installed. 

cobra18t

unread,
Jan 3, 2023, 1:53:48 PM1/3/23
to MPF Users
You could:
  1. Solder the resistors inline with the wire with heat shrink over it
  2. Carefully cut one of the traces that goes to the LED with an xacto and the solder the resistor from the LED pin to the input connector pin
  3. Maybe buy one of these. Confirm the resistor provides you a reasonable current based on the voltage you are using:  Pinball Life: 4x Opto Power Board Assembly

Kyle Mudflaps

unread,
Jan 4, 2023, 9:07:04 AM1/4/23
to MPF Users
^^ Thanks for the confirmation. I saw the pinballlife opto board, but it's not clear which resistor they're using. I'll likely purchase that and use separate resistors rated for the 5V power. They have multi-packs on amazon.

Here's a great article from Scott Danesi about using optos with 5V. Using his gonkulator, he recommends 47ohms, 1/2 W. https://www.scottdanesi.com/?p=1433

So, I'll order the board from pinballlife, install new resistors to the board and see how that goes. I would recommend a section in your manual or FAQ on using optos with 5V power. 

cobra18t

unread,
Jan 5, 2023, 2:09:00 AM1/5/23
to MPF Users
If the picture on Pinball Life is accurate, those are 47ohm 1/4W resistors on that board. So you could use that board directly with 5V and that was its intent, I believe. They will dissipate ~200mW, so they will get warm.

Here is another random reference...1/2W resistors are a bit more scarce, so if you really need that wattage rating, you can use two 100ohm 1/4W resistors in parallel to get a 50ohm 1/2W equivalent, which is close enough to 47ohm.

Kyle Mudflaps

unread,
Jan 6, 2023, 5:53:55 PM1/6/23
to MPF Users
Thanks, I'll get it wired up and report back

Kyle Mudflaps

unread,
Jan 20, 2023, 10:56:48 PM1/20/23
to MPF Users
I installed the pinballlife opto board with new transmitter/receiver. The emitter is working (checked the IR on my iPhone). I added the scoop as a ball event and started a game. Once the game started, the scoop coil fired about once per second for a few seconds then stopped. Once the ball entered the scoop, it ejected normally (yay!) but then the coil fired another handful of times (boo!). On the mpf switch screen, the vuk opto is rapidly blinking. This behavior persisted for the duration of the game. 

Do I need a higher or lower output resistor, or is it something more simple? The other odd thing is that game didn't seem to start normally (the splash screen continued), but all switches and coils were working. 

cobra18t

unread,
Jan 20, 2023, 11:54:31 PM1/20/23
to MPF Users
Is the receiver wired as direct switches or into a matrix? Can you sketch up how you have it all connected?

If it is a matrix, you might need stronger pull-ups for optos. There are solder jumpers and resistors for this purpose on CobraPin:

Kyle Mudflaps

unread,
Jan 21, 2023, 10:21:21 AM1/21/23
to MPF Users
It's to J2, 0-0-27. I sketched up how it's connected, but the power and ground run from the 5V power supply to the pinballlife board input. The output goes to the opto transmitter (5V+ and ground). The opto receiver runs to J2, 0-0-27 and directly to the 5V ground on the power supply.  
opto wiring.jpeg

cobra18t

unread,
Jan 21, 2023, 1:26:06 PM1/21/23
to MPF Users
This looks like a grounding problem on the receiver side. The "E" of the receiver should be connected to CobraPin GND (not 5V GND) available on any of the switch connectors.

In addition to that, this has exposed that your 5V GND and CobraPin GND are likely not connected anywhere. All of your GNDs should be connected somewhere and it is usually best to do that as close to the supplies as possible. If you measure the resistance between 5V GND and CobraPin GND, does it show they are connected? Is this a different 5V supply than the one you plug into the CobraPin?

Kyle Mudflaps

unread,
Jan 21, 2023, 2:40:33 PM1/21/23
to MPF Users
Thanks for the quick reply. So, to be clear, the opto receiver ground goes to the GND port on J2 (circled in red on the attachment)?

And you are correct, I have not connected the 5V ground yet. I've been working the 48V coils & switches so far (no lights yet), so this is my first attempt at a sub-5V switch. The 5V power supply is not connected to CobraPin, so I'll take care of that today. 

ground.png

Kyle Mudflaps

unread,
Jan 21, 2023, 3:32:24 PM1/21/23
to MPF Users
So that was it. I connected the 5V power supply directly to the CobraPin board vs. connecting the opto board directly to the power supply. All functions normally now. Thanks for the quick help.

cobra18t

unread,
Jan 21, 2023, 4:42:56 PM1/21/23
to MPF Users
Glad you got it working!

Kyle Mudflaps

unread,
Jan 22, 2023, 1:04:24 AM1/22/23
to MPF Users
^^ Thanks! I got brave and possibly goofed up again.

With the scoop working, I tried to get the pinballlife 3-bank drop targets working. The bank is intended for 12V, but uses the same resistor as the opto board. I connected the 5V power, ground and input switches on J2 and got everything configured in MPF. The switches didn't register, but I also couldn't start a game and none of the coils are firing. The other switches (flippers, slings, etc) register on the switch page when activated. 

I disconnected the drop target bank, but the coils are still not working and I can't start a game. I reverted to a previous working config file, same thing. I can't start a game, none of the coils will work.

Picture attached of the mech (though I am using a 3-bank, not a 4-bank). I did not connect the COL, only the power, ground and switch inputs.

So, did I fry my board or is there a more simple explanation? 
4 bank opto board.jpeg

cobra18t

unread,
Jan 22, 2023, 1:58:09 AM1/22/23
to MPF Users
Do you have the exact model number of the opto board you are using? Some opto boards could cause damage, others not.

If you did not connect the COL pin, nothing is going to work. That is basically the enable line for the switches. If you are not connecting this to a matrix, you need to connect the COL pin to GND (again, CobraPin GND).

When you cannot start a game, what error or warning are you getting that is preventing the game start.

Message has been deleted

Kyle Mudflaps

unread,
Jan 22, 2023, 9:04:58 AM1/22/23
to MPF Users
The board is PBL-100-0078-00_frosted. Picture attached.

The game is still on a rotisserie, so the start button is tied to 's' on the keyboard. The MPF config went through without error, but the 's' key will not start a game. There is no error message, but the game won't release from the attract screen and the coils won't fire. I had the same behavior when I didn't have the scoop wired correctly, but my concern is that the behavior is consisting even when I disconnected the power and ground. I haven't disconnected the switch inputs from the molex on J2, so maybe that's it...? All fuses good. 

Reference the 12V board, I (probably falsely) assumed the resistors would step down voltage anyway, so a lower voltage input wouldn't hurt. The LED light on the board illuminated showing it was getting power. 

Again, thanks for the help. Digital beers for everyone. 

On Sunday, January 22, 2023 at 1:58:37 AM UTC-5 Ralf G. wrote:
COL is your "switch ground", you want to connect that to your J2 ground pin.
The GND line connects to your power ground (-12V). Not sure why the board should or would work on 5VDC, if it requires 12.... 
I cannot comment on the config...

--
You received this message because you are subscribed to a topic in the Google Groups "MPF Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpf-users/Cn_2ZoLyBpY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/20e6261e-14c3-4c7f-bfd7-a3af4114e206n%40googlegroups.com.
3 bank.jpeg

Avery Tummons

unread,
Jan 22, 2023, 9:34:18 AM1/22/23
to mpf-...@googlegroups.com
Do you have balls in the trough? Either real or the switches enabled in MPF?

Sent from my iPhone

On Jan 22, 2023, at 4:05 AM, Kyle Mudflaps <kylesm...@gmail.com> wrote:

The board is PBL-100-0078-00_frosted. Picture attached.
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/36b6ad98-11db-4b51-84b2-c54ad44d6bd2n%40googlegroups.com.
<3 bank.jpeg>

Kyle Mudflaps

unread,
Jan 22, 2023, 11:26:23 AM1/22/23
to MPF Users
So I believe the hardware issued coincided with an MPF software issue. I've been able to start games normally, but for some reason, MPF either stopped reading virtual balls or I messed with an existing switch. Of course this happened at the exact same time as the drop target mech installation.

I added 6 virtual balls and was able to start a game. Mechs/flippers/slings are working. The 3-bank drop target mech is disconnected until I track down any other issues.

Having said all that, can I use 5V for the 12V optos on the 3 bank drop target mech? If I understand correctly, the actual opto IR sensors use under 2 volts, and the resistor just regulates the voltage (either from a 5V or 12V source). 

Kyle Mudflaps

unread,
Jan 22, 2023, 12:34:47 PM1/22/23
to MPF Users
To close the loop, the game is working normally now. 

(1) The lack of a game start was tied to virtual balls not being in the trough (I had to press 123456, then s). I'm not sure why I was able to start normally prior to adding the 3-bank drop target mech, but I must have added something to the config.
(2) The 12V pinballlife 3-bank drop target mech works fine with 5V. Power to 5V and -/COL to GND. These switches are 'NC' vs 'NO'

Thanks everyone for the patience and help.

Reply all
Reply to author
Forward
0 new messages