Saturday, October 12, 2013

WIRELESS 555 timer mouse modification

It's Columbus Day weekend and I had an urge to do this project ever since I got back from Hong Kong, so I decided to do it this weekend.

You might be familiar with this "mod" on gaming communities, whether it be for Xbox games or for computer games. Basically you add a 555 timer sends an oscillated signal to a button to simulate extremely fast clicking.

This is my old mouse

I did this to my old mouse and I used it a lot for my games.

I found an awesome wireless mouse in Hong Kong that only costed $5, and I loved using it. It was more sensitive, and, wireless! My desk was beginning to get cluttered so I was more interested into going wireless.
The bad thing is, it doesn't have this rapid-fire button on it.

The 555 timer runs at 5v. If I tried to put that circuit into a mouse running at 1.5v, I would have a bad time.
I dug the internet for solutions to this problem, and found nothing. I have yet to find a web page that has instructions on how to build a rapid fire circuit for a wireless mouse, or even proof that it has been done.
The only thing I found was this. Sad.

Apparently, TI sells and low voltage variation of the 555 timer, the LMC555. It's CMOS, so it runs with less power.
TI claims that it has this swap-out property, so I can just replace a normal LM555 with a LMC555 and everything will still work. I had to see this for myself.

So I ordered a few and built the circuit as I always would. Here is a schematic

I will explain the transistor later.

So the first step is to take apart the mouse.
Good job!

Now, build the circuit on a breadboard so that you are sure everything works.

Test it

You should get this really quick square wave.

Now you are going to have to do a little testing (with a multimeter)on the mouse now.
Most wired mice have a button that when you click it, it shorts HIGH to the processor. When the processor picks up the HIGH, it takes it as a click.
This wireless mouse does something else. When the processor senses that a pin is LOW, it considers it a click.
From the two button pins, find the pin to the processor (2-3v) and the pin that is LOW (0v).

Test each lead of the button.
To find out whether your mouse is activated by HIGH or LOW, click the button and see if both pins are HIGH or LOW.
If both pins end up HIGH (3v), you don't need a transistor.
If both pins end up LOW, you need a transistor.
When the transistor receives a signal from the base, current will flow from collector to emitter. Emitter will be connected to ground, and the collector will be connected to the processor pin (2-3v).

Try using a wire to short your processor pin to GND. See if that renders as a click.

So now that you cleared that up, solder the circuit together! Remember to make it AS SMALL AS POSSIBLE. Space is an issue. You have a battery, a button, and your 555 circuit all crammed into the already tight space in the wireless mouse.

bend the leads

Solder tightly

After that, drill your hole for you mouse. You must find a button that fits your mouse.

Just adding the transistor

Find the right drill bit

Seems to fit

It fits!

So now that is done,
Connect the 555 timer to Vcc and GND
Connect the emitter of the NPN transistor to ground
Connect the collector of the NPN transistor to the processor pin (or the button pin that has 3 volts)
Connect one end of the button the the base of the transistor
Connect the other end of the button to the pin 3 of the 555 timer.

Some pictures of that:

Wrap it in electrical tape for insulation

fits nicely

And you are set!

Here is a video of it working. Note that this mod is pretty glitchy, and sometime it will not respond, but it works most of the time.

Friday, October 4, 2013

Cheap and easy SD WAVE player

First of all, I would like to mention that I go to school, so I'm not always posting on my blog.

Second of all, I would like to mention that this project is from
I don't claim it as mine, I am simply copying the project. I wanted to mention this so that people will know that doing this:

They are the exact same project, done by two different people. If you look at the code from Magneto (expertcore) the only time he mentioned elm-chan was in the main.c

/* 8-pin SD audio player R0.03                     (C)ChaN, 2010 */

The original code had all of this:

/  8-pin SD audio player R0.05d                    (C)ChaN, 2011              /
/ This project, program codes and circuit diagrams, is opened under license
/ policy of following trems.
/  Copyright (C) 2010, ChaN, all right reserved.
/ * This project is a free software and there is NO WARRANTY.
/ * No restriction on use. You can use, modify and redistribute it for
/   personal, non-profit or commercial use UNDER YOUR RESPONSIBILITY.
/ * Redistributions of source code must retain the above copyright notice.

I have to say Magneto did the right thing, including the copyright, however I was hoping to see (in expertcore) the original link to the project. Not only did he not mention elm-chan he copied the page word for word (with a little paraphrasing).

now that my mini-rant is over...

I want to tell you about this project. Ever since I got started in microcontrollers I thought that I would be using PIC. Well, because of the Arduino, Atmel got to me first. 
When I was looking for PIC projects then, I always wanted to make an MP3 player, or something that could hold at least 2GB of music and that I could use, you know, like an iPod shuffle.

So a week ago I found this project.
It basically uses PWM pins to simulate AC current (pretty amazing to me). Of course, with arduino you can play midi files from a PWM pin, but playing legitimate music (after converting them from MP3 to WAV) with 
  • $2 attiny85
  • $1 circuit board
  • $0.50 parts
  • $0 some old thrown out battery
  • $5 SD
which is <$10, is pretty awesome.

One might expect that PWM will generate a lot of distortion. TRUE.
If you listen to this WAV player with earbuds you will be somewhat disappointed. You will hear static and the music will be too loud.

However, if you have a somewhat decent audio system, you will be amazed by the quality...

Most audio setups have low pass filters built into them and all that, so the garbage from the WAV player gets removed!
Of course you could have a built in LPF and a volume control potentiometer, but I was a bit lazy this time.

Some pictures:

Dynex converter from BestBuy ~ $5

Solder on some headers to the pins after you take it apart

Now you know why?

Soldered some pins onto the SD so that I can use it on a breadboard and other projects.

Cut grooves into PCB like a stamp. That way I can just slide in this header


Soldered together, plugged into USBTinyISP

Wire all the programming pins to where the SD socket is supposed to be (as they are connected to the chip).

Packaged nicely.

Charging is simple too!

Here's a link to elm-chan's files... I added my own folder for the PCB, schematics, and other important reference items that were not included in the original package.