Once installation is complete, type “killall SpringBoard” to restart springboard. Capitalization is important.

You will see a new bochs icon on your iPad. Run it.

Bochs comes “pre-installed” with Win95 and Win3.11.

Everything works. You scroll around using the touch screen.

Resolution support is bad though.

Solitaire is not a game that you want to play on an iPad.

Although booting Windows 95 on an iPad is cool, it’s not very practical. The emulation is very slow and it takes almost 3 minutes to boot Windows 95. Performance in Windows is also sluggish. I would estimate that the emulator is capable of about 33Mhz of CPU speed because it feels slower than my very old computer (66Mhz DX2).

There are times when you’ll need to read analog signals and pass them to a computer to process or display. Analog signal acquisition cards are usually expensive and not suitable for hobbyist on a budget. So if you’re not running mission critical systems requiring ultra fast and accurate updates, here’s a very cheap and easy solution to getting your analog signals into your computer.

This idea came to me when I was looking for a USB interface card for my CarPC. Unfortunately for me I have a very old car that doesn’t support the current OBDII system so I have to hardwire everything to get their status. I needed the status of the fans, coolant temperature, compressor clutch, and a host of other parameters to feed my obsession for information that I don’t need and to distract me from the road ahead. While looking for a cheap and easy way to get all these information (PICs, etc.) I stumbled upon cheap China made USB controllers. And since USB is pretty much standard with every computer, I was sold.

First off, you will need an analog USB joystick. You can probably see where this is heading. The reason is because USB joysticks are so cheap that it makes sense to experiment with them. Besides analog inputs, you get discrete inputs too with these joysticks. You can grab some of these joysticks from the links below:

Note: I would recommend the gamepad type because there are 4 analog inputs as compared to only 3 for the joystick. Get the cheapest analog controller you can possibly find. Warranty is not an issue for obvious reasons.

This controller from a local computer store cost me RM23 ($8) only. It has about 20 discrete inputs (buttons) and 4 analog inputs and also a vibration unit inside.

First thing you’ll want to do when you get your controller is to plug it into the computer and check if it works. If not you still have the option to return it to get a replacement. Once you are satisfied with the condition of the controller, it’s time to have some fun. Take out your screwdriver set and tear it open.

Here you’re looking at the analog joystick board (green). All the connections that you need can be tapped from here. If they are 4 axis of analog control, you will have 4 inputs from here.

The red squares show where the 4 potentiometers are. The red circle shows the input connections. The 5V and ground reference is there also.

Measuring the supply voltage to the potentiometers. As expected, it was 5v (USB powered)

So basically the controller works as follows:

Looking at the diagram on the left, with a supply of 5v and ground, the potentiometer divides this and gives an output that varies between 0-5v. So depending on where the potentiometer is positioned, the output voltage to the joystick’s controller input can be anywhere from 0v to 5v. The joystick controller then reads this voltage and gives a reading to the computer.

An externally connected potentiometer is used for testing. The purple wire supplies the 5v, blue wire supplies the ground and green wire is the input. A capacitor is connected between the input and ground because the readings were “jumpy”, probably due to external interference.

So if the potentiometer is turned all the way down, the input to the joystick controller will be 0v. The joystick will then send a “full left” (or “full right” depending on the design) to the computer. If we turn the potentiometer all the way up, the input to the joystick controller will be 5v. The joystick will then send an opposite signal to the computer, telling it that they joystick has now been moved all the way to the other direction.

If the potentiometer is turned somewhere in between, it might give a signal of 3v. The joystick controller will then interpret this and tell the computer where the joystick location is.

If you have managed to follow the explanation above, you’ll see why we can use this to measure analog voltages. We can theoretically apply a voltage to the analog input of the joystick controller and the joystick will send that signal to the computer. I say theoretically because that is not exactly the case in real life, as you will see below:

This is the software that reads the joystick input. It’s written in C# and it can be downloaded from codeproject.com along with the source code. I’m not an expert in C# so please direct your C# questions to someone else. But a little reverse engineering and trial and error should help you modify the source sufficiently for your own use.

I disconnected the potentiometer and instead connected the input to 2 different batteries, one at a time:

When I connected it to the Li-ion battery of 3.86v (measured with a voltmeter), it gave me a reading of 62154.

When I connected it to a AAA battery of 1.5v, I got 8191. If we assumed that 0v will show zero on the computer and 5v will show 65535 then the readings will not make sense. For example:

Input Voltage = (Axis Value / 65535) x 5v

In the case above, we got 8191 for the 1.5v battery. So if we substitute that into the formula above, we’ll get:

So it seems that the joystick controller only reads a certain range of voltage, with dead zones at both the upper limit and lower limit. Hence, we need to calculate those values. We have 2 variables to figure out: the lower limit and the range. Upper limit is not required to get the correct voltage reading. We already have 2 samples to work with from above (the li-ion battery and 1.5v AAA battery). By using simple high school maths, we can then calculate for the 2 unknowns:

Note: the AAA battery was at 1.49v.

From here, we know that the lower limit is 1.1431v. So anything below this, the joystick reads as zero. Also, we now know that the joystick only reads a range of 2.8647v. That’s not a lot to play with. But it’s sufficient.

So now with the unknowns calculate, we can write our equation for this joystick:

Input Voltage = 1.1431 + (Axis Value / 65536) x 2.8647v

To test the equation, we use the example of the 1.5v battery again:

Input Voltage = 1.1431 + (8191 / 65535) x 2.8647v = 1.5011v

Now the value of 1.5011v looks more convincing.

From here, you can tap the other analog inputs. And using the values acquired from the equations, you can write your program to display the values in voltages instead of unintelligible numbers like 8191.

Of course, if you require better resolution, you can always go for the commercial devices, like the one shown below:

That’s about all that you need to know on how to make a cheap and easy analog signal acquisition device for a computer. If you have questions, comments or suggestions feel free to leave them in the comments section below or send me an email.

If you own a car with plastic headlamps (as opposed to glass), you’ll realize that over time it will start to turn yellow or opaque. This is caused by the dirt and impurities on the surface of the headlamp. Besides reducing the output of the headlamp, it also causes glare to oncoming drivers (more obvious on HID equipped cars due to the higher intensity). Cosmetically it will also look dull.

Before: Haven’t been cleaned for almost 4 years. Starting to look yellow and “foggy”.

The good news is, you don’t have to have them replaced to make them look new and transparent again. Just buy a bottle of headlamp cleaner. These can usually be found in hypermarkets.

The cleaner is very easy to use. Just make sure your headlights are clean and dry and dust free.

Apply a layer of headlamp cleaner with a clean cloth. Apply liberally. Rub lightly in a circular motion. After a few passes, let the cleaner dry on the headlamp without wiping it off.

After about 20 minutes, use a clean cloth and wipe away the dried cleaner. If your headlamps don’t look clear enough, repeat the above steps.

With enough rubbing you’ll be able to get the dirt off and have a clean and clear looking headlamp. Cheaper than buying new ones.

There will be times when you want to prop up your iPad on your desk to watch a movie, or to use it as a second screen, or to show your Twitter updates. It is times like these that you’ll need an iPad stand. However if you’re like me who refuse to be a sucker for overpriced Apple accessories, you can make one for yourself for free in under 5 minutes.

About a week ago, I have never heard of such a thing called a peltier cooler. When my housemate bought a CPU cooler that cools using electricity from lowyat, I was very surprised and amazed. I kept thinking to myself on the way back home how such a thing can work. I’ve heard of using compressors and feron gases to produce subzero temperatures. But using electricity alone? You can imagine my curiousity.

Subzero 4G for rm50 at lowyat.

The main component of this cooler is the peltier plate. It’s a plate that, when voltage is applied, creates a a temperature difference between its top and bottom plate. In short, when electricity is applied, the top plate becomes hot and the bottom plate becomes cold.

The peltier plate.

The peltier plate does this by transferring heat energy. And the interesting thing is that if you reverse the polarity, the hot and cold sides will switch. The more interesting thing is that if you apply more voltage, it gets colder.

Stuff that came in the package. Heatsink with peltier plate, casing fan, microcontroller to control the temperature.

The peltier cooler.

This thing is very cold when running. It’s not like normal cool, but it’s cold. It’s like touching ice. If you can’t take my word for it, look at the picture below.

You can see drops of water forming on the plate due to condensation!

This peltier technology has been around for a long time. It’s just that it’s not too pratical for some applications because it’s not very efficient. Anyways, some links for further reading: