Saturday, December 24, 2011
Thursday, December 22, 2011
IntroductionSome time ago I was donated a non-working LG L194WT-SF LCD monitor for parts. After a couple of months of collecting dust with it I decided to have a look at it from the inside. Since the monitor has been at a repair shop and was declared beyond repair, I thought I had nothing to lose- best case scenario, I fix the monitor and can use it or give it away in the future, the worst case scenario, I see what components are inside in such a piece of hardware and I might be able to salvage some parts for my projects.
Sunday, December 18, 2011
IntroductionThis little project was one of my first projects with microcontrollers. First, I made the circuit then, for years, I was wondering what I could do with it, until one day I came across this IKEA plastic bag dispenser. I knew immediately, it would make a perfect “housing” for my mood light.
|The finished "cloud" in front of some more IKEA furniture|
Sunday, July 10, 2011
IntroductionI usually make a custom PCB for my electronic projects. Throughout development the PCB, however, changes several times. Making a custom PCB at each stage is not practical for several reasons including price, long waiting times between versions and being very wasteful. For all these reasons I use a test board/breadboard/prototype board that can be changed easily and instantly before development reaches a final stage.
|The finished blob is comfortable seated in a test board.|
Friday, March 25, 2011
IntroductionI have always been fascinated by photographs about lightnings. While it is relatively easily to put a lightning strike in any photograph using image editing techniques :) I still prefer the real thing. Since photography is a hobby of mine, I wanted to be able to photograph lightnings. However, when I tried to do it without any specialized equipment, I didn't have much success.
|The finished product.|
I don't like the knob on the potentiometer, I just put it on for the sake of the photo - who knows when I will find a nicer one...
Thursday, March 10, 2011
IntroductionA friend of mine who has been studying journalism asked me to create an internet radio station to complement his web site where he publishes his own and fellow students' articles. The radio station would be set up in his basement and would provide streaming radio 24/7. From time to time he would do live shows with interesting people invited to the studio and listeners calling the show for discussion.
|My friend hosting a show|
Tuesday, March 1, 2011
IntroductionThis is an old school circuit - I made it (with the help of a friend) in 1987, when I first started out in digital electronics. At the time there were no PCs - or at least not for the average person in Hungary. So all the planning was done in paper. The proof is the following photo :) :
|No computers were harmed in creating this circuit :-)|
A short video demonstrating the features of this circuit:
Sunday, February 13, 2011
IntroductionThis digital clock displays the time in binary format. Binary clock s have become very popular recently, many hobbyists create their own version of it and they are even available commercially. To decode the time you need to be familiar with the binary number system and have to decode it pretty fast, before the time changes :-).
Note: If you want to build this circuit and need help, please let me know - I can provide you with any or all the parts for this project, including a preprogrammed PIC.
Saturday, February 12, 2011
IntroductionEver since I got my first smartphone, I wanted to make a stand/holder for it because most of its time it spends on my desk. There are plenty of smartphone designs available on the net, but I wanted to reuse some pieces of hardware I already had and also give it a personal touch. Finally, I came up with this design - I think this is the first of its kind:
|Please meet the SmartPhone PCB Stand!|
IntroductionDuring the development of embedded projects debugging sometimes can get difficult. There are a number of ways to help troubleshoot problems - a scope or a logic analyzer go a long way narrowing down the problem (although a bit expensive for the hobbyist), a serial connection is extremely useful (but needs a PC). A dedicated debug screen is also an easy and cheap way to make sure variables/levels/counters/peripherals do what they are supposed to do. I created this simple 6 digit 7 segment display out of inexpensive materials that only use 3 pins of the microcontroller and can display information in human readable format. The display module can be used with any microprocessor/microcontroller and can be used as an actual display for other projects that need to display data on 7 segment displays.
SchematicsThe design is based on the 74HC595 CMOS Serial-In-Paralel-Out shift register. One shift register belongs to each 7 segment display (7 bits for the 7 segments + 1 bit for the decimal point). The data displayed is fully static, not multiplexed. As you can see from the schematics there are two connectors on the board: CN1 is the port where data comes in (normally from a microcontroller) and CN2 is an output port that can connect to another similar board. In theory, many display modules like this can be daisy chained to make up a longer display.
|Jumper JP1 allows the use of common cathode and/or common anode 7 segment modules of your choice.|
Capacitors C8-C13 are only needed if a great number of such modules are chained together at higher frequencies. I use mine as a single module with a 8 MHz PIC micro with no capacitors and have never observed any problem.
Board, hardwareSince I wanted to use the same circuit for a clock project as well, the first step in designing the board was to find 7 segment displays I liked. After some browsing I found one that I liked. It comes in several colours and in common anode and common cathode versions. I got some red and blue, common cathode versions. The size of these 7 segment displays defined the overall size of my board. The size of the board is exactly the size of 6 of these displays next to each other. Looking at it from the front you can't see the board, just the displays.
|Front view: Note the PCB is the same size as the total area of the 7 segment displays|
|Back view: All the SMD parts are on this side|
|Side view: In this prototype I used IC sockets for the 7 segment display modules, but they can be omitted in a final module and the displays can sit straight on the PCB.|
ConclusionThis simple circuit is an excellent way to add some debug functionality to any microprocessor based digital circuit. It can display basic information about almost anything that goes on in the microprocessor. In a daisy chained configuration, although there are some limits to the number of devices chained together, the displayed information doesn't have practical limits. The module can also be used as the main display module of a particular embedded system that requires many 7 segment displays as a display device.
Introduction"A good technician has 3 hands - it is the fourth one that's missing sometimes." I think the famous proverb sums it up: Many times there are many, possibly tiny, parts that need to be balanced in an awkward position with one hand, while using a screwdriver/pliers/tweezers/soldering iron with the other one. This often tries even the most patient ones. And I am not one of them. After many trials and failures I ended up with this design that seems to work for me.
|The finished product with 3 hands|
Bill of materials
- A big chunk of wood in the desired size - I went to the local carpenter shop and checked what scrap material they have. I found in the corner (under a pile of waste pieces waiting to be thrown away) a leftover piece of a kitchen's working surface. It's 4 cm thick, made of compressed chipwood with a "nice" coating to fit someone's kitchen. I had it cut to a 20 cm * 30 cm rectangle. The resulting piece is small enough to be portable (in my extremely limited working corner nothing is permanent) yet heavy enough to be not wobbly when working with it. This is very important as I had found out by using other, lighter designs.
- A few pieces of Multi Direction Plastic Water Oil Switch Pipe Adapter . I used 3 pieces in my design but you may want to use more or less. Make sure you get the ones that have a screwy end at the bottom. The advantage of this kind of pipe is that it can be tailored to ones needs. You can any time add, remove sections of it, change the endings etc. - the limit is your imagination.
- Alligator clips for the end of the pipes to hold whatever you may want to hold. It can be a PCB, some wires or a magnifying glass.
|Close-up of the hands|
- Drilling machine with drill bits matching the diameter of the pipe adapter's bottom section.
- Pliers to help screwing in the bottom sections into the wooden base
- Mark the place where you want the pipe sections to be based on the wood. Don't put them too close to the edge - the chipwood won't last that way. I found that a distance of around 2.5 cm is sufficient from the edges.
- Drill holes for the base sections in the wooden base. When drilling big holes I always start with a small drill bit then work my way up to the desired diameter. The bottom of the pipe section I used is 12.5 mm, so I drilled 12 mm holes for them. This will allow them to be screwed in easily with pliers (remember, it's a very soft material).
- Screw in the bottom pieces in the holes. If needed, use a pair of pliers.
- Insert the alligator clips into the pipe endings. You may want to use pliers to adjust the diameter and shape of the alligator clips you have. If needed, you can also apply some hot glue or other kind of glue to secure it in place.
|The first section of the pipe after the bottom piece is a tap. I don't use it in this design but left it there to add extra length to the assembly.|
IntroductionSome time ago I came across a website where I saw a novel way of showing the disk activity of a computer. I liked the idea very much and decided to make one on my own. Since the working of the circuit is explained in detail and very well on the original web site, in this entry I focus on the implementation.
This is a demonstration video of the finished gadget demonstrating slow and fast movements as well:
CircuitI took over the schematics from the original web site with minor differences:
- I used a 210 ohm current limiting resistor, so the LEDs and the output driver of the 4017 are safe.
- I used a PC817 optocoupler to separate my complete circuit from the PC, because I had a few of these at hand already. It doesn't really matter what optocoupler you use as long as its internal LED's electrical parameters roughly resemble the LED used on the PC's front panel. You can go through datasheets to make sure all is OK, or simply try it.
- Although the schematics says C1 is 470 nF (and it does work very well with that), I ended up using a 100 nF capacitor because I couldn't find any bigger than that in SMT. I thought, that if it's not enough, I can still solder an extra capacitor on top of it. Luckily, it works perfectly with the 100 nF one.
|Schematics of my Spindicator|
ImplementationFirst, in fact, the moment I saw the original web site, I put together the whole circuit on a test board to see if I really like the results. I did. I also experimented with several different values for R1 and C1, but no other combination gave me better results, so I just left them as they were in the original.
After I was happy with the way it worked on the test board, I designed a PCB for it. To save space and manufacturing costs I used all SMT parts for the resistors and capacitor. I couldn't find an SMT version of the 4017 IC, so that and the optocoupler (and the LEDs) are TTH (through-the-hole) parts. Since I had an idea on how big circle I want to arrange the LEDs in, it didn't make much sense to further miniaturize the board - all the parts fit in the area under the circle (well, the smallest square around it anyway).
Assembly, part 1First, I checked the board for short circuits and incomplete wires. This is good practice, since it is a LOT easier when the board is empty than when it is populated. Next I soldered on the SMT parts: R1, R2, C1, then the IC and the optocoupler. I rarely solder in ICs into PCBs, but since this circuit is soooooo simple, I decided that it WOULD WORK straightaway. (I got lucky this time :) )
|Bottom view after all the parts save the LEDs are in place|
|Top view before the LEDs are inserted|
Assembly, part 2 (preparing holes for the LEDs)This step really depends on the actual faceplate one wants to install the Spindicator behind. I found an old CD with some drivers that I don't need any more.
|This is a small, 225MB CD that came with some hardware.|
|The CD with 10 holes - the marks won't be visible at the end|
|The punched CD from the bottom - this will be the face of the device|
Assembly, part 3 (mounting the LEDs)
Mounting the LEDs is a bit tricky, but since I have built similar "display devices" in the past, I had an idea how to go about it. If you have a better idea, please share it in the comments area!
First I inserted each LED in its own place in the PCB. When I designed the board, I paid special care to two things:
- The LEDs are arranged in a way (in a circle) that there will be no extra cable used to connect the board to the LEDs.
- Since LEDs are polarity dependent, I designed the board so that all LEDs "look" the same direction, i.e. the cathode of each LED is on the right. This makes assembly time errors less likely.
|The LEDs are well adjusted|
|All LEDs in place, telephone cable soldered in|
Assembly, part 4 (cables to the PC)I planned to have this "Spindicator" placed on my computer desk. For this reason I needed fairly long (~1 meter) cables. There are four cables needed altogether: power+, power-, HDD activity LED+, HDD activity LED-. To avoid having to use multiple threads, I decided to use an ordinary telephone cable. I had plenty of 4 wire telephone-modem cables (RJ-11) in the cables section of my junk... I simply cut off the two ends.
For the PC end of the cable I soldered on some female headers for the HDD LED connection and repurposed an old PC power cable (the red-black-black-yellow one) for the 5V. On the other end I simply soldered the cables into their designated locations on the PCB.
|The big blob is some hot glue I used to strengthen the connector, which otherwise tends to fall apart...|
Assembly, part 5 (housing)I haven't put the whole thing in a housing or box yet, so this section is going to wait a bit until I figure out what to cover the assembly with.
SummaryThis is a great beginners' project for several reasons:
- No difficult circuitry
- Small number of cheap and common components used
- Components have wide tolerance, it's difficult to damage them.
- Once the optocoupler is in its place, the PC cannot be harmed since it's decoupled from the rest of the circuit.
- Can be assembled in less than an hour (on a breadboard, or further time needed to make or order the PCB)
- Only 3 SMT components (6 pads) to solder, but can be easily converted to TTH design
IntroductionDefinition (from Wikipedia): A rotary encoder, is an electro-mechanical device that converts the angular position of a shaft or axle to an analog or digital code.
I have been playing with a device like this for some time and thought I'd share what I learnt. I am not going to describe the theory of rotary encoders, there are plenty of places on the internet that have done an excellent job doing that. I will rather focus on its real life application complete with a working sample circuit with assembly code.
Having read a lot on the theory of its operation I was sure it was something easy and straightforward to implement. However, when I tried it I failed miserably. After hours and hours of experiments, research on the internet I found out out that my test circuit was working correctly, but my code was incomplete.
The test circuit
|I created the circuit on a test board|
The rotary encoder is connected to PORTB, which is configured to use its built-in pull-up resistors, further reducing the number of external components. To help debouncing a 100nF capacitor is used paralel to each pin of the rotary encoder. Further debouncing is done in code.
The feedback is built with a Serial-In-Parallel-Out shift register (74HC595) and an LED strip. I could have just used some LEDs directly connected to the microcontroller, since we have plenty of free I/O pins, but I used my own LED strip to make the test board simpler.
As always, I used an ICSP interface to program the PIC, greatly reducing the development time of a new application.
CodeThe code was written in assembly, compiled with the MPLAB IDE 8.5 built in compiler.
All we need to do in the main loop is to poll the lines from the rotary encoder to see if they have changed:
;check rotary encoder - left
;check rotary encoder - right
The following are the routines used for deciding if the rotary encoder was moved indeed (debouncing) and also to carry out any actions as necessary when the rotary encoder was indeed rotated:
; ------------------------------------------This last part (Encoder_RotationEnds) is the one that I was missing from my code. Thanks to this excellent site now my test board works. I already used the above circuitry and code in actual projects and they work great: the rotary encoder never skips a step, and never gives extra steps.
; rotary encoder routines
bcf STATUS, C
btfsc COUNT, 0
bsf STATUS, C
ConclusionRotary encoders are simple to use user input devices that can simplify user interface significantly - think of menu systems, etc. I am sure I will use them in many projects to come.
IntroductionI found a small project at another site about fading an LED in and out smoothly, without a microcontroller. I changed it a bit. In my version I removed one of the transistors and changed some resistor values. This is supposed to result in lower costs and smaller footprint. I know it's a very small difference, but still.
The circuitIn default state (when S1 button is depressed) capacitor C1 is discharged, so transistor T1 is closed, hence the LED is off. When the button is pressed, C1 gradually charges, which gradually opens T1 lighting up the LED slowly. When the button is released, C1 discharges through R1-R2, slowly closing T1, gradually fading the LED. (If we omit R2, the discharge process would take forever a very long time.) By changing the values R1, R2, C1 one can change the speed of fade in, fade out. The given values result in roughly 1.5 second for both fade in and fade out.
|The simpified circuit|
IntroductionThis project involves creating a bench supply from an old ATX power supply. The resulting bench power supply provides +5V DC, +12V DC, and, optionally, a variable voltage ( +1.25V .. +10.3V DC) power source for the hobbyist.
Probably a good beginner's project, since this project is, although a bit time consuming, if you want to do it nicely, very straightforward, hard to mess up. I had most parts already in my Big Basket of Junk: an old ATX power supply, a pretty large (electrician's waterproof) plastic box, banana plugs & sockets, LED Volt meter unit, etc. I only had to get a small PCB done for the variable voltage part. Although I will include it in this page, if you only need 5V DC and 12V DC, you can skip the next part.
Variable voltage circuit
I found this basic circuit somewhere on the internet. I only modified it to contain an LED, meter, etc. It uses an LM317 in a datasheet configuration with only a few external components. It is able to provide current upto 1.5A from 1.25V to 10.3V with an input voltage of 12V (taken from the ATX power suply). I designed a dedicated PCB for the circuit. It worked for the first time. I also put a heatsink on the LM317, just in case. At and above 1A it starts getting hot.
This is the front view of the PCB I had made:
You can see it's very simple - could be done easily at home if you are into this stuff.
AssemblyI had an electrician's waterproof plastic box (the one that can be put outside in the rain) I had no use of. Although a bit too big for this project, it was easy to work with: since it is made of plastic drilling/cutting/filing it was no difficult. It also came with some holes or mounting points which made it easy to mount the different modules to it. Steps I took to build the power supply box:
1.Using the mounting holes in the box I mounted a piece of plexiglass that I had already cut to size - this made mounting all the other modules easy as I could drill mounting holes on the plexiglass whereever I wanted.
2.I removed the PCB from the ATX power supply. In this step I also desoldered the mains connector. This step is not necessary, but it saves a lot of space in the box.
3.I mounted the ATX power supply on my main board (see step 1).
4.Right next to it I mounted the fan of the ATX power supply.
5.I drilled many 6mm holes on the side of the box so that they are aligned with the fan.
6.I mounted the variable voltage module in the free area of the main board.
7.I created a weird shape hole at the back of the box for the mains supply connector salvaged from the ATX power supply. Although this hole came out perfectly (the socket did not come out on its own) I secured it with two screws, just in case.
8.On the front panel of the box, I measured and drilled holes for all the banana sockets, on/off switch, on/off LED, LED display, potenciometer I wanted to have. When ready, I populated the holes with the corresponding hardware element.
9.Last step is to wire up the "UI" with the "back-end".
Finished lookThis is my finished bench ATX power supply:
|Front and side: you can clearly see the ventillation holes on the side. Not so clearly, or hardly at all, the display actually says something, but it's not visible because of the flash used.|
|Back: The standard computer mains cable connected|
|Inside - UI: Here the connections are visible.|
The whole process took me one day, including cleaning up afterwards :-)
IntroductionWe have a timer in our staircase that controls the light after dark: when someone presses a button (a button is located on each floor) the lights light up for a preset period. Lately, the timer in our staircase light has started to behave weirdly - no matter what settings we used, the ON time kept shrinking. By now, not even the fittest can make it after dark from one button to the next while the lights are on. Instead of buying a new timer (for about €5 :-) ) I decided to make it a learning project for myself, as I have been learning PIC micros for a while now. This way, while learning, I also create something useful - for a price that is about 10-15 times higher... The difference is the price of education :-)
MaterialsMost of the hardware parts I purchased online, through eBay although I am sure all the parts are usually available in any local hardware/electronics/DIY shop. The problem form me is that there are no such shops in the vicinity of my home.
This is a non-exhausting list of the components used (apart of the electronic components in the circuit). I may have missed an item or two, but the whole list is fairly obviuos.
- 1 * plastic box (12 * 15 * 6 cm approx) with metallic parts for wall mounting as the project box. Since dedicated project boxes are ridiculously expensive in my area and/or the shipment is very expensive from abroad, I had to settle for this box that is sold as housing for electrical installations. It's not airtight and it has a big window on the front which I had to cover with a scrap piece of plexi glass I had lying around. It would certainly look better in a "proper" project box, but it does the job and in normal operation it will be out of sight anyway.
- 3 * pushbuttons for testing purposes (up, down, test)
- Assorted cables, connectors as necessary
CircuitAt the heart of the circuit is Microchip's 16F628A microcontroller. I chose this microcontroller because it is cheap and I had used this previously for other experiments and had some already.
The 16 (red) indicator LEDs are driven from 3 pins of the PIC using SIPO shift registers (74HC595).
There are also a green LED (power indicator) and a blue LED (state of the relay).
Since most components I used are SMT, I also included an ICSP header on the PCB so that I could program and reprogram the PIC after it has been soldered to the board.
The schematics can be downloaded from here:
SoftwareAs one of my first projects (learning PIC micros as we speak :-) ) the software is not very elegant, to say the least. There are no interrupts used, the microcontroller never sleeps, constantly polling the buttons, etc. I am
The software was written in assembly, using Microchip's MPLAB (it's not the most user friendly IDE I have seen, but it's free). The compiled code for the 16F628A can be downloaded from here: stairlight_v1.0.
OperationWhen powering up the device first does self check - it lights up all the indicator LEDs one by one, then turns them off one by one. Then for a few seconds it switches on the staircase lights just to show that the relay works OK and all the connections are satisfactorily.
After the initial self test the device enters a waiting mode. In this mode the user may change the length of the ON time for the lights by pressing the UP and/or DOWN buttons. With each push one indicator LED gets switched on/off. There are 16 LEDs in total. At the moment it is programmed so that each LED means 15 seconds of ON time. This means the lights can be configured to be on for 15 seconds to 4 minutes in 15 second steps. For most scenaria this should be OK, but it can be changed in the firmware.
The user may also press any of the LIGHTS ON buttons in the staircase. This switches on the relay in the circuit (and all the lights in the staircase that it switches) and a control LED (blue). The top indicator LED will start blinking. After 15 seconds the blinking LED stays off and the one next to it (in the direction of 0) starts blinking. This procedure keeps repeating until all the indicator LEDs are exhausted. At this point all the indicator LEDs (until the preset interval) light up, and the relay switches off - switching off the lights in the staircase.
During the countdown process the user can press any of the LIGHTS ON buttons in the staircase resetting the countdown timer to expand the time the lights are on.
Extra stuffThe same circuit with only a slight modification in firmware can be used in various other applications that require similar timing, such as delayed switch off of car/boat/etc. cabin light, car wiper intervalled operation, camera interval shooting, etc.
Possible improvements, future plans...... or what I would do differently if I had to do it again - in no particular order:
- I would incorporate the relay on the PCB - this would make the whole device look less cluttered.
- When the microcontroller is in waiting mode, it should sleep and it could be waken up by an interrupt when a button is pressed.
- I would use a cooler project box ;-)
UpdateWith the original 12VDC power supply the regulator 7805 IC needed a very large heatsink which I really didn't like. So I was looking around what else I can do. A few days later I found on eBay a 5VDC and 12VDC power supply in one and a compact size. It's the one that are used for external hard disks or DVD drives. I just removed all cables and the enclosure that I don't need, and bypassed the power supply part of my circuit. Now the device works with its own switching mode power supply.
The aim of this simple project is to provide simple button input to any digital circuit. I use it in conjunction with the LED strip in microcontroller projects on breadboards. It consists of 8 tactile switches (momentary pushbuttons). The circuit is complete with a pull-up resistor for each pushbutton. The included pin header allows easy connection to a test board or breadboard.
|The circuit is very simple|
|The empty PCB|
|The fully populated PCB. You can see all the SMT resistors and buttons in a particular arrangement.|
Friday, February 11, 2011
IntroductionThe aim of this simple project is to provide simple debugging capabilities to any digital circuit. It is nothing more than 8 LEDs on a piece of PCB with a pin header to connect easily to a test board or breadboard.
The circuitThe circuit doesn't get any simpler than this:
Pin 1 of the header is the common. The above schematics shows the LEDs in a common cathode configuration, but it's possible to reverse them making a common anode configuration if that is what a particular project demands. Also, the value of the resistors must be chosen according to the requirements of the circuit at hand. The shown values are just examples. Typically, the common pin (pin 1) can be a 0V and pins 2-9 can be connected to a microcontroller's output pins.
The boardTo save on manufacturing costs (which seems to be the highest for every circuit I have made so far) I used SMT resistors. The LEDs could also be SMT, but I wanted them to be big and I wanted them to shine.
Some more images
|The empty PCB|