Side Lit BezelOn this project I wanted to experiment with and use lighting in many different ways and places. This post describes the effect of a small light border placed around the monitor.

My inspiration came from 3 sources. 1) rackoon in a post asking for details to help him put a glow around his coin door.2) Pixelhugger in his non-lit but colored Plexiglas bezel on his Mission Control project.3) Myself, looking for new ways to exploit my newfound media of side-lit Plexiglas.

The bezel is made up of two pieces of ¾” plywood, with a side lit piece of 3/16” Plexiglas sandwiched between. The wood is routed with a decorative router profile to give it a recessed picture frame look. Approximately ¼” of sanded and roughed up Plexiglas is exposed between the two pieces of wood.

Rather than bloating this page with large images, they are commented here sequentially, with thumbnails below. Well, maybe just one… the finished product.

LEDs_ResistorsThis project needed a lot of LED’s soldered to resistors. They were all soldered at once to reduce time, like a little production run. The resistor and LED leads were cut to about ¾” in length. Both were tinned with solder. The two leads were held together with a clip and then heated up until the solder flowed.

Bezel_pre_wireSlip fit holes for 3mm LEDs were drilled at around 30 degrees. The angle helps increases the effective distance from LED to front edge, spreading the light more, therefore reducing hotspots. The LEDs were spaced approximately 3” apart. The LEDs are held in place with a small dab of hotglue in each hole. On a few holes, I used too much. It oozed past the edge and had to be trimmed with a razor blade to keep it from interfering with the sandwiched pieces of wood. Before working with the LED’s, the entire front and back sides of the Plexiglas were roughed up to increase lit diffusion, reducing the amount of hotspot effect.

Wire_testI really like this picture. You can clearly see the angle that the light leaves the LED’s. Notice the unlit section on the bottom. Cool effect. This picture was taken with a flash.

WiredThe LED’s, resistors, and wire were held close to the edge of the Plexiglas with small pieces of electrical tape. Two separate wire runs were made; one covering the top & left edges, and the other covering the bottom & right. I plan to control each LED individually with a custom circuit. I want a “pulse” of hotspot slowly move around the bezel. If I only wanted them on/off or pulsing together, only a positive and a ground wire would have been needed. Instead, I used some 20-conductor ribbon cable.

Light_worksRadioactive Bezel. Don’t stand too close if you plan on having more children.

Light_sandwichThe Plexiglas is sandwiched between two pieces of ¾” plywood. All wires, LED’s and resistors had to fit in the same thickness of the Plexiglas (3/16”). Special care was taken placing the screw holes. Holes in Plexiglas significantly blocks light, causing deadspots and shadows. The holes were placed between the LED’s and as close to the outer edge as possible.

AssemblyThe Plexiglas was centered on the front piece of bezel plywood and held in place with a bunch of wood screws. I could have gotten away with far fewer screws (2 in fact), because the real hold takes place when the two pieces of wood are screwed together.

Bezel_blackIn a dark room, it gives off a bizarre green glow that bounces off the floor, ceiling, and walls. This picture does not do it justice. Because of the width of the lower piece of wood, the glow does not glare off the monitor when facing it. The small square towards the bottom is a pocket to hold the side lit logo and artwork piece of Plexiglas.

Bezel_black_cornerA close up shot of the effect in a dark surrounding.

Bezel_cornerA close up shot of the effect in daylight. This is a good representative shot of how bright it is in person. You can also see the recessed picture frame look you get by using two pieces of decoratively routed wood.

Hotspots_and_glareUnless there are LOTS of LED’s spaced very closely together on a wide strip of Plexiglas, there will be hotspots. This picture shows how prevalent they as you look directly at the edge. Also, the light is reflected off the monitor at this angle. The hotspots and glare pretty much disappear at about a 45 degree angle. This will not show to anyone playing a game, or someone besides them watching, as shown in the next picture.

InstalledThe money shot. This picture was taken outside in daylight with a light layer of clouds (notice the reflection in the marquee.) It accurately represents how it looks in person. It’s not too bright, but you can definitely tell it is actively lit, not just paint. The bezel will sit behind a smoked piece of tempered glass, hiding most of the small paint and surface imperfections.

Up Next…Same effect for the speakers. This task is complete, just need to write it up.Side Lit CNC’d Plexiglas piece to go in small window below monitor.Custom Circuits to make the LED’s dance. A first draft of the PIC code is written and the components are ordered.Control panel LED’s, and components install.

A while back, racoon made a post, asking for assistance on using side lit Plexiglas to put a glow around his coin door. That inspired me to do this project, glowing speakers. I’m sure it has been done before, but here is my take at it.

This is what the finished product looks like in diffused sunlight. This picture was taken outside, in overcast daylight. It is very representative of what it actually looks like in person.

Progress pictures are commented below.

PlexiglasThe Plexiglas is 3/16” thick, made from a $14 remnant from my local glass shop. Both the bezel and speaker projects were made from this one piece. The outer profile was cut using a large hole boring bar tool. The inner cut was made with a scroll saw. The speaker is mounted to the Plexiglas, which in turn is bolted to the cab. Both surfaces and the outer edge were roughed up with sand paper to increase the glowing effect. The LED holes are slip fit for the 3mm diameter LED’s. The holes needed to be on the inside, pointing to the outer edge. It was tricky getting these holes drilled, because the drill could not get perpendicular with the edge. They are drilled as best I could without going thought the side face.

Leds_gluedThe LED’s are held in place with a small dab of hot glue, squirted into the hole. Eight LED’s were strategically placed to get even light coverage. The cover mounting holes were placed between the LED’s to minimize light blockage and shadows.

Wire_stripThis is an old trick my Father taught me. Rather than making individual pieces of wire to make a ground loop, just strip back a little section in the middle of the wire. This makes the soldering job MUCH easier, and is MUCH more reliable.

WiredA long time ago I picked up a spool of 20 conductor ribbon cable at a local electronics surplus supply place. The wiring was going to be busy enough with all that is going on, I’d hate to imagine having 7 additional wires to deal with. The ribbon cable will also aid later on when I go to connect each one individually to the LED controller. The wires are held in place with hot glue.

Pre_paintThe aliens have landed. The light is way too strong, illuminating the tape, wire, LED’s, resistors, and everything else under the speaker cover. Looks cool though.

TapedTo keep the light under control, I decided to paint the disk everywhere except at the exposed edges. Electrical tape worked well to mask off the un-painted area.

PaintedThis was a messy process. Paint doesn’t stick very well to Plexiglas. It also took a number of coats to cover up the light in all of the nooks and crannies. Flat black spray paint was used.

Post_paintThis picture was taken with no flash. In person, the lighting effect is a little brighter.

I'm honored, but there's lots of things I can't do. The important thing is there are very few things I won't TRY, at least once. What you don't see is the messed up Plexiglas disk, cut too small. Or the messed up disk with the LED hole drilled all the way through. Or the blown string of LED's when I hooked up a 12vdc power supply instead of 5vdc. Or the blown CRT, transformer, amplifier, hard drive, etc. Heck man, it took me 4 tries (and 4 $10 Xbox controllers) to get the reset button right on the Xcelerator project. I've got more curiosity than brains some times. A little knowledge, a whole lot of wreckless imagination, and a few bucks here and there can go a long way.

There are a few original profile shots on page one if you are interested. The only thing that's changed is the bezel. I'd prefer to hold off until I get the CP box mounted. Should be in a week or two. Stay tuned.

Electronics BreadboardYesterday I put together a breadboard test bed to start playing with the LED control electronics on this project. It is made from a small Radio Shack breadboard (PN 276-003, $8.00), and a 5vdc transformer. The chips I’m using require between 2.5 – 5 volts to operate. I picked up a small shaver transformer from Goodwill for $2.00. The end is cut off, and small wires soldered on. The wires are plugged into the + and – bars on the breadboard and taped in place. Small breadboard, ready to use, $10.00.

Front CP Light BarYesterday & today I finished painting and wiring the CP LED bar. Once everything was sanded smooth, the Plexiglas was masked off. I used pin stripping tape because the Plexiglas is relatively thin. The rounded corners were done by cutting half round pieces of masking tape. After about 6 coats of flat black spray paint, off came the tape. For the most part I’m pretty pleased. The lines are straight and evenly spaced. There is a little bit of a mess-up on the left side (leds_paint_closeup.jpg), but it is barely noticeable.

The wiring was simple but tedious. It took about 3 hours to prepare and wire up the 21 LEDs. The grounds are wired together, and the hot leads have a resistor soldered to each. Each LED is wired independently with a wide piece of ribbon cable. Each connection is wrapped in electrical tape, then hot glued in place. Controlling this light bar is really going to tax electronics skills.

Tonight I printed the inserts for the buttons. Thanks to pod for posting his Photoshop file containing the images. (http://forum.arcadecontrols.com/index.php?topic=71250.0) I have attached the file in case his site ever goes dead. I had to invert the images from white-on-black to black-on-white and change the text on a few. The chrome rings around these buttons should look nice when surrounded by colored light.

Per recommendations on the main forum, the power button will pulse red when the cab is off, and be steady green when on. This of course assumes I can get the PIC code/circuitry right. It was a bit of a pain getting two LED's to fit inside the button, but they're in there.

On a side note… Halloween is coming up. The mass produced cheap high-tech scary stuff (moving heads with blinking eyes, candy jars that play music when you walk by) is available in the stores now. Lots of cool potential for inexpensive, hackable bling. Motion detectors, motor control circuitry, blinking arrays of lights. Think of the possibilities.

What are you trying to do, exactly? Which PIC are you using? One with interrupts?

Actually, I'm trying to learn a new technology. I barely understood my basic electronics class in school, and for the most part have only worked with current flow, switches, and resistors since then. No gate logic or capacitors. My soldering skills are very rough, and I'm looking for mental stimulus. More to your question, I've got a number of things to light up. Rather than just turning them on, I want them to pulsate, blink, and/or dance around.Things that could be lit/controlled include:

1) Coin door lights. Maybe sequenced together, maybe separately. 2) Side lit engraved Plexiglas plate under the monitor. This is going to look really cool lit up, definitely slowly pulsating. 3) On/Off power button. It will be on steady green when an input is low, and pulse red when the input is high. The input is associated with the power state of the cab.4) The lit push buttons. I really haven't thought much about these. I'd probably just have them on. Having something dynamic driven by the OS may be cool, but I've got to make baby steps. No serial logic to eeprom yet.5) 8 LED side lit speaker Plexiglas dishes. I'd like to be able to make them slowly go around in a circle, using PWM logic to make it smooth.6) Front CP lit bar. There are 21 LEDs in there, and I'd like to be able to make them dance left & right. Or maybe go from the outside in/inside out.7) Monitor/bezel lit accent. Because this one will probably be annoying if it blinks, I'll probably just make it on, or maybe pulse very slowly.

It's probably too much bling for one cab to handle and I probably won't implement it all. The way I've designed the code, it should be able to be disabled and have its behavior change from a simple push button (more on that when I write it up).

For the simple one or two led stuff, I picked up a rack of 12f675 chips. They have a timer with interupt, run at 4 MHz, have 6 I/O, 1k program space, and 128 bytes of eeprom. Ooooh, sounds like I know what I'm talking about. (this is all new to me).

For the bigger stuff, I'm going with 16F684 chips. They have lots more stuff, but more importantly, they have 12 I/O and run much faster at 20 MHz. A coworker of mine knows this stuff and helped me pick out the chips.

IMHO, you should use larger PICs. Not for power for functions, but for I/O. Not that you can't do it with smaller PICs, but it seems that it would be harder. For example, with the front cp lit bar, there are 21 LEDs to run and that would require either additional logic or trying to coordinate actions between multiple processors. A single 28 or 40 pin PIC could handle each LED directly (almost, see * below). What I would do is run 4 (or 3 or 2) PICs -

If you didn't need/want individual LED control of the bezel, then it could be ran by #1, and then only three PICs would be needed. And if you are only controlling admin buttons without expecting a FE to control them, you could run them by #1, too. That would only require two PICs. If you want your action buttons to do LEDWiz type things, then you'd probably be better off with a LEDWiz for those (but you could make your own if determined...)

I suppose that reducing the number of PICs to a minimum is not really necessary - I have a weird desire to optimize as much as possible. But really it makes it easier to program as there is less to deal with in communicating between them. The only downfall I see is that you already have other parts.

A PIC at 4MHz should have no trouble driving those LEDs with full resolution independent fading on each while providing the necessary functions that you want. Maybe running the PIC faster would help out, though...

* You are going to need drivers for the LEDs if your resistor choice causes them to draw more than 5-15mA each depending on the total number attached to a PIC. The usual max current out of a I/O pin is 25mA, but there are also maximums for each port or port combinations and the entire device, so you can't have every I/O sourcing 25mA. Honestly, it would have been better to wire the positive sides of the LEDs together and control via the grounds, but I doubt that you want to rewire! (and it can be worked around).

Coin door lights - wire them seperate to the PIC, and then you can decide later (or change your mind easily) if they will be seq together or separately.

It may be cool if you could have the bezel rotate or pulse when in the FE, but quit when a game is selected. Not sure how to do that without FE coding changes...

What stage of development is your source code in? Are you interested in code suggestions? Care to post it or send it to me? Care for circuit suggestions/feedback?

Later,Rick

Logged

If I do not respond to your post in a timely manner, feel free to PM me.

LED Variable Blink CircuitThis writeup describes a simple circuit that blinks an LED in one of 8 different modes. I will use copies of it to light up the Plexiglas logo and the coin door lights. A slightly modified version will control the power on/off button.

I'm no expert at this stuff. This project was done primarily to keep my brain energized. It took lots of internet searching and a bit of encouragement from a few acquaintances that have experience working with this technology. There are a lot of folks on this forum that know this stuff a lot better than me. I'm just writing it up here to pass on what I learned and hopefully encourage at least one of you to try something similar.

Attached below are a schematic diagram of the circuit, a photo of the breadboard proof of concept, a few photos of the first draft PCB, a few photos of the device used to flash the chip that controls the circuit, and a zip file containing the source code for the project. I've got some .mpg video files of it in action and will post them when I get them edited.

Finally, in this hobby I have an opportunity to actually write some code. Not just a batch file here and there but real compiled C code with loops, a state machine, timers, enums, and other such fun. It beats the heck out of working with Excel spreadsheets and giving Power Point presentations.

This project involved two technologies; PIC microcontrollers and the code that runs in them. A PIC is a chip that has variable inputs and outputs, that you write code for, that is downloaded into the chip, and runs whenever power is supplied. It stores the code and state variables (counters, parameters, scripts, etc.) even when the power is off. Their primary purpose is to turn on and off outputs, based on the state of inputs or parameters. PIC controllers are used in most all electronic toys these days, many kitchen appliances, and other cheap (and not so cheap) applications. The code can be written in a variety of languages. I chose to develop in C.

PIC controllers come in a variety of sizes. The one I chose is one of the smaller ones available, a 12F675. It runs at 4MHz, has 1 timer, 1k of program space, 128 bytes of eeprom (parameter storage), in an 8 pin package. It also has 6 configurable input/output pins. Most PIC chips are available in DIP and surface mount packages. I used the DIP variety because they are through hole, and can be soldered by hand.

There are a lot of ways a light may be cycled on and off. Not knowing which would look best in different settings, I decided to have a number of blink modes. I also found that some modes look better when cycling fast, while others look better slow. The circuit and code supports two user inputs, mode and frequency. On the circuit they are selected with small pushbuttons. As a button is pressed, the value increases until it hits it's maximum, then it cycles back around to the lowest value. I could have avoided a lot of time, code, space, and dare I say money (oooh, 2 x $0.15 for pushbuttons) by just hard-coding one mode and one frequency.

For the most part, LEDs can only be on or off. To get them to “dim” or have variable intensity, the power is cycled on/off very quickly. This method is called Pulse Width Modulation (PWM). The chip has one PWM circuit built in, but I chose to implement this feature in code instead of hardware. In the code, the different blink modes are handled with a mode variable. Each mode has a slightly different algorithm that controls how much time the LED is on and how much it is off.

All modes except “all_off” use the frequency variable. For the first 5 modes, it controls the speed at which the cycle takes place. They range from several cycles per second (very annoying) to one cycle every 3-4 seconds. The blip_off and blip_on modes have a very short on or off state, followed by a variable duration in the opposite state. When slowed down, the blip_off mode looks like a beacon on a radio tower or light house. The all_on mode uses the frequency variable to control the overall intensity or brightness.

Both the mode and frequency variables are stored inside the chip every time a button is pressed. The variables are stored in 2 of the 128 bytes of eeprom space in the chip. When the circuit is powered up, an initialize function runs. One thing this function does is read these two variables from eeprom. The code/circuit remembers the configuration from when it ran last. Good stuff. I've always wondered how they pulled that off.

There is a lot of sample code available for programming PIC controllers. The code used in this project was pieced together from examples, and code I put together. If you are considering playing with this stuff, I'd recommend downloading lots of sample programs and studying how they work. Mine is included below.

The code on this project compiles to a whopping 400 bytes in size. This compared to the last “real” application I wrote that compiled to just over 23 megs. Given that the 12F675 has 1k of program space, I could stuff a lot more logic in there, control 3 more LED’s, expand the number and complexity of modes, or even implement a scripting language.

Once the code is written, it is downloaded into the chip. The process is called “programming the chip” or “flashing the chip”. There are lots of chip programmers available. I'm using a $38.00 beginner's kit from Microchip.com. It comes with a compiler and a PCB that you temporarily plug your chip into to flash. The programmer has some built in LEDs, a pushbutton and a pot to test out your code. The kit also comes with a couple of chips to start out with.

After the code is downloaded to the chip, the circuit is bread boarded. An input pin is considered “true” when it is shorted to ground. Output pins provide 5vdc at a max current of around 20mA, enough to drive a couple of LEDs or several transistors that in turn can power numerous LEDs.

This project was really a blast! It has kept me up way past midnight for many nights this week. I haven't had this much fun in a very long time. No smoke and fire. I'm still on my first chip and LED. That's a first. My only mistake (besides neglecting my wife & kids at night, and being extremely tired at work in the mornings) was purchasing a bag of surface mount chips instead of through hole. The vendor eagerly credited my account.

After this, I'll be building on my learning's and following rockin_rick's recommendation of moving up to a much bigger chip for the multi-LED control applications needed on this project. Wish me luck.

Wow, it seems like you have a pretty good handle on this. You are much farther along than I anticipated. I don't code in C (but have a basic understanding), so I can't quite follow your code. Seems like your complier must have commands for PWM so you don't have to code it yourself - thats handy. I was expecting you to be coding that in assembler... I'm not sure if the compiler can handle 20 channels of PWM all at once, but maybe? Assembly yes, compiled Maybe trying to add all of those LEDs to a big PIC won't work (with a complier).

Also noticed that your programmer can't handle PICs >18 pins? Or can it? Does it have ICSP? Can you get/use an adapter for larger PICs (non-ICSP)? I'm not familiar with that programmer...

Are you using internal weak pull-ups for the switches? If not, do it (or use external pullups). If your not and it's working OK, then you are lucky - it may end up causing problems when you move it to an electrically different environment.

Use a 0.1 mfd ceramic cap between the vdd and vss of the PIC as close as possible to the PIC.

I'd increase that LED current limiter to about 220 ohms. With 86 ohms you are pulling about 30-35mA from the PIC. Max is 25mA. (VDD - LEDworkingvoltage) / resistor = AMPS drawn. Assuming your LED has a working voltage of 2V, (5-2)/86 = 0.035A (5-2)/220 = 0.014A It may be working OK for now, but it is stressing the chip.

Things to remember - GP3 is input only. If you set it to MCLR, use an external pull-up (say 10K) - don't let it float.

Good job!Rick

Logged

If I do not respond to your post in a timely manner, feel free to PM me.

Wow, it seems like you have a pretty good handle on this. You are much farther along than I anticipated.

Once I get into something its hard to let go. Thanks for the input. I believe the programmer can handle chips with more than 18 pins with an external cable. If not, I'll pick up a different model.

Today I put together a video of the different blink modes. To keep the file size down, a lot of quality was sacrificed. If it comes up full screen, reduce the window size way down. My finger in there is riding the frequency button, slowing down the mode for demo purposes. In the last section I'm cycling through the different modes by pressing the mode button. Any given mode behaves and/or looks very different at different frequencies. I did not show the all_on or all_off modes. I suspect you can imagine what they look like.

Side Lit Plexiglas LogoToday I made and installed the side lit Plexiglas logo. With my friend Jim's help, we engraved the words “Time Sink” in a piece of 3/16” Plexiglas. Rather than cutting with a rotating end mill, we got the best results by just dragging a pointed tool across the surface. The text was inverted and cut on the backside. If the image is on the front, you get a bright reflection. It works best if the image is on the back.

The Plexiglas has two small holes drilled in from the sides to hold two LEDs. The LEDs are held in place with a dab of hot glue. The Plexiglas is sandwiched between a piece of glass and black card stock. The glass is facing out, reducing the chances of getting scratches in the Plexiglas. I picked up a piece of 8x10 picture frame glass from StuffMart for $1.75 and a glass cutter for $7. This was my first attempt at cutting glass and it went well. There was a crack then break, but this time it was planned. The three layers are held together with tape.

The entire assembly was mounted into the bezel. I had previously routed out a pocket for it. It is held in place with a generous dose of hot glue. I rigged up my prototype light blinking circuit to see what it will look like. You can't see it in the pictures, but it is slowly pulsing.

Today I also picked up the improved version of the marquee and mounted it. It looks much better than the previous version. I also mounted the on/off button.

Nice job coder. Are you actually able to control the LED's brightness? I thought (since it's a diode) the light would be either just on or off. Are you just modulating the frequency of the on/off pulses, or actually increasing the voltage level into the LED?

Seems like a cool effect could be created if you can gang all the player buttons together in parallel at the input to the PIC controller and use a counter to accumulate the number of button presses within a certain time interval... then gradually modulate the light intensity by the counter value.

For games like fighters, this would cause the machine to glow more intensely when the buttons are getting mashed without providing a strobe effect that could get annoying pretty quickly.

If I ever get around to implementing this, I think I would reserve the blink effects for one time events like coin drops or game selection from the GUI.

This is really clever... I bet it looks even more incredible in real-life...

It is hard to photograph light well. It is also hard to show the blinking lights. My camera is pretty high res for photos, but very low for video. I've made an attempt in the attached zip file.

We have ignitionIt's quite a rats nest right now, but I've got my primary power system up and running. This includes the circuit associated with lighting the power button. I'm on my 3rd prototype of the custom circuit. On EBay, there is a guy selling small 1” PCB’s for around 2 for a dollar delivered (in quantities of 25). I also picked up a bunch of PCB solderable connector blocks. This project is going to have at least 4 of these things in here, and I didn't want to have to solder the LED wires in.

The real white knuckle point was when I went to test out the 110 volt relay, running within 1/8” from the 12 vdc terminals coming from my PC. Before ignition (so to speak) everything tested out OK with a volt meter. No smoke or fire!!!!! Worked first time. Powering the PC (from the lighted pushbutton) powers the relay, which powers the power strip. Good stuff.

I wish I could say the same for my blinking circuit. It worked fine on my bench, but when plugged into the transformer I picked up from Goodwill, it got really hot. The problem was in the transformer. It was supposed to be 4.8 vdc, but was actually around 15vdc. Unfortunately it fried the chip, and I had to build up another board. This time, I had a chance to do a much better job of soldering and routing the wires. In the course of testing out the new circuit, one of the LED wires coming out of the pushbutton broke. Once I got that fixed, it now works. It pulsates (slow on to slow off) red when off, the goes to steady green when on.