Wednesday, January 19, 2011

My first self-programmed computer games

Here is a small, but fine compilation of my first self programmed computer games.
All of them are done in Visual Basic .NET.
I was 12 years old when I did them!

1. Hübbie Shooter
A small, but for a first game quite good game.
All you have to do is to "shoot" the flying birds with your mouse.
It uses about 50 different PictureBoxes which are made visible and invisible by a timer. Sorry, but this game is just available in German.
Here is a screenshot:

Download it here: https://sourceforge.net/projects/hbbieshooter/files/ 

2. Go!
Go is a Space Invaders clone.
You are the blue box and must shoot the red box.
Left shift is the "laser cannon" and left ctrl is the "guided missile".
This was my first game that used a non static surface.
It might not look so nice as Hübbie Shooter, but its much more fun!
Look:


Download here: https://sourceforge.net/projects/go-space-inv/files/

Well, this was my short trip to my oldest self-programmed computer games.
Hope you enjoyed it!
/apexys/01192011/1614

Thursday, January 13, 2011

Soft blinker with a NE555

And again a circuit with my favourite IC: the NE555!
Here is my version of the soft blinker:
You see right, there is no preresistor for the LED, due to the extremly high base resistor of the transistor!
Here is how much current flows through the LED:
    The current is between 2 and 5 milliamps, so you could also connect an npn-transistor to drive whole arrays with it.
It is not a sine wave, but a sawtooth.
But hey, it's a soft blinker with a NE555!
Here is a video I took of my prototype.



/apexys/01132011/1540

Friday, January 7, 2011

Full adder with relays

While playing around with 150 relays, I built a full adder.
I managed to get it down to 9 relays (closing type) and some diodes.
Here is the schematic:











Please note that relay 6 is just a drawing error, due to the diode near the closer of relay 8 it's unnecessary.
The Resistors are all 1k, which seems to be an appropriate value for my 24V/2.7kOhms relays, but maybe you need to change it depending on your relays.
The diode near the sum output might be useless, but I need more time to test it.
This all is not tested yet, it's just an idea I wanted to share.

/apexys/01072011/1253

Wednesday, January 5, 2011

Piezo problems

In my piezo fluid analyzer,
I used the piezo-stripe uncoated.
It seems like a small layer of metal is peeled off by the ultrasonic vibrations.
After half an hour in cream soap, a brown isolating layer had been exposed.
I think I'll try a thin coating around the piezo stripe.

/apexys/01052011/1644

Sunday, January 2, 2011

NE555-based fluid analyzer

Here comes my newest experiment:
A NE555 based analyzer for fluids.
It's basic task is to differ between different types of fluids like water, cream soap and so on based on their viscosity.
The basic idea is the following:
I encapsulate some liquid in a box with some kind of slider like this:
If I move the Slider like this

the fluid would move like that:














So if I use a constant velocity to move the slider,
I'll have to use a differing force based on the friction, which is defined by the viscosity.

Now my idea was to use a piezo stripe and a constant frequency.
The piezo would be the slider and the constant frequency would have the effect of a constant velocity.

Gone through all this, I built a small circuit with the NE555, a piezo stripe which I cut from a piezo speaker and a plastic box.
Here is the schematic:




I used one multimeter to measure the current through the piezo and another one to measure the system voltage.
The voltage defines the strength that the slider moves with.
Here is some data:

Tested objectCurrent(5V)Current(10V)
Water9mA22mA
Ethanol7mA18mA
Cream Soap10mA30mA
All aquired at 19°C room temperature. with a 1.8 x 4 cm piezo stripe.

You can see easily the differences in viscosity between the fluid.
Ethanol has a rather high viscosity, so it takes little strength to move the slider.
Cream Soap is - like the name says - a cream and has a rather low viscosity.

How could I use this thing?
Well, in this configuration, it can differ between cream soap and water.
It's not everything, but hey, a proof of concept.
If you calibrate it and build a mechanical more stable version, you could use it to make automatic quality controls on your cream soap or such.
You could build one in SMT into a glass to measure if it contains beer or cola (or cream soap ;-).
Let's see what future will give us...

/apexys/01022011/1940

Saturday, January 1, 2011

Physics experiments

Hi and a happy new year.
My blog 2.0 goes into the new year with some experiments.
It's nice and calm in the time between the years, so don't expect big thing.
I'll rather do some experimenting with some physic things like densitiy, light spectrums, ...
The first thing will be the viscosity analyzer.

Well, then a happy new year!
\apexys\toan\01012011\2035

Monday, December 6, 2010

Binary picture-frame clock


Hi altogether!
After seeing quite a few clock projects on hackaday.com, I decided to make my own.
And here it is: The binary picture-frame clock!





















Now, how did it build it?
The first thing was to make an idea and a prototype.
I used an ATMEGA-8 as main part and layed out the rest around it.
I needed six LEDs for the minutes and the seconds (2^7 = 64 so just one factor under it to get up to 60)
and five LEDs for the hours.
Coming together with buttons, a light sensor for night dimming and the clock crystal,
filled nearly all the pins of the microcontroller.
Here is the schematic:

I did this in KiCad, its free and quite good.
Laying out a one sided PCB saved me a of of cost, and left the possibility to make it quite flat to fit in the frame. The frame is a cheap IKEA picture frame for like ten euro.

One of the advantages of KiCad is it provides a rendered 3D-image of a circuit board. Here it is:
Now, I ordered the PCB and the parts. Two long weeks of waiting followed, then the assembly part started!
Here is the PCB after soldering some resistors in:
The resistors, LEDs, caps and the crystal were pretty easy to solder. Use a good, branded soldering iron and 0.5 mm solder wire. For hobby use, lead is fully acceptable because it flows to the pads on its own.
The TQFP microcontroller was really hard to solder.
In my first atttempt, I didn't get the contacts on MOSI and SCK right,
but after microwaving the board for three seconds (no joke!), everything worked well!


Now the mechanical treatment of the of the picture frame followed.
I drilled holes and expanded them until the small switches fitted in.










After also drilling holes for the power supply,
I fitted the board into the frame. The three buttons for time setting flew just around.
With a lot of hot glue (a sacrifice for the science ;-) all was in place and ready!
The power supply is a 2W capacitor power supply with a european plug.
Now coding started. For AVRs, I recommend the AVR studio with the GCC plugin!
I use the 16-bit timer 1 to generate a secondary pulse out of the core frequency of 32.768 kHz.
The clock counters aren't any special, three registers for hours, minutes and seconds.
I used the ADC, and this is kind of special because it is claimed in the datasheet that the ADC just works in frequencies higher than 50 kHz. Due to the reason I only use the MSB for checking the brightness, it works really well!
I do software PWM to get one tenth of the brightness of the LEDs in dark surroundings.
The last part was to put all in place and then it was ready.
 Here are some pictures:
It is pretty hard to get it on camera. Either you get the bright flash or the LEDs disturbing the image.
The best image was captured when I got my fingers in front of the flash:
I hope you like it!
Here are the links:
Schematics
Layout
Code
HEX-file

Look in again!
\apexys\toan\12062010\1844