Jump to content




Photo
- - - - -

Coin Door Volume Control


  • Please log in to reply
11 replies to this topic

#1 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 16 August 2019 - 03:33 AM

Building my Mikrocontroller controller as a test vehicle for a full size cabinet has taught me a number of lessons. I got used to using headphones or having to turn down the volume – not all of my family is on-board with a loud Pinball machine.

 

I started looking for solutions. The Suzo-Happ coin door I bought has a metal plate that can be replaced with a standard bill acceptor. That looked like a good mounting point and I copied Stern's implementation.

 

sternheadphone0.jpg

 

A simple break/make headphone socket wired between the computer and amplifier would be sufficient for the headphones. But now I needed a way to get a remote volume control. For a while I thought I was going to have to either use shifted buttons like I have on the Mikrocontroller or install two volume up/down buttons under the cab.

 

Three days ago I found the solution staring me in the face – use a rotary encoder. I had several laying around from other electronics projects.

 

encoder0.jpg

 

For the uninitiated a rotary encoder is a continuous rotation device with a knob. You can find them all kinds of places such as volume controls for your car’s stereo. The encoder has two outputs (typically called A and B). A third connector is connected to ground. As you rotate the encoder the outputs switch between logic 0 and logic 1 levels using a method called gray code. This is where only one output changes at a time. Assuming the outputs A and B correspond to two binary digits then the sequenced output is 0 (00), 1 (01), 3 (11), 2 (10), 0, 1, 3, 2, and so on. Rotating the encoder in the opposite direction gives the sequenced output of 0, 2, 3, 1, 0, 2, and so on.

 

A method is needed to recognize the direction of rotation and convert it into pulses on “up volume” input or “down volume” inputs to simulate a user pressing up or down volume buttons. There are several ways to do this but I choose a small microcontroller that only has 6 I/O pins called the MicroChip ATTiny45. It is actually overkill for the job but I had one handy in my parts bin. Two input pins are used to monitor the A and B inputs from the encoder and two output pins simulate the up volume/down volume button presses for a keyboard controller such as Pinscape or I-PAC 2.

 

The rotary encoder also includes a push-button. I used this built-in push-button as an input to provide a mute volume button. There are 5 connections:

  • 5V
  • “Mute Volume” button
  • “Up Volume” button
  • “Down Volume” button
  • Ground

Here is a picture of the completed controller. My total cost was zero as I used parts I already had on-hand. The circuit is prototyped on some "stripboard" with the encoder mounted on the solder side of the board. The 5 header pins for the keyboard controller are on the left.

 

volume_control.png

 

Here is a picture of the completed coin door from the front with the headphone socket and volume control. Note that right now I just used some 1/8” MDF for the front panel instead of the actual metal plate. Later I will either drill the metal plate or paint the MDF black so it blends in better.

 

coindoor_volumecontrol.png

 

The back of the coin door is shown in the picture below with the 5 header pins ready to be connected to a keyboard controller.

 

coindoor_volumecontrol_back.png

 

Although I am still using Mikrocontroller, I now have a cracked one more problem for a full size cabinet (and can eliminate additional button holes in the cabinet design).

 

Edit: Clarified that this will work with any keyboard controller (not just Pinscape)


Edited by MikePinball, 16 August 2019 - 03:31 PM.

MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.

 


#2 BoltBait

BoltBait

    Software Developer

  • Members
  • PipPipPip
  • 354 posts
  • Location:Sacramento, CA

  • Flag: United States of America

  • Favorite Pinball: Elvira, Whitewater, Big Bang Bar, Fun House and All the old EM tables of the 70s that I played as a kid (including Buccaneer, Spirit of 76, and King Kool)

Posted 16 August 2019 - 04:04 AM

I don't think I could play pinball with headphones on...

 

I would look funny standing there in silence cussing like a sailor every time the ball drains.  :shutup1:


How I built my B2S Pinball Cabinet, step-by-step, with pictures!  Full-sized cabinet for ~$700. Believe me, if I can do it, so can you!

"Making anything with your hands goes wonderfully with whatever in your life you would consider your grind." ~Nick Offerman


#3 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 16 August 2019 - 04:18 AM

The main point of this thread is to talk about the coin door volume control. It saves a lot of trouble as you don't have to open the coin door and find the amplifier control or use extra buttons elsewhere on your cab. The added mute ability can help too.

 

If people are interested in this idea then I could look at building some proper circuit boards that would be ready to be mounted on your coin door with a knob. The circuit board would be much smaller than my prototype - say 1" square. I would have collect all the parts and price this properly (perhaps $10-$15 depending on quantities).


MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.

 


#4 gtxjoe

gtxjoe

    Pinball Wizard

  • VIP
  • 4,888 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 16 August 2019 - 11:52 AM

Cool. Does this require pinscape? IWhat keyboard buttons do the controls map to?

#5 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,672 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 16 August 2019 - 01:28 PM

Really nice. GtxJoe just asked what I'd like to know too :)


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#6 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 16 August 2019 - 03:21 PM

I have modified the original append to make it clear that this does not depend on Pinscape and can use any keyboard controller such as I-PAC 2 which can simulate keystrokes. 

 

Keyboards have actual keys such as the letter "z" and the so-called virtual keys such as the tab, shift, and control keys. Most laptops today and some other keyboards have buttons for volume up, volume  down, and mute. The virtual keys for these buttons are as follows:

 

VK_VOLUME_MUTE  0xAD  Volume Mute key

VK_VOLUME_DOWN  0xAE  Volume Down key

VK_VOLUME_UP    0xAF  Volume Up key

 

As the user rotates the encoder, there will be a negative (ground) pulse generated on the pin corresponding to "volume up" or "volume down" depending on the direction of rotation. Each pulse is 50 milliseconds long which is enough for a keyboard controller to detect the button "press". Pressing the encoder button will connect the "volume mute" pin to ground (just like any other button on your cab).

 

Rotary encoders have detents (16 per revolution) and one pulse is sent for each detent. This gives the user positive feedback that something is happening. To go from zero volume to maximum volume on my system takes roughly 2 complete revolutions of the encoder. Nevertheless rotating a knob I would say is much easier than repeatedly hitting a button, especially if it is under your cabinet.


Edited by MikePinball, 16 August 2019 - 03:33 PM.

MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.

 


#7 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 17 August 2019 - 04:22 AM

I went ahead and drew out what a production PCB would look like with dimensions 0.7" x 0.8". Here is a 3D rendering of bottom (component side). The encoder is on the other side.

 

encodervolumecontrol_production.png

 

I also starting to price things out. I don't have a final cost yet but surprise surprise the most expensive part is the control knob. I could go for the cheap plastic ones but I think a black aluminum knurled knob would look better. What do you think?

 

1pcs-32-13mm-Audio-Multimedia-Speakers-A

 

Who is in for a coin door volume control board? I could order parts and have them ready in a month or so (China shipping is not quick).,


Edited by MikePinball, 17 August 2019 - 04:29 AM.

MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.

 


#8 gtxjoe

gtxjoe

    Pinball Wizard

  • VIP
  • 4,888 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 17 August 2019 - 07:15 AM

I would buy one. As for knob, as long as it is black that will work

Looks like 5 volts supply is needed which is fine and for me I would just be drilling a hole in the coin door for the shaft

#9 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,672 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 17 August 2019 - 09:21 AM

Yeah. Again. Agree with gtxjoe. And shipping from China is often faster than shipping from US ;)


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#10 ludovids

ludovids

    Enthusiast

  • Validating
  • PipPipPip
  • 181 posts
  • Location:Owego, NY

  • Flag: United States of America

  • Favorite Pinball: LOTR IJ MM TAF Tommy TOTAN TZ

Posted 17 August 2019 - 02:51 PM

When in doubt, go with higher quality. You only have to pay for it once, but you will appreciate it for years to come. Black aluminum knurled knob gets my vote.


ASRock Z270M Extreme4, i5-7600K, 16GB G.SKILL TridentZ DDR4 3200, EVGA GeForce GTX 1070 SC

Samsung 850 EVO M.2, Samsung UN40JU7100 4K playfield, Samsung SynchMaster 2232 backglass, Pinscape on VirtuaPin Plunger Kit v3


#11 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 17 August 2019 - 05:08 PM

Yep definitely black and ideally I would like to get one without a position indicator on it but they are hard to find. A continuous rotation encoder indicator doesn't tell you anything about the volume (unlike a potentiometer), instead use your ears.

 

The input voltage is 5V. I have setup a voltage divider to provide maximum output voltage of 3.3V @ 1mA to the KL25Z. I could definitely have a 5V version if that's what your keyboard controller needs - it just a matter to changing the resistors (well skipping two and use 0R for the other two).


MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.

 


#12 MikePinball

MikePinball

    Oak Micros Pinball Products

  • Platinum Supporter
  • 414 posts

  • Flag: United States of America

  • Favorite Pinball: Space Invaders

Posted 19 August 2019 - 03:28 PM

I have put in an order for the PCB and parts. See below for a final rendering of the PCB (which now includes an indicator LED):
 
encoder.png


Edited by MikePinball, 11 September 2019 - 09:44 PM.

MikePinball (dba Oak Micros). I have sold a number of electronic boards for virtual pinball cabs such as Pinscape All-in-One, Pinscape Lite, Plunger Kit, Rotary Encoder, Fuse board, Resistor board, Pinball Addressable LEDs (PAL) board, and RGB Flipper/Magnasave board with clear buttons. I am currently taking a break but will continue to support existing customers. See my home page for more details.