I finished off the design of the printed circuit board for my clock. Sent it off this morning to get manufactured ($35 for two). Here’s hoping that it works!
My roommate has Guitar Hero and he jammed too much on the whammy bar of his guitar hero controller, so he threw it away. I recycled it and made it wireless with a $14 wireless ps2 controller from Ross’s and gave it to my girlfriend for her 19th birthday. I’m 23, so age/2+7 doesn’t present a problem…
Before I started, I thought it would be simple enough. Remove the unnecessary plastic parts from the wireless controller and solder the wires from the buttons in the guitar to the wireless controller button pads. Here’s all the parts in a wireless ps2 controller:
As it turns out, there’s two problems:
The first problem is that Guitar Hero I and Guitar Hero II will both let you use a regular controller to play the game, but the buttons you use to do different things are different for the two games. For me, this meant that I had to have a GH1 and a GH2 mode, and have the actual fret buttons connect to different pads on the wireless controller based on which mode it was in. So it has 8 pnp transistors to do this (4 of the fret buttons had to be switched, 1 of them happened to correspond to controller buttons that for each game weren’t used in the other game, so it was okay to have them both down at once). Because of the mode switch and the transistors, I was able to work around this quirk.
The second problem is that Guitar Hero II treats a ps2 controller differently from how it treats a ps1 controller.
If you have a ps1 controller and you hold down the left d-pad button when you plug the controller in (or turn on the ps2), Guitar Hero I will treat it as a guitar, so you press the fret buttons whenever and strum with the up and down buttons on the d-pad. Otherwise (if the left d-pad button isn’t held down or you’re using Guitar Hero II), it requires that you press the frets down exactly when needed and this pressing of the fret buttons is the effective strum. The wireless guitar that I built still suffers from this deficiency – there’s no workaround, so Guitar Hero II doesn’t behave the same as it does with a wired guitar.
Here’s a picture of the wireless controller board with attached wires:
As for the broken whammy bar, my roommate threw away some of the parts for it after he disassembled it to try to fix it, so two features needed to be reimplemented:
The first was that the whammy bar base in a functioning guitar hero controller rotates on a split axle, so there’s a post on either side of a plastic piece and the plastic piece rotates when you move the whammy bar. One side of the split axle was missing. I don’t know what the original looked like. I re-implemented this with two layers of vector board and a bolt and nut and some .025″ metal wire-wrap posts and a lot of hot glue. This part works fine (although having a slightly larger bolt would have been better). Here’s a pic:
The second thing was the spring that returns the whammy bar to the upright position when you let go of it. I still had the spring, but whatever it went between was long gone and/or broken. To remedy this, I put a bar of vector board across two of the four plastic posts this whole assembly fits between (and tapped the two posts and screwed the vector board in) and drilled a hole in the white plastic whammy base and just inserted the spring between them. The new whammy bar is more stiff than on the original controller.
The wireless controller came with rechargeable batteries and a charging cable to connect between the thing you plug in to the ps2 to receive the wireless transmission and the controller. So I just kept that part and added a matched jack & plug to where the original wired controller wire came out. When not charging, you can unplug it right at the base of the guitar. For when the rechargeables die, I put in a switch inside it to switch between NiMH mode and alkaline mode (which just determines whether it tries to charge the attached batteries) and included a two AA battery holder with the same connector that the rechargeables use.
I wired all the switches and lights to the top of the neck and drilled holes where the tuning post nubs were and mounted everything there. There’s a power switch, a charge light, a power/connecting light and a GH1/GH2 mode switch.
The only other upgrade, besides the wirelessness was that I replaced the two strum buttons under the strum bar with quieter versions. With the regular guitar, the loudest thing is the strum button. And I mean louder than the music. It’s all you hear unless your tv is at full volume. I found some quieter buttons at the local electronics shop that were about the right size and were less than a dollar each and mounted them on a piece of vector board. I had to add some spacers to get the strum distance right, but other than that, it was a straight replacement and it worked well.
This project took me 8 days (worth of nights and weekends) from buying the wireless controller to shipping it off to my girlfriend.
Here’s some pictures of the insides:
Here’s the finished product:
And here’s the parts from the wireless controller that weren’t used:
Other than all that, it works, and it is a solid guitar.
Finally! A blog that’s devoted to something nerd-centric on the internet. It’s about time!
I’m taking a class in electronics this semester. There’s a final project we have to complete, so I’ll track the progress of that here, as well as write about other things related to electronics.
For my final project, I decided to make a clock based on an arm7 microcontroller from atmel (an at91sam7s64) using a 128×128 pixel full-color oled display as the output. I wanted to do this for several reasons:
- The choice of the arm7 was so that I could learn a new microcontroller that had higher performance than I was used to (motorola hc05, zilog z8). This one can do about 55 MIPS (although there’s a mandatory wait state if running code from flash instead of from sram, so it’s somewhere around 30 MIPS in that case).
- The choice of an oled display was because it was fairly low-cost ($37 in single quantities), easy to interface to and is lower power than an lcd in the case that only a few of the pixels are on (because there’s no backlight on an oled display).
I made it a fairly simple project (it is just a clock after all) so that I could determine whether it was straightforward to get a development platform setup on linux to assemble, compile, link and program the arm7 using freely available software. In this regard, it has turned out well. Here are the tools that I’m using right now to get the prototype working:
- the gnu assembler
- the gnu c compiler
- the gnu linker
- gnu make
- openocd (to program the device over jtag as well as for simple debugging)
- sam_I_am (to program the device over usb as well as for simple debugging)
At this stage, I have a bunch of stuff written in assembly language. It does the following:
- sets up the microcontroller
- sets up the display
- reads the voltage from a light-to-voltage sensor (TSL250) and sets the display’s brightness accordingly (dark in a dark room, bright in full sunlight)
- displays a simple pattern on the display
Right now, I’m working on getting the time out of a real-time clock (over spi).
The hardware designs will be released under a creative commons license so that anyone can take the design and make one (or improve upon the design it and make one) for themselves. The license will be BY-NC-SA (attribution, non-commercial, share-alike). This means the following:
- attribution = You are free to distribute copies of my designs, but if you do, you have to give me credit. If you make a clock from my designs, you have to credit me for the hardware design.
- non-commercial = You can’t sell my designs. You can’t sell clocks based on my designs. That is, unless you get an alternate license from me (and give me some of the money).
- share-alike = You are free to make modifications to my designs, but if you do, and you share the result with others, you have to give them the same rights as I’m giving you. This means you can’t take it and modify it slightly and say it’s copyright you and then charge people for it. This share-alike clause also relates to distributing unmodified versions of my designs.
For more information, see this.
The software will be released under the gnu general public license (I’m not sure which version yet, either 2 or 3). This means you are free to take the software and use it or sell it (and you can keep your money this time) or you can modify it and then use it or sell it. Either case is only under the condition that you give others the same rights you got. See this for details.
Both of these licenses rely on copyright law as it stands right now in the united states. If you don’t like my terms, that’s fine, you didn’t sign anything, but nothing else gives you the right to copy my work (except fair-use; but that’s more of a defensible position than a right, now isn’t it?).
The difference between the non-commercial part of the license for the hardware design and the sell-it-as-much-as-you-want part of the software license has to deal with economies of scale. It addresses the problem that can occur if I design hardware and software for a widget and start making and selling them for fun and profit. It costs almost nothing to distribute every copy of a piece of software. It costs real money to make hardware, and the costs drop dramatically if you make a lot of something at one time versus just making a few of something.
If big company A takes my software and sells clocks with my software, that’s fine because they designed their own hardware and if they modify my software, they have to share their modifications with everyone because they’re distributing it with their hardware or as a download. This benefits everyone involved. If I let them copy my hardware design for commercial purposes, they can put me out of business because big company A can make 1000 at a time and undersell me because I can only make 10 at a time. Disallowing the commercial use of my hardware design prevents them from selling an identical product (hardware and software) for much less than I ever could, driving me out of business making and selling something I designed in its entirety.
Now, that’s a fine point, you might say, but if they’re selling clocks based on their own design with my software, they can still run me out of business. Ah. But that’s already happening, right? I don’t make clocks yet (and don’t really plan to, but there’s no sense in not planning ahead) and big company A already sells clocks for $5. I’m not trying to displace big business, I just don’t want them to profit on ruining me.
The parts of this blog and associated materials relevant to the arm7-oled-clock will also be licensed under the cc by-nc-sa license.