Tann Thona: Project

Telecommunication and Electronic Engineering

Post

Post Top Ad

Showing posts with label Project. Show all posts
Showing posts with label Project. Show all posts

Thursday, April 4, 2024

Smart Detecting Train Auto Control Gate

April 04, 2024 0

Royal University of Phnom Penh

Faculty of Engineering

Dep. of Telecommunication and Electronic Engineering



Course: Electronic System Design

Project Title:

Smart Detecting Train Auto Control Gate


Group member:

Ly Seyha, Tann Thona, Chhoy Noreath, Nop Da, Ham Sovann, Simpich Dany

Advisor: Chan Tola


1st Generation, Year 4th Semester I

2017-2018

Project Smart Detecting Train Auto Control Gate


Smart Detecting Train Auto Control Gate


I. Abstract

In this article, we aim to build an electronic project is a Smart Detecting Train Auto Control Gate to control traffic of the quadrilateral road of the train and cars road. In this project, we will use 3 main controllers; microcontroller, sensor, and servo motor. we have developed it by invented a new board as Arduino board by using an ATmega328P microcontroller instead of Uno Arduino to control the project process, IR sensor type of TCRT5000 to cooperate with our new board to detect the train coming and then feedback the signal to the microcontroller for control the traffic light, buzzer and servo motor for on/off gate to prevent accident of cars and the train. The invention of the new board is too many steps to do, we will show the board invention of each step in the detail of article below. We have made a new board in order to control the process instead of the Arduino board, so this is a powerful project that we can make a PCB by our own.

II. Introduction

In Cambodia, nowadays there is not so strong in using electronic system to control the system along the railroad, usually we see just the manual system in this case, so we will have an idea to make a system which it works automatically by electronic components in it. This is called Smart Detecting Train Auto Control Gate, it is an Arduino project which we built it with the process commonly as the reality in training process. It is working by automatically in detecting the coming train in a specific distance and then command to traffic light and on-off the gate. It is a powerful project that we have developed by using a main board of a new making PCB with a ATmega328 instead of using the Arduino board in controlling the whole process of our project. In this project, we have used two more important components: servo motors and sensors. we used IR sensor type TCRT5000 to detect train and feedback to a microcontroller while the train is coming for control the traffic light, buzzer and on/off gate to stop cars by servo motors for prevention accident at the quadrilateral road between cars road and railroad. There are 6 pairs of IR sensor along the two part of railroad which there are 3 pairs of sensors to control a direction and 3 more pairs to control another, we have arranged it because we have imagined that we need more safety and smoothly to process on it. Two servo motors are used in controlling in on/off gate when the train coming and across and the traffic light is just used LEDs to output.

We made it up in order to:
  • To learn about electronic components.
  • To show the powerful of electronic components in automatically working.
  • To understand the process in developing project and in reality
  • To compare process in project and reality working.
  • To know the designing of PCB by using software.
  • To know about making a new PCB as Arduino.
  • To show that we can making a controller PBC by our own selves.

III. Electronic Requirement

Base on this whole project, some requirement electronic components is list below:
  • Mini Servo x2
  • ATmega328P x1
  • Crystal 16MHz x1 and Capacitor Ceramic 22pF x2
  • IR sensor (TCRT5000) x6
  • LDR Sensor x1
  • LED (Red x3, Greenx2, Yellow x2 and White x8)
  • Resistor (10Kohm x7, 330ohm x 6 and 100ohm x2)
  • Capacitor Ceramic (100nF x2)
  • Capacitor Electrolyte 10uF x2
  • Adapter DC 9 or 12V (1 - 1.2A)
  • 12vDC Connector x1
  • Switch 12v x1
  • Terminal Block 2pins x1
  • Button x1
  • Regulator (L7805) x1
  • PCB (77mm x 72mm)
  • Jumper wire

1. TCRT5000 IR Sensor


There are two IR LEDs in a TCRT500 that blue LED is transmitter and black LED is a receiver. IR receiver is a potentiometer that is resistor has value depend on IR light.

It works by transmitter LEDs transmit the IR light while the receiver receives the IR light by reflecting signal from object to making change the resistance value. The resistance value of transmitter should be the same of LED’s resistance value and receiver should more than 1Kohm. See Figure 1 below for IR Sensor characteristic and Its working.




Figure 1: IR Sensor characteristic and Its working.


2. Servo Motor

In this project, we use servo motor to control to on-off gate when the train goes through that way.
  • It operates voltage from 4.8 – 6v
  • Stall torque: 1.8 kg.cm (4.8V), 2.2 kg.cm (6 V)
  • Operating speed: 0.1 s/60 degree (4.8 V), 0.08 s/60 degree (6 V).

Figure 2: Servo motor specification.


3. ATmega328P

We used ATmega328P instead of Arduino board process of controlling, it is operating well with 1.8-5.5V of input voltage. It needed a crystal clock with two ceramic capacitors and a 10KOmh resistor and a button for reset to working our microcontroller.
  • Pin 1 is a reset pin to connect with a button.
  • Pins 2&3 are the Rx and Tx pins.
  • Pins 4 to 6 and 11 to 19 are the output digital pins.
  • For pins 7&8 are the power pins of VCC and GND.
  • For pins 9&10 are the connection pins of crystal with 2 capacitors.
  • For pins 23-28 are the output analog pins.

Figure 3: Pins connection diagram for ATmega328P.


IV. Methodology

1. Making Print Circuit Board(PCB)

1.1 PCB Software Design

Base on this project, we have used 2 kind of software programs of Proteus to make new a PCB:


Figure 4: Interface of Proteus ISIS design circuit schematic with v7.10.

Figure 5: Interface of Proteus ARES design layout diagram with v7.10.

  • Proteus ISIS software v7.10: is used to draw the circuit diagram by connecting from any components which we necessary need for our project. It is also corporates to an ARES software program. See Figure 4 below for ISIS design.
  • Proteus ARES software v7.10: used to draw a layout of PCB diagram which connect form ISIS schematic design. See Figure 5 below for ARES design layout diagram.
*Note: in these combining program, some package may not have in this software, so you need to draw it by manually.
Go to this link to download software of the Proteus.v7.10 for the designing circuit schematic and diagram: Download Proteus.v7.10 Software

1.2 PCB Hardware

After we already design the diagram in Proteus software, then we need to follow these below steps:


Figure 6: Making PCB hardware with step by step.


These above figures show the steps of how to make a new PCB:
  • For Fig6.1, show the printing out of the circuit drawing on a slipper paper by the Laserjet printer.
  • Fig6.2, Iron that printed paper on the PCB board with a specific size.
  • Fig6.3, Put the PCB which already ironed into acid and making vibrate it carefully.
  • After we finish these 3 steps above then we need to apply all components to PCB board of each its position and then soldering it one by one. See Fig6.4&6.5.

V. Experiment

1. Program on ATMEGA328P Microcontroller


This is the explains how to migrate from an Arduino board to a standalone the ATmega328P microcontroller on a breadboard for burning the bootloader and uploading program to it.

Unless you choose to use the minimal configuration described at the end of this tutorial, we'll need four main components (besides the Arduino, ATmega328, and breadboard):
  • a 16 MHz crystal,
  • a 10k resistor, and
  • two 18 or 22 picofarad (ceramic) capacitors.

1.1 Burning the Bootloader

We need to burn the bootloader onto a new ATmega328P microcontroller by using an Arduino board as an in-system program (ISP).


Figure 7: Wire connection to burn the bootloader onto an ATmega328P with Uno Arduino.


We’re choosing an Uno Arduino board for this section, so to burn the bootloader, we need to follow these below steps:
  • Firstly, need to upload the ArduinoISP sketch onto an original Arduino board by select the board and serial port from the Tools menu that correspond to our board.
  • Wire up the Arduino board and microcontroller as shown in the diagram of Figure7.
  • Select "Arduino Duemilanove" from the Tools -> Board menu and then select to ATmega328.
  • Select "Arduino as ISP" from Tools -> Programmer
  • Run Tools -> Burn Bootloader
You should only need to burn the bootloader once. After you've done so, you can remove the jumper wires connected to pins 10, 11, 12, and 13 of the Arduino board.

1.2 Uploading Using an Arduino Board

After ATmega328P has the Arduino bootloader on it, then we can upload programs to it by using the USB-to-serial convertor (FTDI chip) on an Arduino board.

  • To upload our code onto it, need to remove the microcontroller from the Uno Arduino board so the FTDI chip can talk to the microcontroller on the breadboard instead.
  • Connect the RX and TX lines from the Arduino board to our ATmega328 on the breadboard as shown in Figure 8.
  • To program the microcontroller, select "Arduino Duemilanove " from the the Tools > Board menu and select ATmega328, then upload as usual.

Figure 8: Wire connection to uploading sketches code to an ATmega328P on a breadboard.


1.3 Algorithm of Project

In this section, we will introduce you to know about our project processing in the diagram, see Figure 9 below to understand well.

To make a process in this project, we need to do the coding. For coding, you can download in link:


Figure 9: Processing of Smart Detecting Train Auto Control Gate.



Figure 10: Flow Char


VI. Result

After we spent 10 weeks to develop it, finally we have completed it with 90% of fully project.
According to this project, there are two main parts, the smart detecting train system and auto night light system on this project. Let see the result of our full project’s demo is in the link below.


Figure 11: Result of Smart Detecting Train Auto Control Gate.



VI. Conclusion

In sum, we have developed an electronic project which work automatically to traffic light and gate control by detecting the coming train at quadrilateral road. We have made a new PCB board which include a new chip ATmega328P and all-important components on it to cover to a whole project’s process that can be replacement to an Uno Arduino board. Finally, it is working 90% of fully project and we need to update it with any remaining part and something lost in order to finish our project completely.

After we have finished this project, we knew many things about this project:
  • Knew some electronic components characteristic and its specification.
  • Understood the process in developing project and in reality.
  • Know the comparing of process in project and reality working.
  • Understood well about the designing of PCB by using Proteus software.
  • Knew about how making a new PCB and boot-loading the ATmega328P as Arduino.


Reference


[1]. https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard

[2]. https://nomada-e.com/store/sensores/9-sensor-optico-reflectivo-tcrt5000.html

[3]. http://full-parts.com/mg90s-metal-gear-servo-for-arduino-micro-tower-pro-180-degrees.html

[4]. https://voidyourwarranty.wordpress.com/2014/08/17/using-arduino-as-an-isp-to-program-a-standalone-atmega-328p-including-fuses/


Photos

Date: 20 December 2017
Location: Royal University of Phnom Penh, Cambodia














Read More

Stereo Audio Amplifier Using KA2209 (IC)

April 04, 2024 0

Royal University of Phnom Penh

Faculty of Engineering

Dep. of Telecommunication and Electronic Engineering


Project Title: Stereo Audio Amplifier


Group member:

Ly Seyha, Tann Thona, Chhoy Noreath, Nop Da, Simpich Dany

Advisor: Dr. Thap Tharoeun

First Generation, Year 3rd Semester II
2017



I. Introduction

This is a stereo audio amplifier module using the KA2209 IC, which is equivalent to the TDA2822. It will operate well from 3 – 12v DC and will work from a battery since the quiescent current drain is low. It requires no heat sink for normal use. The input and output are both ground referenced. Maximum output will be obtained with a 12v power supply and 8-ohm speaker, however it is particularly suitable for driving headphones from a supply as low as 3V.


II. Specifications of KA2209

  • D.C. input: 5 – 12 V at 200 – 500 mA max.
  • Power output: - > 1-Watt max. 4-8 ohms, 12V DC
  • > 500 mW, 32-ohm, 12V
  • > 500 mW, 4-ohm, 6V
  • Freq. Resp.: ~ 40 Hz to 200 kHz, 8-ohm, G=10
  • < 20 Hz to > 50 kHz, 32 ohms
  • THD: < 1 % @ 750 mW, 4-8Ω, 12V
  • < 0.2 % @ 250 mW, 4-8Ω, 12V
  • Sensitivity: < 300 mV, G = 20 dB
Figure 1. KA2209 IC



III. Assembly Instructions

  • The electrolytic capacitors are polarized, they have a + or - marked on them and they must be inserted correctly into the PCB.
  • The IC and socket have a notch at one end, which is marked on the PC board overlay. If there is no notch on the IC, there will be a dot next to pin 1, which is the same end.
  • Solder the socket in place first before installing the IC itself, then resistors, capacitors, and PCB pins. Leave the potentiometer until last. We have also provided input attenuation via the potentiometer which can be used as a volume control. This will keep the signal to noise ratio as high as possible. Extra gain provided by the amplifier will reduce the S/N ratio by a similar amount, since the input noise figure is constant.

IV. Testing

Check the voltage and polarity before connecting the battery or power supply. If it does not work, recheck all component positions and polarity. Check all solder joints, and all external wiring. The IC itself is quite robust, and there is very little else to go wrong. Remember when testing, it will not produce full output for more than a short duration because of limited heat dissipation. We found it easily exceeded the manufacturers specifications however.

IV. Circuit Description

There are only a few external components, 

  • R1, R2 and R3, R4 are the feedback resistors. 
  • C1 provides power supply decoupling.
  • C2, C3 are the output coupling capacitors.
  • C4, R1 and C5, R2 block DC in the feedback circuit from the inverting inputs.
  • C6, R3 and C7, R4 act as Zobel networks providing a high frequency load to maintain stability at frequencies where loud speaker inductive reactance may become excessive.
  • C8 and C9 are the input coupling capacitors, which block any DC that might be present on the inputs.
  • The pot provides adjustable input level attenuation.

Figure 2. Stereo Audio Circuit with KA2209 IC

V. Components Requirement

  • KA2209 IC   (x1)
  • Printed Circuit Board   (x1)
  • Capacitors
    • C1: 10 uF / 16 or 25V elec_cap   (x1)
    • C2, C3, C4, C5: 100 uF / 16 or 25V elec_cap   (x4)
    • C6, C7: 104 / 16V cera_cap   (x2)
    • C8, C9: 103 / cera_cap   (x2)
  • Resistor 4.7KOhm
    • R1, R2:  4.7 KOhm   (x2)
    • R3, R4:  3.3 KOhm   (x2)
  • Potentiometer: 10KOhm   (x1)

VI. Reference

Quasar Electronics Limited
PO Box 6935
Bishops Stortford
CM23 4WP
UNITED KINGDOM 
Website:    http://www.quasarelectronics.com/3087.htm


Photos


Date: 26 October 2017
Location: Royal University of Phnom Penh





Read More

Monday, April 1, 2024

Arduino Project Set Real Time Control Light 7 Segment

April 01, 2024 1

Set Real Time Control Light Using 7 Segment


1. Abstract

Traditionally electrical light control by Time that regulate the electricity to these device. Time control light works by making everything in your house that turn on or turn of automatic controlled using technology control and do job that we would normally do manually. Light automatic take care of a lot of different activities in the house.

2. Introduction

In this project we want to do how to turn ON/OFF LED by press button as a switch to control Light of LED. We have three button for set time to turn on and turn of LED light. we used Real Time Clock (DS3231 module) to keep tract of the time even if the microcontroller is disconnect the main power because RTC run on its own batter like our clock. Using two of 7 segments cathode to display time by get real time from DS3231 module.
 

3. Objective

The main objective of this project is: that we are control light at our home using simple circuit.
  • Display Real Time on 7 segment
  • Set Time Automatic Turn ON LED Light
  • Set Time Automatic Turn OFF LED Light

4. Electronic Requirement

Electronic requirement use in this project:
  • Arduino Meg 2560
  • RTC DS3231 Module
  • 7 Segment Two Digit Cathode Type (x2)
  • Button (x3)
  • Resistance 330 Ohm (x6)
  • LED Red(x2) Wite(x1)
  • Breadboard (x1)
  • USB Connected from Arduino to Computer
  • Jumper Wire

5. Methodology

To create this project we use Arduino Meg 2560 as a main controller and 7segment show time clock, button set time such as minute and hour and LED turn on/off light. RTC DS3231 module to keep the time alive, and Arduino as a software for transfer the data from device to laptop or computer.
  • Controller
The Arduino Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins, 16 analog inputs, 4 UARTs (hardware serial ports), a 16MHz crystal oscillator, a USB connection, a power jack and a reset button.

Figure 1: Arduino MEGA 2560)

  • RTC DS3231 Module
We need to use Real-time Clock (RTC DS3231) to keep tract of the time even if we program the microcontroller or disconnect the main power because RTC run on it own batter like our clock.
The DS3231 is low-cost, highly accurate real-time which can maintain hours, minute, and seconds. This module work on both 3.3v and 5v that make it suitable for using with microcontroller (Arduino).

Figure 2: DS3231 Real-time Clock Module

  • 7 Segment Cathode Two Digit
7 Segment (cathode type) has 10 pins. 2 pins are GND (one for one’s digit) and others 8 pins are get power source for display number.


Figure 3: 7Segment Cathode Two Digit

  • Button
Button is similar switch too. If we press button it like switch open, but if we release it like switch close. We use button in this project to set time for torn on the light and turn off the light.

Figure 4: Button

  • LED
We use LED to show light depend on time that we set turn on or turn off.


Figure 5: LED

5.2 Circuit Diagram

Connect Arduino pins to RTC and 7 Segment like diagram bellowed:
  • RTC DS3231 Module
Table Connection RTC to Arduno

Figure 6: The circuit of connection from Arduino MEGA to RTC

  • 7 Segment Cathode Two Digit
Table Connection 7 Segment to Arduino


Figure 7: The circuit of connection from Arduino MEGA to 7 Segment

5.3 Algorithim of Project

For this project we have 3 buttons to set time turn on and turn off LED light. The first button is use for save time and change digit edit time value. Second button use for go to set time turn on LED light and decrease time value. The last button use for go to set time turn off LED light and increase time value. DS312 module is keeping track of the time and 7 Segment display clock number.

Figure 8: Full Diagram of Project

Flow Chart Process

5.4 Coding

First open arduino software plus Arduino Mega USB Cable to computer and the select port:



After connect pin RTC DS3231 module like above then upload code set real time to RTC like below:

//#include <SPI.h>
#include <DS3231.h> //Library for RTC module (Download from Link in article)
DS3231 rtc(SDA, SCL);
void setup()
{
Serial.begin(9600);
//SPI.begin(); /* Enable the SPI interface */
rtc.begin(); // Initialize the rtc object
rtc.setTime(13, 52, 00); // Set the time to 12:00:00 (24hr format)
rtc.setDate(13, 3, 2018); // Set the time to 12:00:00 (24hr format)
}
Void loop()
{
}

*Note: You have to add library DS3231 in to this software.

Then download code and upload to your arduino: Download Code



6. Result

After upload code to Arduino already we get result like below:

  • 7 Segment display real time clock by get time from DS3231.
  • Button 2 (Middle): press a second 7 Segment will go to set time turn on LED mode. In mode set time if click less than a second on Button it will increase number on 7 Segment.
  • Button 3 (Right): press a second 7 Segment will go to set time turn off LED mode. In mode set time if click less than a second on Button it will decrease number on 7 Segment.
  • Button 1 (Left): press a second in set time mode it will save time value. But if we click less than a second it will change digit for edit number of time.
  • LED will turn on/off when time we set the same real time.





Royal University of Phnom Penh
Faculty of Engineering
Dep. Telecommunication and Electronic Engineering

Group Member:
1. Tann Thona
2. Sim Pichdany
3. Ven Seyha
Instructor: Prof. Kuong Samnang
Date: 16 March 2018
Read More

Wednesday, August 1, 2018

Automatic Control System for Factory Managment

August 01, 2018 0

Automatic Control System for Factory Management

  

 

 

   Download:  Word

Download:   PDF

 

 

Read More

Post Top Ad