Freitag, 26. September 2014

Annoying Last Xmas Picture Frame

I've build this to make people in my office happy :)

The idea is to built something like this "days without accident" panels.
Each time somebody will push the button, the counter resets and Last Xmas will play.

This is how it should look like

And here is the result

I took one of this IKEA 3D Frames and took it apart

A 4mm Plexiglas panel and a DinA4 self adhesive paper,
with printed Text on it

I used the toner thermotransfer methode to make the PCB's

 I made 2 PCB's. One for the counter electronic with the CPU, and one for the MP3
module WTV020-SD-16P and the amplifier
The counter increments each 24h.

A piece of red plastic foil for the display and a piece of Mosquito cover for the speaker (with a few test holes :) )

All fixed inside

The counter reset button

Finished Frame

And finally installed in the Office :)

Montag, 14. April 2014

Underwater Camera

Cutting a hole in a waterproof junction-Box

silicone glue

Cutting plexiglas discs

Plexiglas sliders for furniture

 all glued in the cover of the  junction-Box

 a backplane made of wood

finshed front part

 from the back

everything mounted with the silvercrest cam and a 9V block batterie

Lights on

First waterproof Test

Mittwoch, 15. Januar 2014

Ultrasonic Sensor HC-SR04 Microcontroller Test

I'm trying out the Sensor HC-SR04 Modul.
First of all I had to figure out, how it works.

As you can see it has 4 pins.


Here is how it should be controlled:

Send a 10us impulse to trigger pin.
The module will send 8 ultrasonic impulses.
The echo pin goes high for 100us to 25ms, depending on the distance to the object.
If there is no reflecting surface, the echo pin goes down after max. 30ms

Here my test setup:

A little video:

And the Bascom code:

Config Pinc.0 = Output
Config Pinc.1 = Input
Dim A As Long

 Pinc.0 = 0     'Trigger 0'
 Waitus 2
 Pinc.0 = 1     'Trigger 1'
 Waitus 10      'wait 10us'
 Pinc.0 = 0      'Trigger 0'

 If Pinc.1 = 1 Then Gosub Outlcd                            'when echo goes high'


 A = 0
 A = A + 1
 Loop Until Pinc.1 = 0                                      'count until echo 0'

 A = A / 30                                                 'divide value by 30 to get it nearly in cm'
 Lcd A
 Waitms 500



Dienstag, 7. Januar 2014

Led Matrix 8x5 with Shift register and Shiftout

The Bascom code

Dim S As String * 8
Dim U As String * 8
Dim L(6) As Byte
Dim A As Long
Dim B As Byte
Dim C As Byte
Config Portb = Output
Config Portc = Output

Clock Alias Portb.1
Outdata Alias Portb.2
Latch Alias Portb.3
Srreset Alias Portb.0

Srreset = 0
Srreset = 1

L(1) = &B0010000
L(2) = &B0111110
L(3) = &B1111110
L(4) = &B0111110
L(5) = &B0010000


For A = 1 To 7
Portc = 1
For B = 1 To 5

Shiftout Outdata , Clock , L(b) , 2 , 8

Latch = 1
Latch = 0
Srreset = 0
Srreset = 1
Waitms 20
Latch = 1
Latch = 0
Rotate Portc , Left
Next B

Next A
For C = 1 To 5
Rotate L(c) , Left
Next C