Construction of PCB exposure box based on MEGA8 microcontroller countdown system

Publisher:风清扬yxLatest update time:2011-08-25 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction

In the following lines I describe the process I followed to build the box, the light system, and the countdown system which is based on the AVR MEGA8 microcontroller.

Four black light lamps, 15W each, emit radiation in the UVA region, with a peak of about 350nm... sensitive to the copper surface of the thin photosensitive circuit board mentioned above. The lamps are made of two connected in series, thus shaping two similar modules. Each module has its own ballast and can be connected to 220V AC through a relay. A microcontroller counts down a user defined countdown after reaching zero activating a relay. The remaining time is displayed on four 7-segment LED displays. The maximum countdown is 99 minutes and 59 seconds. The desired countdown is entered using only two buttons, SET and START/STOP. A short push of the SET button will increase the current digits, while a long push will change the digits from SECONDS to seconds, to decades, to minutes, etc. Pushing the START/STOP button once causes the MCU to accept the desired countdown. Pushing the START/STOP button one more time will start the countdown connected to the lamp system to 220V AC, through the relay. If the START/STOP button is pressed again before the countdown reaches zero, the lamp system will be deactivated. When the countdown reaches zero the lamp system fails and a 3 second beep has sounded. The timer remembers the last used countdown and uses it as default every time the system is powered on. All of the above things are inside a wooden box. You can design your own but I have had technicians make the box. There are 3 distinct parts that make up your PCB exposure box; the box display lamp system and the counter system.

Packaging Box

You are I need a wooden box with dimensions of about 50x30x60 cm3. The box must have an extra space to host the countdown board and two ballasts. The height of that room, that is, the distance between the bottom of the box and the shelf, can be 5-8 cm. On one side of the shelf, four starter bases will be installed, and on the other side, four lamps have been attached with their G13 bases.

Here is a very detailed description on how to build your own box, after I relied on it to decide the dimensions of my box. For the light system you will need:

4 x 15W black lamps with UVA fluorescent radiation peaking at ~350nm. These lamps are suitable for photochemical procedures and are commonly used for insecticides. Examples are the F15W/T8/BL Syllvania and the Actinic BL from Phillips

(Cost about 10€/lamp)

2 x 40W ballasts. This is a common ballast for fluorescent lamps (cost about 2/ballast)

4 × starters, capable of supporting 15W

Lighting (22W before starting, cost about 0.5 Ω/start)

(About cost <0.2?/base)

8 lamp bases, with holes so they can be screwed onto the wood (cost about 0.6 ??/base)

Wires. Prefer flexible wires, which are commonly used in fluorescent lamps.

20 x Screws. Use the size that works best for you.

The connection of the lamp you have is in the next image, this is a very popular connection of two low power fluorescent lamps in series, there are two identical modules connected in parallel. In each module, initially, the AC current flows through the two starters and the ballast. After a while one of the starters opens the circuit and the current in the circuit is interrupted. This brings an extremely uncomfortable situation to the inductive ballast and reacts violently to develop a voltage across its terminals. The voltage value can be as large as some kilovolts, which is what the fluorescent lamp needs in order to turn on. After the transition effect, the voltage in each lamp gets stabillized to about 50-60V, which is the operating voltage of the lamp. As for the construction details, I put the two ballasts on both sides of the wooden lamp starter shelf and on the bottom of the box.

So as far as the shelf. First I screwed on the starter base and I made the following connections to one side of the shelf

Second, on the other side of the shelf, I screwed the G13 lamp holder, first, drilled the required wire holes to join the starter base lamp holder

Also don't forget the screws so you can put it out of the box and make wire connections next to it.

And complete with starter and light filled shelves

The finished light system looks like

Countdown timer

This is the most interesting story. Here you have to deal with both software and hardware.

As for the software part, I wrote the code in C using WINAVR and AVR-GCC plugin together with avrStudio. Using ProteusVSM I tested the code in a simulation environment, which saved me a lot of time and effort. Then I downloaded the hex code for the STK500 chip. I strongly recommend you to try to write your own code, therefore, I don't attach any code hex except the downloadable one.

As for the hardware there has been a lot of talk about how to do this. Vassilis Papanikolaou's Darkroom Timer contains a rather worrying schematic, plus a PCB. My schematic contains all the changes needed to replace the AVR MEGA8 with a PIC, in addition I used only two buttons and I put the regulators in parallel, rather than in series.

The schematic diagram of the microcontroller and power supply is as follows:

Parts List

Quantity part, REFS value

-----------------

resistance

---------

10 R1 - R10 220R

1 R11 470R

1 R12 4K7 Capacitors---------- 2 C1, C2 1uF 1 C3 1000U 2 C4, C5 100N Integrated Circuits------------------- 1 U1 CD4511 BCD 7segm. com. cpt. Decoder 1 U2 ATMEGA8 AVR 8-bit RISC Microcontroller 1 U3 Optocoupler NPN 1 U4 7812 12V Regulator 1 U5 7805 5V Regulator Transistors ----------- 6 Q1 - Q5, Q7 BC328 PNP 800mA Transistor 1 Q6 2N2222A NPN 800mA Transistor Diode ------ 1 D4 1N4001 Miscellaneous ------------- 1 BR1 Any diode bridge > 1A 1 FU1 1A Fuse 1 J1 AC OUT Socket 1 J2 DIL14 14-pin header for listed LED board 1 J3 Buzzer 1 J4 SET Button 1 J5 START/STOP Button 1 J6 Power LED 1 J7 AC Socket 1 RL1 12V Relay 1 TR1 220V/14V 1VA Transformer (from an old radio)

LED circuit board schematic

Quantity part, REFS value

----------------- Diodes------ 2 D1, D2 LED green

Miscellaneous

-------------

1 J1 is connected to the host CONN

DIL14 4 LED0 - LED3 common cathode 7segment display

I test the schematics, virtually and in real time. And by "virtual" I mean that I use a simulation software for an electronic system, such as PROTEUS VSM ... ... as expected (... coz as far as I know there is no competitor so far!). I don't make any advertisements, but PROTEUS VSM is amazing and for those who haven't heard of it, I recommend them to try it, at least, from the demo version

Only after Deform said I was correct, I tried the circuit on a breadboard, which actually saved me a lot of time, especially during code development and debugging. By "I tested the circuit in real time" I mean I put every component on a breadboard and I didn't find any problems that Deform had fixed.

In this video, there is a countdown timer working as a demonstration while testing the breadboard

So, after making sure everything was correct, it was time to solder the final wires to my circuit design!

I started with the LED board

And the corresponding main units

Modules connected together

Here is a video 10 seconds later off my desk showing the countdown module in action

Putting it all together...

So far so good! Everything works fine, now it's time to attach the light system and the countdown system in the packaging box. A general diagram helps to identify the place of each module.

First the sockets on the back of the box are installed, next the ballast, main circuit board, LED board and switch

PCB exposure box is ready and rear shelf is set up

In this video you can see the exposure box of the PCB working.

As you noticed I took the camera out to record and lose control (!), because UVA radiation is harmful and dangerous. Never look directly at the lamp.

LED Circuit Board Layout - Download PDF

LED Board PCB

Motherboard PCB

Reference address:Construction of PCB exposure box based on MEGA8 microcontroller countdown system

Previous article:89Sxx Development Board Production Instructions
Next article:See how the microcontroller controls the LCD module

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号