Introduction: Jukebox Wireless Volume Control
The Problem
The volume control knob on many jukeboxes is located in the most inconvenient place possible. It is done purposely to discourage drunken bar patrons from blasting their music resulting in annoyance of their fellow barflys. The standard location for the volume control knob is in the middle of the back of of the jukebox against the wall. To change the volume of a jukebox an intoxicated listener must pull the jukebox away from the wall, grope around for the knob, twist it, then move the jukebox back to its original position, without anybody noticing this activity. Most jukeboxes have an optional remote control on a long wire for the bartender to control the volume. Some models have a rheostat that mounted in a little box with a momentary switch. The remote rheostat controls the volume. Twisting the volume control knob raises or softens the music volume. The momentary switch controls the "Cancel/Reject button". Pressing this button will eject the current record playing. If the record is scratched of extremely distasteful it can be ejected by pressing this button. The Seeburg SMC 1 Disco does not have such a simple remote control. The remote control uses a motor that attaches to back of volume control rheostat. It is supposed to behave like a hand turning the control knob. They are expensive and look unreliable. The parts are 35 years old. It is difficult enough to keep the jukebox running, without this additional complexity. I thought about the problem for a while, then decided I can twist a knob with an arduino.
Attachments
Step 1: The Solution: RF Control
The arduino processor is a good choice to control small motors and interface with humans. The motor is controlled by a shield which uses 74HC Bridge. The stepper motor is a bipolar four wire 200 step 12V stepper. Raido Frequency (RF) was chosen over Infra Red (IR) because it requires no modifications to the cabinet. IR would require putting a receiver somewhere where it can see a light signal. The RF module can be tucked away in the back or side of the jukebox cabinet. The volume can still be controlled manually, but it requires opening the cabinet and twisting the control knob. Although this modification was done to a Seeburg SMC 1 Disco,it can be adapted to many other brands and models. Modifications to an old juke can be reversed without any significant changes to the jukebox. Hopefully this guide may help keep a few jukes alive in their semi original state a little longer.
Tools
- Breadboard and Hookup Wires
- Computer with USB
- Dremel Rotary Tool
- Drill + bits Glue
- Gun w/Glue sticks
- Hemostats
- Multimeter
- Magnifier, Head Mounted
- Screwdriver, Multidriver
- Soldering Iron (good) w/solder
- T square
- Vice
- Vice Grips
- Wire Cutters
- Wood Saw
Materials
- Arduino Uno R3 (Adafruit #50 $24.95)
- Aluminum Bar 1" x 4" x 1/8" (HD $8.00)
- Motor/Stepper Driver (Adafruit #1438 $19.95)
- Key fob 4-Button RF Remote (Adafruit #1095 $6.95)
- RF Momentary Reviever (Adafruit #1096 $4.95)
- Relay Breakout Board (Ebay $3.00)
- Stepper Motor NMEA 17 size - 200 steps/rev, 12V 350mA (Adafruit #324 $14.00)
- Motor Shaft Coupler (Adafruit #1177 $4.95)
- Power Supply AC/DC 9V 1 MA (Adafruit #63 $6.95)
- Rainbow wire 6"
- Light Duty Extension Cord
- Screws 3mm x 10mm (4) Fits motor (HD $1.50)
- Screws Wood Washers #8
- Epoxy Glue, Small mini tube (Dollar Stores $1.00)
- Angle Shelf Bracket 2" x 2" (HD $3.99)
- Scrap Plywood (Garage $0)
- Paint, Flat Black (HD $3.99)
- Film Canister (Antique Bin $0.00)
- High Intensity LED (Fry's $5.00)
- Jukebox (Craigs $100.00 - $6,000.00)
Software
- jbvolcontrol - Programs used in this example.
- Motor Shield Library - Control Stepper Motor
- Acceleration Library - Provide Smooth Movement Of Stepper.
Skills
- Arduino Programming
- Soldering and Board Assembly
- Schematic Reading
- Light Metalworking
- Light Woodworking
Step 2: Build and Test the Motor Shield
Find the best place in your jukebox cabinet to mount the project.In the case of the SMC1, it is on the left side of the cabinet below the amplifier. Gather materials for the project. Many of the items can be bought from Adafruit. Some must be fabricated yourself. Others may be scrounged from the box of broken toys and forgotten projects. Assemble the motor shield and test it. Adafruit has a step by step guide for assembly. Examine all solder joints with a magnifier. touch up any suspicious solder joints. The prototype is necessary to build since some component substitutions may be necessary. This is a learning exercise as well as getting a remote control. The motor shield is capable of controlling 2 Servos, 4 DC motors, 2 Stepper Motors. We only need to control one stepper motor. Knowledge of pin assignments is useful for avoiding conflicts when connecting other devices in the project. The motor shield uses the following arduino pins.
Motor Shield Pin Assignments:
- Digital 11 Stepper #1
- Digital 3 Stepper #1
- Digital 5 Stepper #2
- Digital 6 Stepper #2
- Digital 4,7,8,12 Digital latch
- Digital 9 Servo #1
- Digital 10 Servo #2
- All Analog Pins Open
- Digital 2,14-19 Open
Wire the stepper to the shield:
- M1 ------ Red
- M1 ------ Yellow
- GND ---- NC
- M2 ------ Green
- M2 ------ Grey/Brown
Connect the arduino to the stepper motor shield. Download and install the stepper motor libraries from adafruit. I decided not to use the AccelStepper library. This is a simple application and does not require smooth motion control. We are only single stepping the motor. A very basic example of rotating clockwise then counter clockwise is shown. No movement dampening is necessary. Download the arduino sketch programs from Github-jbvolcontrol. Create a new blank sketch. Load the code in the following example.
//
// Example of basic stepper motor operation using the adafruit library
#include
int i=1; int dir = FORWARD;
// Connect a stepper motor with 200 steps per revolution
// to motor port #1 (M1 )
AF_Stepper motor(200, 1);
void setup() {
Serial.begin(9600);
// set up Serial library at 9600 bps
Serial.println("Stepper test!");
motor.setSpeed(30); // 10 rpm
}
void loop() {
if ( i < 200) {
motor.step(1, dir, INTERLEAVE); i=i+1; delay( 100 );
} else { i=1;
dir=-dir; }
}
Experiment with different speed step sizes to get slow and smooth operation of the stepper motor. Beware the performance of the motor changes with differences in the power supply. After each test disconnect the arduino form the computer. Use the AC adapter power to see the difference in speed and torque. In my jukebox there is a fair amount of resistance when turning the volume control knob. The stepper motor controller can be operated in four different modes for a variety of performance profiles.
- Single - A single coil in the stepper is energized.
- Double - Two coils are energized
- Interleave - The energy to the coils overlaps, This gives more smoothness in the steps.
- Microstep - Coils next to each other are ramped up and down resulting in micro steps. Torque is lowered i this mode.
When changing modes, the degree increment of rotation in the the motor changes. There are physics involved in rotating the stepper motor. Depending on the mode, a step in a 200 step motor may not rotate the shaft 1/200 of a rotation. Single stepping the motor in "Single" mode does give 1/200 rotation. An "Interleave" step is more like 1/400 of a rotation. Microstepping even less. It will take some experimentation to get desired performance. It also takes patience. I have not found a formula which accounts for speed, mode and step size step size. It seems like it should be a continuous function, but deterministic behavior eludes me. Load the Accelstepper library and play with dampened motion. Download the Accelerator library. Take some time and explore the operation of the stepper motor.
Step 3: Connect and Test the RF Module
This project uses an RF receiver module based on the PT 2262 chip. This chip is a CMOS remote control decoder. Use the breadboard to test your ability to operate components before soldering it all together. Attached is a schematic for the circuits necessary for this project. The RF module uses seven wires to operate. Power and ground are two wires. Five wires are used to give signals to the computer. One of four wires (D0-D3) go true when a button on the RF key fob is pressed. VT goes true when any button is pressed. The arduino reads the RF module by monitoring the state of the analog pins A0-A4.
A relay is an electrically operated switch. It allows the arduino to control switches of other devices. The relay breakout board uses three wires. Power and ground are two wires. One analog output (A5) is used to engage the relay.
Connect the RF module as shown.
Arduino ........ RF Reciever
- A0 ------ D0
- A1 ------ D1
- A2 ------ D2
- A3 ------ D3
- A4 ------ VT
- +5V --- +5V
- GND --- GND
Arduino........... Relay Breakout Board
- A5 ------- Select
- GND ---- GND
- +5V ----- +5V
Create a sketch with the code in this example.
/*
RFKeyfob Provides an example of how to read the XL-R02 RF module with signals from the four button key remote. Reads a digital input on pins 2-6, prints the result to the serial monitor. It is based on the PT 2272 chip. The application uses the analog pins since some shields use the digital pins. There is a relay controlled by pin A5. It is turned on by pressing button A on the remote.
Author: Bobby Kawamura 6/21/2014
Wire the RF module to the arduino as follows:
GND - GND 5V - 5V D0 - A0 D1 - A1 D2 - A2 D4 - A3 VT - A4 Relay - A5
This example code is in the public domain.
*/
//Analog pins 0-4 has a output from the XL-R02A attached to them.
// the setup routine runs once when you press reset:
// Pin 5 is used to control a relay module. It is defined as an output. void setup() {
// initialize serial communication at 9600 bits per second: Serial.begin(9600);
// make the pushbutton's pin an input: pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT)
; pinMode(A4, INPUT);
pinMode(A5, OUTPUT);
// Make the inputs a pullup resistor
digitalWrite(A0,HIGH);
digitalWrite(A1,HIGH);
digitalWrite(A2,HIGH);
digitalWrite(A3,HIGH); digitalWrite(A4,HIGH);
digitalWrite(A5,LOW);
//pinMode(A5,OUTPUT);
// Wait for 1 second delay(1000); }
// the loop routine runs over and over again forever: void loop() {
// read the input pin:
int buttonD = digitalRead(A0);
int buttonC = digitalRead(A1);
int buttonB = digitalRead(A2);
int buttonA = digitalRead(A3);
int PinStateVT = digitalRead(A4);
// print out the state of the buttons:
Serial.print("A=");
Serial.print(buttonA); Serial.print("\tB=");
Serial.print(buttonB); Serial.print("\tC=");
Serial.print(buttonC); Serial.print("\tD=");
Serial.print(buttonD); Serial.print("\tVT=");
Serial.print(PinStateVT);
Serial.println();
if ( buttonA == 1 ) { digitalWrite(A5,HIGH);
} else{ digitalWrite(A5,LOW); }
delay(1000); // delay in between reads for stability
}
Load the program in the arduino from the computer through the USB cable. Start the serial monitor with a "Ctrl-Shift-m". Watch the output while pressing the buttons on the key chain remote. Use the multimeter to test the relay. Attach the ground lead to the multimeter common terminal. Attach the test lead the the NO (Normally Open) Terminal. Turn the multimeter to "Continuity check". When the relay is energized the the contacts will close and the meter will chirp.
Step 4: Solder the Components and Program the Arduino
Read and understand the schematic. The motor shield has analog pins that pass through the shield board to the arduino. Wires connecting the RF module are actually soldered to the shield. The schematic shows the logical connections to the processor board.
Solder and assemble the electronics. Be careful to make all solder joints solid. Use a magnifier to inspect each joint. In this example rainbow wire is used. Rainbow wire is like modem ribbon cable, for those old enough to remember modems, all strands are a different color. Program the arduino with the jbcontrol software. I is very similar to the example code examples. The code can be downloaded from Github. Test the assembly by turning the motor.
One of it features of the program is a software clutch. A possible problem is that when the volume control knob is at its limits, the stepper will try to force it further resulting in damage to the rheostat. A solution is making a software clutch. The clutch will release tension on the rheostat from the stepper motor. When the stepper is turning, at intervals the motor is set to release. This means it will stop trying to turn the rheostat past its limits.
Load the arduino with the volume control program and proceed to the next step.
Step 5: Fabricate a Motor Mount, Volume Control Mount and Coupler
Method
Basically the method to control volume is to connect the stepper motor to the volume control knob. The idea is to mount them facing each other with mounting brackets. The motor shaft is coupled to the the knob with a modified knob.
Motor Mount
Use two 2" L shaped shelf brackets for the motor mounts. Put the L brackets side by side on a table. Set the stepper motor on the brackets. Mark the location of the motor mount holes. Drill the holes to the same size as the motor mount screws. Attach the motor to the brackets.
Volume Control Mount
This is a fancy L bracket to mount the rheostat to the project. Aluminum was used for aesthetics and ease to work with. Take a 1" x 4 x 1/8"" piece of aluminum stock and scribe across the center line. Clamp the stock to a table to stabilize it while grinding. Use a Dremel to cut a groove halfway through the stock. Angle it like a V so that when it is bent it does not crack in the back side. Put the stock in the vice and bend it to 90 degrees. Check the bend with a T square. Line up the motor shaft assembly with the rheostat mount. Mark the aluminum bracket at the center line of the shaft. Drill a hole the size of the rheostat shaft and add a little wiggle room. Drill a couple of small holes to screw the bracket to the base plate. Grind off any metal burrs around the holes. The bracket is ready to mount on the base plate.
Coupler
Slip the aluminum motor shaft coupler on the shaft of the stepper motor. Make sure the flat side of the shaft aligns with one of the set screws. Tighten it down with a hex key. Get a knob that fits the jukebox volume control rheostat. Size a machine screw that fits the internal diameter of the motor coupler. Cut the machine screw at 0.75" long. Grind off any excess burs. Size a drill bit to match the outer diameter of the machine screw. Drill a hole in the center of the plastic volume control knob. Push the screw through the hole in the knob. Use epoxy to glue the screw to the coupler. Tighten the set screw in the aluminum coupler. Now the volume control rheostat and be turned by a stepper motor.
Step 6: Make a Mounting Plate for the Assembly
Cut a piece of plywood large enough to bolt the motor bracket and the rheostat on. I found a 11"x 4" piece of basswood handy. Sand the edges and drill mounting holes in the corners. Find some screws that go through the mounting plate and into the cabinet, but not all the way through the cabinet. Paint the plywood mounting plate black. Line up the components to fit on the mounting plate. Take the motor shield off the arduino. Screw the arduino to the mounting plate using small screws. Put the motor shield back on the arduino. Attach the motor bracket to the mounting plate with wood screws. Glue the RF module to the mounting plate. Glue the relay breakout to the mounting plate. Attach the rheostat to the mounting plate with wood screws.
Step 7: Add the LED Volume Control Indicator
When the volume control is turned up or down an LED indicator is used to show sound level is being changed. A high output LED is mounted in a plastic film can. It lights up when the stepper motor is changing direction. This is one one of the simplest examples of arduino code. A 220 ohm resistor is used to limit excess current. The LED is glued to base of the film can. A notch is cut in the can to allow the wires to connect to the motor controller project space. The film can is then glued to the mounting plate.The anode wire of the diode is soldered to the motor shield in on the D2 pin. The resistor and cathode side are soldered to the ground pin.
Step 8: Install the Volume Control Asembly in Jukebox
Disassemble the volume control assembly in the jukebox. Route the volume control wires to the new location on the side of the cabinet. Mount the volume control rheostat to the aluminum mounting bracket. Be careful to check the alignment of the motor shaft and the rheostat shaft. Good alignment is necessary for smooth operation.Tighten the rheostat nut with a small wrench.
Remove the two wires from the jukebox cancel switch. Cut the terminals off. Strip 1/8" insulation from the ends. Twist the strands tightly. Insert them into the headers of the relay. Use the normally open (NO) terminals. Screw them down just tight enough so they do not fall out with a gentle pull.
Screw the assembly to the side wall of the jukebox.
The jukebox has an internal power outlet that is powered only when master switch is on. Use the extension cord to connect the AC/DC power supply to to the switched outlet. One plug goes to arduino PS the other goes to the jukebox amplifier. Zip tie it all together. The arduino will only be powered up when the jukebox master switch is on. Use a label maker to identify buttons on the remote. Cut the labels to fit the keypad on the remote.
Step 9: Listen to the Music
Power up the jukebox. Turn the volume down with the keyfob. Select some music. Turn the volume back up. Turn it up some more. Listen to the music. Test the reject button. Think about how cool it is to have bunch of 70's TTL logic controlled with your finger tips. Watch the 60's mechanical gizmos pop out a record. Code changes can be made to zero in on the optimum volume rate of change for maximum listening pleasure. This project has elements that can be applied to many other applications. Control a motor from a remote and flip some switches. The fourth remote button could be used to control a switched source relay. A relay could added to add an Ipod input to the jukebox. Let the party begin!