What's new
Pinball info

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Arduino project to an actual thing

HomerRamone

Site Supporter
10 Years
Joined
Mar 20, 2013
Messages
1,313
Location
Newcastle
So you've thought of this cool (at least it seems that way to me) project to do with ardunio. Ive knocked up the code for it (that was the easy part :) )
Got it working on a breadboard with some test switches.

the switches intead need to be driven by playfield switches. Im guessing connecting the switches directly isnt a good idea. Is an opto coupler the way to do this ?
Something like this:

There's also the question of making it into "a thing". I have some of the teeny ardunio deelys (AtMega 328p nano).
I could connect the wires directly to that - but I expect at the very least mounting in on vero board is a better option ?

Of course putting it on a circuit board is neater - but designing that kinda thing I'm familiar with at all. Its also fairly simply. 4 switches which drives 4 LED strips. (Can I pull the 5v I need to power the strips from the pins wiring harness ? )
 
Last edited:
yes. for sure you want to keep the two circuits isolated from each other. a pinball switch matrix should trigger the opto led no problem. you just need to get the polarity right😄. if you wire it up wrong it won’t work but probably won’t harm it. those opto boards take quite a range of input voltages and they switch on and off fast.
 
Making PCBs isn't as hard as you'd think! Kicad is free and a great tool. To start with I'd recommend building something which an Arduino Nano board can piggyback onto - that way you can keep it simple with just a few THT components.

Which generation of machine are you targeting? Newer generations don't have a switch matrix.

Pulling 5V from the machine is possible but I would not power LED strips as they are quite power-hungry and you risk overloading the power supply (and causing software reboots etc). Better to use a dedicated supply - you can get cheap bricks off ebay or whatever which will plug into 220VAC and output 5VDC on a 2.1mm barrel jack (e.g. what speakerlightkits do for their deluxe models).
 
just going through a similar thing at the moment as im adding an AFM LE topper replica to my original AFM. I went the pinduino route so similar to your ruote.

if you look here there plenty of info on how the pinduino board is put together in conjunction with an arduino nano. Im guessing you will need a similar set up/components to this board.

Not to hijack but since its relevant, can someone confirm what signal passes from the lamp/solenoid connector (ie J126/J111) on wpc/wpc95 powerdriver board. Is it just a simple voltage as would be nice to be able to fire a pin on the arduino "on the bench" to simulate the signal whilst programming it.. is it just a certain voltage that sets a lo/high state on the arduino pin? if so what is the voltage? thanks
 
Last edited:
yes. for sure you want to keep the two circuits isolated from each other. a pinball switch matrix should trigger the opto led no problem. you just need to get the polarity right😄. if you wire it up wrong it won’t work but probably won’t harm it. those opto boards take quite a range of input voltages and they switch on and off fast.
Grand, thanks. Ordered and on the way !

Making PCBs isn't as hard as you'd think! Kicad is free and a great tool. To start with I'd recommend building something which an Arduino Nano board can piggyback onto - that way you can keep it simple with just a few THT components.
Yeah right after posting last night I had a little look around. Found something called Fritzing which seems easy to use. Will try the one you mentioned too though. The only component is actually the nano board which makes it pretty simple \o/.

Which generation of machine are you targeting? Newer generations don't have a switch matrix.
Williams system 7.
Pulling 5V from the machine is possible but I would not power LED strips as they are quite power-hungry and you risk overloading the power supply (and causing software reboots etc). Better to use a dedicated supply - you can get cheap bricks off ebay or whatever which will plug into 220VAC and output 5VDC on a 2.1mm barrel jack (e.g. what speakerlightkits do for their deluxe models).
Oh - didn't think they would be that greedy. (Reckon there will be a total of no more than 30 LEDs). Will bear that in mind then - I have a box fill of various power adapters - I can probably repurpose one of those !

@stumblor has a thing called lollipops that controls 4 outputs from 4 inputs. That might be just the thing?
Yeah saw that. I was going to get one of those and use that, but thought about it and decided I would give it a crack myself. Partly because I wanted something simple to try doing something with the ardunio kit I bought, but also because I want it to work slightly differently anyway.

I guess I could build the opto isolation deely into the whole thing - but given the price of the board and in the name of simplicity, will still with using the separate board. (I could always 3d print a wee case to put the boards in :) )

Thanks for the input folks.. Im sure I'll be back - pics eventually but probably more questions first.
 
is it just a certain voltage that sets a lo/high state on the arduino pin? if so what is the voltage? thanks
yes depends on your arduino but std logic ttl/cmos chip type stuff. Simplistically: 0v for low and +5v high. Also some “arduinos” now run at 3.3v so check your spec. most cmos/ttl ics will go high at 3v anyway so usually all interchangeable. again i’d use opto isolator to separate your circuit from the pinballs circuits.

for more info on logic levels and voltages:
 
Yeah right after posting last night I had a little look around. Found something called Fritzing which seems easy to use. Will try the one you mentioned too though. The only component is actually the nano board which makes it pretty simple \o/.
I looked at fritzing ages ago - thought it was pretty useless, you can do it all yourself.

A small arduino and 30 leds probably ok from the 5v source in the pinball, but always worth calculating the max current your drawing. Another option is to take a feed off the 12v and drop down 5v with a voltage regulator board.
 
Brill thanks Alan, lets see what i can blow up :)

I went the 12v step down route for pinduino and also for other leds i added. My understand was the 5v can already be twitchy enough without loading it with more.

Look forward to seeing your progress Homer,

Ive used JLCPCB a few times in the past for custom PCBS. Super cheap, good quality and been pretty fast. within a couple of weeks (not sure with all the covid thing now though)
 
Last edited:
Cool. Thanks.

have grabbed kicad - will give it a look later too. I dont know that fritzing is any good - but it seemed to do what it says on the tin. Any other recommendations wrt to creating a pcb ?
 
Ive only used community pre-made gerber files with JLCPCB in past so need to get up to speed with designing my own also.
 
To create a PCB, I use Eagle (now part of autodesk Fusion 360) - free version has pcb board size liming 80cm sq. eg 10 X 8. I got a free year with access to full version, but thats now expired. its expensive £500 ish a yer so not worth it

I have started using EasyEDA instead - the reasons I chose this are they are part of JLCPCB, who I use to make the PCBs - Im right at the start of the learning with this, so still using Eagle whenever I can.
 
I used this tutorial to start with kicad, then just googled bits and pieces along the way.

Kicad is free and backed by CERN. For hobby use imho it's the best available package. The guys at work use Cadence Allegro, and I know many professionals who swear by Altium. But both of those are stupidly priced...

 
To create a PCB, I use Eagle (now part of autodesk Fusion 360) - free version has pcb board size liming 80cm sq. eg 10 X 8. I got a free year with access to full version, but thats now expired. its expensive £500 ish a yer so not worth it

I have started using EasyEDA instead - the reasons I chose this are they are part of JLCPCB, who I use to make the PCBs - Im right at the start of the learning with this, so still using Eagle whenever I can.
I really need to do something with Fusion - been going to use to for 3d print models. But I sorta got my head around Tinkercad and never got around to it. More recently I started dabbled with the one built into windows - which is actually pretty good.
 
Personal Use Fusion360 is very functional - perfect for model design.

For PCB design - I think EasyEDA is the place for these kinds of projects.
I've used both Eagle and EasyEDA - and EasyEDA integration to catalogues with part outlines and pads defined for you in my experience has been a lot more intuitive - plus its all web based.
 
Cool - That mod would be nice for Fish Tales too. Did you produce many?
I did a small board with ATTiny84, opto inputs etc. then ported some Arduino libraries to Atmel Studio and wrote code in C++. I had a number of LED effects stored in EEPROM and set up some mods for Scared Stiff, MM and Getaway - here's a link to video https://1drv.ms/v/s!ArzFfLr_MuyCsspM5Dee7rJ-x1ox7A?e=FKB0R3 (no sound though). Helicopter 'searchlights' adjusted to shine in players eyes to put them off :o)

David
 
Went for it at the w/e. Knocked up a layout and ordered.

On a slightly related note, can you get addressable LEDs that are bulbs.
I know you can get strips (got some of those). And I saw that you can get little circuits boards with a surface mount addressable LED. but if you had a bunch of these installed somewhere and needed to change one be a pain.
 
Yes. i have. em. 5mm. and about to receive some bigger 8mm
View attachment 157214

Just be aware that these are not addressable LEDs like the ws2812 strips. They need 3 pins to control (one for each colour channel)

Alternatively, they can be converted to addressable using a ws2811 chip, which come in these handy PCBs:

1641813924775.png

 
They are these right?


And wired like this?

 
They are these right?


And wired like this?

NO! They are not those at all they are WS2812
 
yeah - was I was looking for is something I could address as you do the ones on a strip - but in the form of something that you could (say) mount under a playfield and be easy to replace if they broke.
Obviously they would all need to be on the same "daisy chain" - I guess you could have multiples to if you needed too. EG one for lamps one for GI kinda thing
 
yeah - was I was looking for is something I could address as you do the ones on a strip - but in the form of something that you could (say) mount under a playfield and be easy to replace if they broke.
Obviously they would all need to be on the same "daisy chain" - I guess you could have multiples to if you needed too. EG one for lamps one for GI kinda thing
This is what JJP did and when a part of the link failed all the lighting screwed up.

David
 
Back
Top Bottom