Electronics

One of my other "interests", is "electronics". I bought myself some books about electronics, and learned everything on my own.
In the meanwhile, I became an Elektor member, which entitled me of receiving the monthly "Elektor" magazine. (see www.elektor.nl)
I use Eagle CAD to create my own schematics, and made my own PCB's with the "wiring method", and sometimes I even etched them !

In the Elektor december-edition of 2006, there was an article about "Profiler". A small CNC machine, able to mill and drill PCB's,
(and a lot of other interesting things), that's when my "inspiration" began to grow ;-) I was not only able to create PCB's (Printed Circuit Boards),
but was also able to make some mechanical things and even housings for my electronic projects. (see the CNC section on this website

Stairs controller - project on demand (Thursday - december, 9th - 2010)

I got a request for a project on demand, and I agreed, because I can also use this device for something else :-)
A few weeks ago, "someone" asked me to build a stairs-controller. He wanted to put 10 bright LEDs into the side of his stairs, and wanted
the LEDs to go on/off automatically, when you go up/down the stairs. (and also taken into account if there is enough light in the room or not ...


The main board to control the LEDs in the stairs :-)
The middle-left connector connects to 12V
The bottom 12 connectors, are for 12 LEDs/lamps. 12V - 2A per output (without extra cooling)

About the request:
- He wanted the LEDs to turn on, one by one, in the upper direction, when he walks up the stairs.
- When he walks down the stairs, the LEDs need to be turned on, one by one, in downwards direction.
- sensor on top and bottom of the stairs, are my already designed, laser-beam cross detectors.
- When there is enough light in the room, the LEDs do not need to be turned on, only if it's dark enough.

- When you go upstairs (or downstairs), and you change your mind, the LEDs go off about 2 minutes after this, starting in the middle.
Because I think other people are also interested in this controlled, I made everything configurable.
I created a small board, which I can put onto the main controller, to do some programming. A small 2x16 chars LCD and some pushbuttons makes life easier :-)


The programming board attached to the main board (can be taken off after programming the main board)


Light sensor, can be attached, can be attached to the topleft green connector on the main controller.


Laserbeam cross detection, 2 of these can be connected to the right connector on the main controller.
Please look in the Model Railroad section, for more info about this detection module.

When you put the programming board onto the main controller, a menu appears on the small LCD, the following parameters can be changed by the pushbuttons:
- number of outputs to use (min = 2 - max = 12, but if you have a small stair, I can imagine that you have enough with 6 outputs)
- time between LEDs to go on/off, in milliseconds. (min = 1 msec - max = 2 sec) the LEDs turn on/off smoothly/slowely, taking up the whole time between 2 LEDs.
- time-out value (to automatically turn off the LEDs - min = 1 sec - max = 240 sec)

As you can see, this is a highly configurable module :-) Please contact me for more info, or if you want one :-)

An RGB-LED clock for my wife :-) (Thursday - december, 9th - 2010)

Aah, finally another nice project :-)
We already have a green 7-segment LED clock in our living room. Those digits are 10 cm high.
Christel asked me to build another clock for the master-bedroom, and it "escalated" a bit :-)
The green clock from the living room, will move to the bedroom, and a new clock will be installed in the livingroom.

Before I started designing, I asked Christel what she really wanted, and this is what she came up with:
- multi-color (so, I need to use RGB LEDs, which makes the design a bit more complex.
- bigger digits (just use more LEDs to solve this, LOL)
- remotely controlled.
(I solved this by embedding bluetooth in the design, so I can write some software for her smartphone, IPAD or wathever bluetooth-enabled device)
- She also wanted (just like the green clock), hours/minutes/seconds and not only hours/minutes (which results in 150% workload instead of 100%)
- double dots between the different time-pieces (resulting in 2 extra PCBs)

This clock is almost done, I only need to mill the maincontroller and solder it, and write software for it :-)


Overview of what is done: 6 digits and 2 double-dots PCBs finished, and digit-enclosures milled out of 8mm MDF.


Closeup of one digit: 7 TIP122 for the 7 segments, 105 resistors (3 resistors per RGB LED, 5 LEDs per segment, 7 segments)


Bottomview of the same digit: upper connector is for driving the 7 segments, lower connector is for the 3 colors and the power of the digit.


Topview of a double digit, holes in the MDF are not yet drilled.


Bottomview of a double digit, one connector is enough for the power, colors and on/off of the LEDs


Double-dot installed, in between the hours and minuts digits


This board controls 2 digits and 1 double-dot, so I have 2 of these boards.
(they connect with the flatcable to the main controller)


One digit-controller connected to 2 digits and a double-dot ...

To be continued ...

How it began - clocks

First of all, many years ago, I started building my own home automation system. I automated my whole house !
Light went on and off automatically when you entered or left a room, music did "follow" you trough the whole house. You could see who was calling,
by watching wall-mounted LCD's (which showed info about the caller, and if possible, also a picture). The system also served as a security system.
Coffee was ready when you woke up in the morning, You could fill the bath-tub, by sending an SMS to the home server etc ... etc ...
Because I was/am a software-developer, the system mainly consisted out of very "easy" electronic parts. The "logic" itself, was running on a regular PC.

After leaving this house, with my ex-wife and daughter still in it, it was time for something new.
I met a new (lovely, honestly & cute) wife, and we started a new life together.
We bought a shop, and converted it in "loft-style" to our current home.
(There is no home automation in it for the moment, because otherwise we still would not live in here, but plans are made to integrate some nice
homemade home automation in the "near future" ...)

Ooh well, onto the "next episode" about my electronic experience, it was time to learn some "real skills" ...

One of my "obsessions", is "time". That's why we have a lot of clocks at home. So, it is unnecessary to tell you, that all my first projects, are all based on
creating interesting looking clocks ;-) Mainly because the electronics for a clock are pretty much straight forward, and because I started using microcontrollers
in my projects, also the software for those clocks is easy to start with. (as a software-developer, learning a new programming language)
So, after a few months, I did build quiet a few "unique" clocks ...


My very first selfmade clock, with digits that are 12 CM high.

The PCB itself is made using the "wiring method". (e.g. putting components onto a PCB with holes, and connecting parts with wires)
- We can adjust the clock with a regular TV remote control.
- You can set the "on" and "off" time for the clock, so it turns itself "on" and "off", at the given times.
- It can also be used for "newyears" countdown. (the clock counts backwards till midnight)
- It uses a PIC16F877A microcontroller.


The second clock I made. Still using the wiring method.

- The clock consists of 6 glas bulbs, with wirings in it, to form digits, under the bulbs I mounted blue LEDs.
- Those glass bulbs are names "numitrons".
- It also show the temperature (using a DS1820 one-wire temperature sensor from Dallas Semiconductors)
- With a few buttons at the back of the clock, it can be adjusted very quickly.
- It also comes with the on/off features of my previous clock, so it is automatically turned of during night-time.
- It also uses a PIC16F877 as the "brains".


A bit more challenging then my 2 previous clocks, was this "baby" ;-)

- It uses several different voltage-levels to power the glass tube. (IV-26)
- This clock is adjusted with a regular TV remote control.
- I'm still used the wiring method for this clock.
- In the meanwhile, on/off features, brightness control etc ... became a standard feature of my clocks ;-)
- It uses a smaller 18F876 as "the brain".


As you can see, things are becomming better and more complex.

- This clock uses nixie tubes, which needs to be powered at about 190V.
(the clock is powered by a 9V wall adapter, and a small circuit pumps this back up to 190V, Using 220V directly and convert that tot 190V, causes a serious security and health issue)
- I used a milled PCB for the first time in one of my projects.
- This was the first time that I use "high voltage" in my projects.


Mainly out of "curiousity", I made this "prototype".

I connected a 128 x 64 pixels graphical LCD to a breadboard with a PIC16F877 on it.
I wrote the code for this clock in PicC, and it was mainly to get a feeling with GLCD's,
and to polish-up my trigoniometry.

RGB color fader - a small "in between" project

After a period of "building clocks", it was time to move on ...
While spending our holidays all troughout Germany in 2007, We also visited Legoland, were they can laser-engrave a 3D picture in an acrylic block.
We decided to have a 3D picture of us, and once we came home, I decided to make a "frame" for it, to lit it up by RGB LEDs.
So, this is how the RGB LED fader came to live ;-)
I designed the schematics and PCB in Cadsoft Eagle, the housing in AutoCAD, and the coding of the PIC was done in PicBasic Pro.
You can download the Eagle Schematics and PCB and a HEX-file and the sourcecode for the PIC from my skydrive section.


This is the housing for the RGB fader. Completely milled on my CNC machine.


The bottom of the PCB, the button is for changing color patterns, which I programmed in the PIC.


The top of the PCB, I used an ULN2803 (a bit of overkill, but I only used spare parts which I had laying around) and a PIC12F675.

Cube@Home - A 3D LED cube

Because my knowledge about microcontrollers became larger, I became "hungry" for a slightly larger project.
I allready saw several 3D LED cubes on the internet, and I wanted to build one for Christel ...
So, I did design the schematics, PCB, software and housing all by myself.
I can control this LED cube with a universal remote control (the same as I use for my clocks),
and there is also an RS232 connection, which can be used in conjunction with a Winamp plugin, or can be used for live preview, when creating animations.
There is also a PC software which I wrote, for creating animations, and animations, including scheduling, can be put on an SD-card, and inserted into the cube.
As usual, all software, schematics, documentation, plugins and PCB's, can be download from my skydrive section.


The LED cube in action. The LEDs are soldered in an 8x8 matrix (X,Y-axis), with 8 layers (Z-axis) and are mounted onto a mirror.
We only need 128 wires to control 512 LEDs !



A closeup of the LEDs mounted onto the mirror. I drilled 128 holes in it, with a regular iron 1.5mm drill, in my CNC machine.
(Don't mind the dust on the mirror)



This is the front of the base of the LED cube, with a 4x20 alphanumeric LCD in it. (to show date/time, and to navigate trough settings, setup etc ...)


Backside of the base, with the 230V socket, the RS232 connection, and some venting holes.


The inner "guts" of the Cube. Powersupply on top, LED Matrix controller in the middle, LCD on the left, 12V fan on the right,
and the main controller on the bottom.



The main controller, you can see a PIC18F4550, some LEDs, a piezo speaker, a DS1307 RTC accompanied by a DS32Khz crystal,
a DS1802 temperatur sensor, and the connector to the SD card.



screenshot of the PC application.

-Topleft you see a 3D representation of the 3D cube.
-On the bottom is the layer editor, you can turn LEDs on/off individually on every layer.
-In the middle is the actual animation. (Every frame consists of 8 layers)
-Topright is the infoscreen, you can also use this to make a realtime connection with the Cube during editing.

DANGER - HIGH VOLTAGE ! - Triac board

I stumbled upon a real bargain on internet. 200 Triacs for about 12 euro, including handling & shipment !
Those babies are able to drive 4A at 400V, so I couldn't resist, and ordered these Triacs. (With some christmas-projects in mind)
I decided to build a Triac board, with 8 outputs, opto-isolated. This board is really "plug and play", and can be directly connected to microcontroller pins
on one side, and to 230V pheriperals on the other side.
As allways, the schematics and PCB in Eagle format, can be downloaded from my skydrive section. DISCLAIMER ! USE AT YOUR OWN RISK !


Top side of the triac board. This is a snubber-version ! (note the optocouplers on the bottom also)


Bottom side of the triac board. This version is a "lite" version ! (only to be used with low-consuming pheriperals)

128 x 64 pixels - Giant LED display

As you would have allready guessed from previous projects, I really love LEDs ! No Really, I really do ! (and even this is still an understatement)
I allways wanted a giant LED display, to hang on the frontwall of our house, during Christmas season, to show some peace and joy in our neighbourhood.
Because these things are really expensive (about 10.000 euro for such a huge display), and I'm even sure that this would not cover all the features I wanted,
I decided to build one myself, for less then 1/10th of the original price ;-)
So, I ordered about 9000 LEDs from Leds-Buy, 128 pieces of MAX7221 of Maxim-IC, 16 blanc-copper eurocard PCB's, lots and lots of wire,
a few hundred resistors and capacitors, and I was started with this project ...
A very close friend of mine, does work in an iron factory, where they make iron sheets. He arranged a few sheets for me, with perfect holes in it.
The holes are spaced 1.5 centimeters apart, and a few microns smaller then 5 millimeters, so I really need to push the LEDs in the holes, this is just perfect ;-)
As usual, all Eagle schematics, PCB's, software, firmware etc ... is available trough my skydrive section.

Front view of one of the three panels. This is the lef panel.


Back side of one of the panels. I soldered the LEDs in 8x8 matrixes, anode in the horizontal direction, kathode in the vertical direction.
I have 8 rows of 8 LEDs underneath each other, which makes up the 64 pixels in vertical direction.


So, I created a LED controller board, for every row, which makes 16 PCB's. (128 LEDs width, gives 16 groups of each 8 LEDs in width).
Each controller board is able to drive 8 groups of 8x8 LEDs, so one PCB is enough for 8 LEDs in width, and 64 LEDs in height.


This is how the bottom of a controller board looks like ;-)


And this is the top side, with the 8 MAX7221 IC's, 9 resistors, a few wire bridges and a LED. (the 8 capacitors are soldered underneath the IC's)

I also needed a main controller, to drive these controller boards. I did choose for a "versatile solution".
A main controller, with a graphical LCD (128x64 pixels), a small keypad, a USB connector, an external control-ability, and an SDcard slot ...


Front view of the main controller.

On the right is a small keypad, to navigate trough the menu, and to make selections, do setup etc ...
On the left, is a graphical 128x64 pixels screen, which shows animation-information, info about settings, and date/time.
Behind this, are 2 PCB's, (everything is "sandwiched" together between 2 acrylic plates), with a RTC, temperature sensor, a 18F4550 PIC microcontroller,
an SD cardslot, a USB connector, some LEDs, and 2 network connectors. (one to connect it to the large LED display, and one for "external control")


Right side, you can see clearly the "sandwich" construction, which holds everything together, and the USB connector.


A bit unclear in this picture, but this left side contains the SD cardslot.

I also wrote a PC software application, a bit like that for the 3D LED cube, which allows you to convert image-sequences, animated gifs, and movies,
to a format which can be "understood" by the main controller. After creation, you can put the animations, along with a schedule, onto an SD card,
and put it in the main controller.
The USB connection is used for "live preview" during editing of animations.

So, what's next ?

Because I finally have place and time for a real modelrailroad, I mainly focus on this for the moment.
I'm currently in the process of developing my own turnout-controllers, light-controllers, and block-detection system.
All this needs to be compatible with the Marklin Motorola protocol, so I can use it with Mr-Direct and Koploper software.