Tuesday, August 4, 2015

Custom Built Fightstick using Arduino Uno

As I was going through all of my collected fightstick parts, it occurred to me that I have all but one component to build myself a second fightstick. I just needed the JLF Sanwa joystick and a box to put all of it in. What really sent me over the edge was when I found a controller box that was being thrown out.
 



I'm not entirely sure what it was originally, but it had a bunch of old controller parts probably for something audio/video related. So naturally, it needed to be destroyed.









Here's a better photo of it after I removed all the old knobs and switches. The tricky part about using this as the fightstick box was figuring out a way to overlay a new piece of metal so that I could place new holes for all the buttons and joystick. There were too many spaced out holes to save the original piece and the faceplate has two bends on the top and bottom at different heights. Later you'll see a photo better explaining what I mean.





I knew the idea that I wanted to go with, but I needed some help from some machinists that work in the dark depths of the Electrical Engineering building. Joe Beeler and Ricky Cardenas, two very talented machinists that made this much easier to put my thoughts into something that could physically be worked.

They cut out the top part of the place leaving the two bends at the bottom so we didn't need to warp aluminum to recreate the original.





They helped size and cut a new piece of aluminum so that we could make a new faceplate. Using a layout that I found at slagcoin  we used radio chassis punches to make perfect holes that would house the buttons and the joystick.

I was incredibly impressed with how well the punches worked. They were very simple to use as well, if not for the punches we would have had to use the CNC to cut the holes.







Here are two angles of the fightstick before all the wiring went into it. We added two buttons on the right of the box to include a start and select button.




I don't have any photos of programming the Arduino Uno because it wouldn't really explain much. Anyways I used some helpful links and sources from the UnoJoy github from Alan Chatham. He did a pretty decent job providing information on how to get the Arduino to be a useful joystick controller. I did however make some changes to the code, however because I was not using any analog joystick inputs and I wanted to map only six buttons for the fightstick.


Here is the Arduino Sample Code
// Changed from
// controllerData.l1On = !digitalRead(10);
controllerData.r2On = !digitalRead(10);

//Commented out all of the analog inputs since I didn't use any of them
// controllerData.leftStickX = 128;
// controllerData.leftStickY = 128;
// controllerData.rightStickX = 128;
// controllerData.rightStickY = 128;


I'm not going to post a tutorial on what steps I did because the GitHub readme file does a pretty decent job at explaining what steps are necessary, but if there are questions I don't mind making some help posts.




Here's the very quick and dirty wiring job. It was 11 pm at this point and I just wanted to finish it and test it. I was a little upset that I soldered directly to each button, but at this point in the project I realized that I only spent a total of $25 for the entire project and didn't want to spend more just to challenge myself to see how cheaply I could make it.

I'm sure I'll go in on this later and replace the soldered wire with something more modular, but for the time being I'm incredibly happy with how this works.









Here's a little photo showing that the fightstick worked on my Playstation 3. Later I tested it on PC successfully. I'm testing on Guilty Gear Xrd in the photo if anyone was interested.






This is Joe Beeler(left) and Ricky Cardenas(right). They were embarrassed I was taking their photo, but these guys were very helpful and without their machinist knowledge I believe that this project would have been much more overwhelming. So this is a big thank you to them.

Also thank you to Alan Chatham for doing a lot of work on the UnoJoy project.

Tuesday, July 14, 2015

Replacing LG VK810 Digitizer on a Tablet

I have been meaning to post more stuff. Things have gotten... well I don't want to say busy, but I have certainly found myself doing less student/project related things now that it's summer time and all the students are gone. I am looking forward to the fall semester.

Anyways, recently my granddad's tablet's screen broke. I would have liked to just replace the glass because I have seen the method that's commonly used to replace glass on phones and would have liked to give that a go, but instead my granddad purchased the whole digitizer and glass assembly. I did try to find the glass alone, but I wasn't able to find anything. So I offered to take it apart and see if I could figure out how to get the thing replaced and back together.

I should have taken a picture of the tablet broken, but I assure this was sufficiently broken. I tried to stay fairly thorough. I was kind of a little frustrated with how much glass there was and how days after I still found glass splinters in my hands. If you're reading this and you have anything that is glass that doesn't have some kind of screen protector on it order one for it now. Glass plates, glass mugs, glass armor. Doesn't matter what it is, having that adhesive clear protector on it would have limited my glass splinter levels down. Anyways, to the breakdown.

The hardest part was getting the back plastic case off the electronics portion of the tablet. The entire plastic bottom case is a solid piece and you can't slide or unlock something to get it apart. Which you just pretty much try to apply a wide surface area of pressure and pry it out. (I used a screw driver and some cursing to do the trick.)

Once it's apart, things at least made sense looking at how to. We have a ribbon thing, a battery thing, a printed circuit board thing, and an aluminum tape thing. It was kind of frustrating that I couldn't find any advice on how to take apart this specific model of the LG tablet. I did find other models and other tablets so from a combining what people on the internet said and what I could see I managed to start taking things by pieces.





Keep in mind, I deconstructed the entire tablet. I needed to remove the old digitizer and clean the old broken glass from the plastic chassis. I started with the removed the pcb so I could remove the ribbon cable so I could get the battery out. So after unscrewing everything and then double checking to make sure I didn't miss screws I did find that the manufacturers were not shy about using adhesive to keep everything together. If you're removing things and feel it's stuck then it probably is and you just need to lightly apply pressure and wait for it to come unstuck.

Because I'm replacing the digitizer assembly, everything needs to come out. Camera, speaker, plastic housing bits, secret connector bits, and even some of the tape that was used as, what I'm guessing to be, insulation.


Once I got one side of the ribbon cable free, I needed to work on the other side of the ribbon cable would goes to the USB connector and what looked to be sound/microphone pcb. Again this was moving things out of the way once they were unscrewed and keeping special looking tape and just overall being gentle with the connectors.






Once the ribbon cable was free so I could remove the battery, getting the rest of the bits out of their holes and crevices was a lot more simple and I was able to see the back of the old digitizer.





Removing the old digitizer from the plastic chassis, which you can see underneath with all the broken glass, required a heat gun, patience, and time. It wasn't necessarily important to be slow to preserve the old digitizer so much as I needed to keep the plastic chassis in tact without melting it with the heat gun. Similarly, I used the heat gun and a flat head screwdriver to remove the old adhesive and broken glass from the chassis as well.




 This is the cleaned chassis next to the new digitizer assembly. Now that's left is to reverse the process and put it all together. I only encountered two different types of screws that were distinctly different so I didn't have an issue as long as I used the right screw, but I also tried to keep the correct screw with it's corresponding hole on a piece of paper so I didn't muck everything up. Attaching the new digitizer to the plastic chassis, I used UV curing tape that for some reason we had on hand in the instrument shop. Allegedly it's pretty cheap, but it was convenient because we also had a UV bath (it looks like a cheap nail salon UV bath) to help the curing process.



Once everything was back together, it turned on and nothing smoked out of the headphone jack. It was interesting, but really I don't think I want to do that again. I do not particularly like working with broken glass.







Tuesday, April 14, 2015

Fuse Change in HP33120A Function Generator

Simple post. Most of the function generators that we have here are fitted with a fuse holder that allows us to quickly swap out busted fuses. This one in particular however is not.




Changing the fuse in this one is about just as simple except you have to take it apart before you can change it out. I just thought it would be neat to show the guts of the function generator.

The photo below and to the left is just the new fuse in the sockets. It looks like a goofy looking resistor.

The photo to the right is measuring the resistance of the old busted fuse. It's measuring 6-ish Megaohms which doesn't make for a very good fuse.





















Friday, March 27, 2015

Optical Sensor installed in Qanba Q4 Fightstick

A hobby of mine is to use small arcade style controllers to play fighting games. I'm pretty decent. Anyways, I recently found that an optical sensor existed that could replace the microswitches in the joystick. The microswitches act as a mechanical sensor that detects movement on the joystick (up, down, left, right, and the corner combinations). These are all well and good, but having a silent joystick that is slightly more precise is more my style. The only complication is that the special optical sensor required a power source and while I could have soldered something directly to the circuity inside my Qanba Q4, I wanted the option to switch between the optical sensors and the microswitches without having to solder and unsolder every time between the two.

So I designed a little pcb that would facilitate as a USB to power hub. The intention was to make the cord modular from the fightstick so instead of having an always connected power cable, the cable could be removed completely. Also, the power for the Qanba pcb and the optical sensor would connect to my pcb and could be disconnected when switching from optical to microswitches.



So this is the board. Super small, super simple. Sadly, I was not able to use it. Not because it didn't work, but because I did not have the proper connectors to attach to the Qanba pcb. Dupont cables didn't work, molex didn't work, and the do-it-yourself wire connectors that are in the instrument room here at Purdue didn't work either.

I'm under the impression that the wire connectors that Qanba uses are special or at the very least not very common. While iteration ALPHA didn't work, I plan to go back with iteration BETA to hopefully use my design, but because I wanted to use the sensor last night I had to improvise.






I'm not sure if anyone knows the name for these particular connectors, but if you do please email me because I don't know what to search for.

Also because I was really annoyed that every photo of the Qanba Q4 pcb was taken by a potato, here is a better photo of it with no modifications and I've unhooked the microswitches along with the power connector from the USB cable.









Here is my improvised cable soldering. I was really hoping to avoid soldering so that I could keep it simple for others to implement, but c'est la vie.

It's kind of a bad photo, but the main points to take from it is that I'm pulling 5 volts (red) and ground (black) from the USB power cable. The other four colors are direction inputs for the Qanba pcb.





So here is the final connection scheme. I recycled the Sanwa microswitch cable that was already being used with my JLF stick (the joystick itself) for the directional inputs, and the important part is that you can see that the power and ground connectors are soldered to the USB power cable.

Everything worked out a lot better than expected after I already gave up on finding a proper connector at 11:30 pm. Minimal soldering and the optical sensor works very well. I don't expect there to be any questions, but if you're looking at this in the future four years from the date of this post or something like that, feel free to send me an email. I'll probably respond unless the internet stops being a thing in the future.



Thursday, March 5, 2015

HP 3310A Disassembled and Potentiometer Repair

I originally wasn't going to make a post about fixing a potentiometer on the HP 3310A function generator because I thought it should have been relatively easy to replace/repair a simple potentiometer and wouldn't really have a lot more content to add to what I already did. Holy Packard was I so wrong. More like semi-wrong. Repairing the potentiometer was relatively easy as expected, but all the disassembling to get to it so I could even work on it was just incredible. I know in the last post I said the same thing, but friggin' kudos to HP for making a solid box of interlocking, military grade spec parts that is just an incredible pain to take apart. A majority of the photos that I took were not initially for a blog post, but rather documenting how to get this contraption back together once I realized that this was going to be a lot more extensive than unscrewing a few parts.

In the last post about the 3310A, I kind of went over a little of the first bit on how to start taking this thing apart so this is sort of going to pick up from there in the breakdown process.


The potentiometer that is used to vary the amplitude of the function generator was really erratic every time it was adjusted which suggested that the wiper contact was all gunked up with all sorts of gross just from use over time. So the initial idea here was to just replace it, but first I had get to it. Due to how the function generator was constructed, it was necessary to take it almost completely apart.

This is the side panel that screws down each of the printed circuit boards to the box itself so that it's nice and secure. Naturally, each set of screws are different sizes and have specific placements so this photo was a lot more useful to me once I had to put it back together.




But what's this? It only takes off the metal frame, but at least now we can see the board that has the potentiometer on it.





















Getting the board out itself was not necessarily professional, but once the metal side frame is removed you can flex the box to wiggle out the circuit board.

Here are more photos of the board in question once it had been wiggled free. There are two other circuit boards that interface with it, one of which needs to be removed completely to get our potentiometer free.





























Now that I can get a good look at the potentiometer, I figured that it might be worth a shot to see if cleaning the wiper track might solve the issue... but this only became an option after finding that the instrument room did not have potentiometers with the proper physical dimensions.












So prying back the clamps on the dust cover plate revealed this was kind of a unique potentiometer. Rather than having a single contact tooth, this potentiometer had contact teeth so to speak. The photo shows a comparison of these two kinds of potentiometer contacts.

Anyways, just from many years of use the contact teeth made tracks in the resistive strip sort of causing an eroded mess of shavings. I am not certain, but I am under the impression that the resistive strip shavings were preventing a good electrical connection. Cleaning up the tracks with ethanol worked out nicely.
























Before reassembling everything, it was suggested to me by Dave Azpell that a tiny hole should be drilled in the back of the dust cover. If the potentiometer started misbehaving again ethanol could be easily applied without having to take the whole thing apart again.

 

  Here it is mostly put back together with a little video showing the output of the function generator on an oscilloscope while I adjust the amplitude with the newly cleaned potentiometer. 



EDIT (9/17/2015): Someone emailed me about getting some scans from the service manual. So here are the two sets of scans I did. I did a very basic one that included the board layouts. The second one focused on the A1 board that has the triangle amplifier and +/-5V detector.

Monday, February 16, 2015

Cuphones - Cup Headphones?

Today was kind of interesting for simple side projects. Mark Oscai, a student I work with and regular lab wrecker (just kidding), came in today with something that he had seen in class. I guess one of the ECE 311(Electric and Magnetic Field class) professor, Professor Melloch, did an interesting show and tell with copper wire, magnet, and cup. It would seem Professor Melloch makes a really simple speaker using these things to show how fields work, but I can't really say for sure because my experience with ECE 311 was super boring. Granted, I'm a physics minor and took a more interesting version of the class through the physics department (Phys 330). And by interesting I mean really, really hard. I still had to take ECE 311, but compared to the physics department equivalent it was a breeze.

Anyways, enough boring stuff, here are some of the photos of the materials that were used and just photos as Mark constructed the cup speakers.




As you might expect, the sound wasn't that great so I got the bright idea to add water inside the cup to see if it would dampen some of the noisiness out. The water kind of acted like a low pass filter in the sense that it did in fact dampen the noise, but it also dampened everything except for the muffled bass. It sounded as if you were sitting in the auditorium restroom during a concert. It was pretty interesting.


Here is Mark messing with his magnets and coils to make his speaker work. Mark however is kind of an interesting bird and even though he was able to recreate the speaker working, he still wanted to add some of that Oscai flair to it, which leads us to his revision two of the speaker... or rather... cup headphones.






















And just in case you're skeptical of whether or not it works, I have a short video of the device working prior to Mark's... creative headphone revision :)


Sorry about all the background chatter. There were a lot of people really interested in this fun little project. Also, I am sorry once again for vertical videos. I'm not really the best photographer.

Friday, February 13, 2015

Instrument Room Side Projects

A couple of students I work with in the instrument room here at Purdue also have some side projects that they get involved with. Some are just looking for extra experience in soldering and others are just helping out friends.

First up is Travis Garza, I helped oversee his progress to make an FM wireless microphone because he wanted some extra soldering experience. What a go-getter sophomore. All I did was help him learn good soldering techniques, but he did all of this handiwork and I am proud of him even though we weren't able to get it to work.






















Second up is Kyle Woodworth, I was not even involved for this project but managed to see his handiwork just as he finished so I only have a few photos at the tail end. One of his friends asked if he could do a fixer-upper for his Gamecube controllers. (I guess his friend is really involved with Super Smash Bros.) According to Kyle, which didn't take photos of his progress, this controller was 80% nasty and 20% super gross so I'm impressed with his cleaning and re-soldering. Allegedly, the capacitive coupling can be reduced thus increasing the response time for these controllers according to Todd Wild (my overseer, in Todd we trust).








Wednesday, February 11, 2015

Repairing HP 3310A Function Generator

It is not uncommon that lab TA's report that their lab equipment is broken in some way or another. Usually it's some trivial thing like they forgot to check if it's properly powered or didn't know how to check if the fuse is blown, but from time to time the equipment is in need of some serious maintenance.






So this was brought into the back and the TA just mentioned that he couldn't get it to work. This older model function generator are usually pretty solid and don't have fuses so if they're broken then they are super broken. After some initial tests just to double check if the TA was not using it correctly, it was found that there was no output for any of the waves.








After taking the thing apart, and I would just like to give kudos to HP for their work in designing their function generator in such a way that it was a huge pain to take apart. I mean this this is a rock solid piece of equipment and my guess is they really didn't want it to be taken apart unless it really had to because it was a mystery box of sliding parts to get this jigsaw box apart. Anyways, it is pretty common for the countless detaching and reattaching of cables to the output by students just naturally wears them down and in this particular case, breaks the connection so that new leads need to be soldered. To the right, there is my handiwork with a new resistor in place. The original connector that was attached was just destroyed so I had to fashion a new connector to the board as well. This actually solved part of the problem because I was able to get the function generator to output a square wave, but the Sine and Triangle wave parts were still flat lining.





















Well that was the easy task, now I had to look for something a little more malicious as to why this thing wasn't working and you can see it in this picture to the left. Some old military grade tantalum capacitors leaked and corroded away at the copper trace. On the right you can see that the trace was just eaten away.





So the service manual was found, but wasn't really necessary in this particular case because it was fairly obvious what was the culprit for the bunk outputs. I thought it was kind of interesting though and figured I would show the photo of the schematic, C2 and C3 should be the caps that I needed to replace if I remember correctly.

The only thing that needed to be done to repair this would be to fly wire the two separated traces together and drop in some new tantalum capacitors. Not too tricky.





















The above photo is the new wire soldered to connect the two traces, and to the right are the new two orange caps that were soldered in.








And would you know it, everything started working again. Successful repair job to keep this HP function generator up and going for at least another year before someone drops it or something.

Big thanks to Dave Azpell for keeping the service manual and giving me guidance on what to check for to get this guy up and running again.