Created
March 10, 2014 17:18
-
-
Save VimKanzo/9469547 to your computer and use it in GitHub Desktop.
Intelligent Traffic Control System (ITCS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title | |
Intelligent Traffic Control System (ITCS) | |
# Picture | |
media: http://www.deviantsart.com/8eadk4.jpg | |
# Objective | |
PROJECT AIM: | |
The aim of this project is to monitor and report on the traffic light in the country which is one of the cause of traffic in the country since most of them are not functioning and they are also been monitored manually. Our project initiative aims to solve the problem of manual monitoring. Our project will monitor traffic lights by the use of sensors and report to MTTU whenever a traffic light breaks down by triggering the sensors to pinpoint the location of where the traffic light is and send out an SMS alert to MTTU for them to know there is a traffic light breaks down. We believe this is going to help the MTTU monitor traffic light effectively and attend to them within the shortest possible time. We also want to use solar panels as secondary power and backup for the traffic lights ensuring that they are operational always. | |
Features of the Circuit: | |
• Monitor when the traffic light breaks down | |
• Send out GPS location to base station | |
• Send out SMS Alert to Base Station | |
Components Needed: | |
• Soldering supplies (soldering iron, solder) | |
• 6 LED (We would actually use only 3 Red, Yellow and Green, but the other 3 would be spare ) | |
• 9v Battery = 1 | |
• 100ohms Resister = 3 | |
• Breadboard = 1 | |
• Plug cables Male and Female (Long 3 & 3 Short) | |
• Arduino Uno = 1 | |
• Arduino SIM900 GPRS/GMS Shield = 1 | |
Challenges Encountered: | |
1. How to monitor the circuit and alert when there is fault | |
2. Timing differences between the traffic lights flashes. | |
3. Identifying the various types of traffic light the country has. | |
# Duration | |
2 Weeks | |
# Age Group | |
13-16 | |
# Materials | |
## 1 | |
* description:Soldering Iron | |
* quantity:1 | |
* price:$4.59 | |
* link:http://www.ebay.com/itm/60W-110V-Pencil-Welding-Tip-Soldering-Iron-Solder-Heat-Tool-/350660165686?pt=LH_DefaultDomain_0&hash=item51a4f98036 | |
## 2 | |
* description:9v Battery | |
* quantity:1 | |
* price:$0.99 | |
* link:http://www.ebay.com/itm/2-PACKS-SONY-ULTRA-HEAVY-DUTY-9V-BATTERIES-99-pence-ONLY-/350788676243?pt=UK_ConsumerElectronics_Batteries_SM&hash=item51aca26a93 | |
## 3 | |
* description:220ohms Resister | |
* quantity:1 | |
* price:$1.26 | |
* link:http://www.ebay.com/itm/100pcs-1-4W-220ohm-1-accuracy-Metal-Film-Resistor-220-Ohm-/251469396956?pt=LH_DefaultDomain_0&hash=item3a8cbe7bdc | |
## 4 | |
* description:Breadboard (The link attached to this breadboard comes with a set of jumpers) | |
* quantity:1 | |
* price:$5.45 | |
* link:http://www.ebay.com/itm/MB102-830-Tie-Points-Solderless-PCB-Breadboard-MB-102-65PCS-Jumper-cable-wires-/121101205763?pt=LH_DefaultDomain_0&hash=item1c3231c103 | |
## 5 | |
* description:Arduino Uno | |
* quantity:1 | |
* price:$29.95 | |
* link:http://www.adafruit.com/products/50 | |
## 6 | |
* description:Solder (1 Yard will be find, but you could purchase the bundle for later use) | |
* quantity:1 yard | |
* price:$6.61 | |
* link:http://www.ebay.com/itm/1PCS-0-5mm-Tin-Lead-Rosin-Core-Solder-Soldering-Wire-100g-/261055245964?pt=LH_DefaultDomain_0&hash=item3cc81aee8c | |
## 8 | |
* description:10kohms | |
* quantity:1 | |
* price:$2.45 | |
* link:http://www.ebay.com/itm/RESISTOR-10-K-OHM-1-4-WATT-5-NEW-NOS-QTY-100-/201025508105?pt=LH_DefaultDomain_0&hash=item2ece0dd309 | |
## 9 | |
* description:Tactile tact Push Button Switch 6x6x5mm | |
* quantity:1 | |
* price:$2.38 | |
* link:http://www.ebay.com/itm/10-Pcs-Tactile-tact-Push-Button-Switch-6x6x5mm-/221388102893?pt=LH_DefaultDomain_0&hash=item338bc25ced | |
## 10 | |
* description:Red, Orange, Green & White LEDs (LED Kit 120pcs) | |
* quantity:1 | |
* price:$5.99 | |
* link:http://www.ebay.com/itm/6-value-3mm-diffused-Round-LED-Kit-120pcs-Red-Green-Yellow-White-Blue-Orange-led-/291096400651?pt=LH_DefaultDomain_0&hash=item43c6b2930b | |
## 11 | |
* description:Jumper Links | |
* quantity:1 | |
* price:$3.68 | |
* link:http://www.ebay.com/itm/80-Pcs-20cm-2-54MM-Male-to-Female-Dupont-Wire-Jumper-Cables-for-Arduino-Shield-/290975002105?pt=LH_DefaultDomain_0&hash=item43bf762df9 | |
## 12 | |
* description:Piezo Sounder | |
* quantity:1 | |
* price:$1.50 | |
* link:http://www.ebay.com/itm/Pack-of-3-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-20mm-/171245652652?pt=LH_DefaultDomain_0&hash=item27df094aac | |
## 13 | |
* description:USB A Male to B Mini 5 Pin Sync Cable (This cable already comes with your Arduino so its optional) | |
* quantity:1 | |
* price:$1.04 | |
* link:http://www.ebay.com/itm/New-Hot-Sale-stylish-USB-A-Male-to-B-Mini-5-Pin-Sync-Cable-Data-line-FM-US-/291098658669?pt=US_USB_Cables_Hubs_Adapters&hash=item43c6d5076d | |
# Steps | |
## Parts | |
media: undefined | |
notes: These are minimum requirements you could order more for backup or expansion of this project. | |
1 Breadboard (This is its module number type. Not really necessary) | |
1 Jumper Links | |
2 Red LEDs | |
1 Orange (not amber, but optional) | |
2 Green LEDs | |
1 White LED | |
1 Piezo Sounder | |
1 Push to make button (Tactile tact Push Button Switch 6x6x5mm) | |
1 10K Resistors | |
1 220ohm Resistors | |
1 Arduino Uno or Diecimila | |
OPTIONAL - 1x 3m USB Cable | |
Best news is, you won't need any tools or soldering for this project, it’s just pushing bits together! Once you have all the parts you are ready to assemble your project, however if you are planning to make this project more permanent you will want to get some form of strip board to solder your work down once it’s working. | |
## Setting up the LEDs | |
media: undefined | |
notes: Getting started is pretty easy, simply layout and check is all the components are intact, it’s best to have the Arduino to the left of the breadboard, and disconnected. The next steps of this guide will take you through mounting the components on the breadboard, wiring the breadboard to the Arduino, and finally programme the Arduino, after you will be able to test if it works. | |
## Step 3 | |
media: http://www.deviantsart.com/scra87.jpg | |
notes: Before we begin ensure all LEDs are connected the right way else you might burn them. The short lead goes on the right and the longer on the left. We will be adding the resistors later so be sure not to plug in any power yet as it could damage the LEDs. | |
The image below shows the long and short leads, and then the second image shows how they should be wired, third showing the order. | |
TIP! Ensure that you have the LEDs spread across from the 5 column bit to the two column bit or else they will not work and you will have a short circuit. | |
## Fixing the Piezo on the Breadboard | |
media: http://www.deviantsart.com/1l06ntc.jpg | |
notes: We will be coming back to this and will need to lift it to install jumpers to the Arduino but for now just put it in place with one pin on either side of the central divide so we don't short between the two pins. | |
The bread board pins are connected from left to right in two sections of 5 with a divide in the middle to separate the two sections, and the 2 outer pins are connected from top to bottom in two columns, these are on both sides but are not connected from one side of the board to the other, in other terms these can be used to provide two separate circuits independent of each other if required. | |
Additionally on some boards the top and bottom halves are not connected so you may have to make the jump using a wire from the top half to the bottom half if your circuit does not work. | |
## Mounting the Push to Release Button | |
media: http://www.deviantsart.com/1upmr2g.jpg | |
notes: The button has 4 pins, ensure these are all connected and don't bend then like with the Piezo have it sit across the central divider. | |
Next from the top wire the top right hand pin into the red side of the vertical pins, like the LEDs (see the 2nd image attached below) | |
Use the resistor BROWN BLACK ORANGE GOLD (10k) and wire it as shown in the 4th image attached below. (From the bottom right running vertically down the board, a small way 1 inch is enough). | |
## Resistors | |
media: http://www.deviantsart.com/1aojao3.jpg | |
notes: Using the 220 ohm resistors wire from the LEDs across the divider to the same row on the opposite side, (See 2nd image for example) and repeat for all the LEDs. | |
Add the white LED beween the Piezo and button and add a resistor to that LED also. | |
The 3rd image below shows the final result. (note the GREEN wire is not necessary, unless your circuit doesn't work like mine did, it joins the top half of the boards power rails to the bottom half as some boards are split). | |
## Wiring | |
media: http://www.deviantsart.com/3frmvml.jpg | |
notes: Now we are going to wire the Arduino to the breadboard, the wires all word in the order from top to bottom, and do not cross over so if the wrong lights come on at the wrong time patch the cables back in the right places... | |
Images below show how these should be wired. | |
Image 2 & 3: From the 5v line go to the resistor we placed coming out of the button. | |
Image 4 & 5: The green wire on the GND (ground) pin goes to the red rail which you connected the cathode of your LEDs to. | |
Image 6: The LEDs are wired in turn from pin 13 down to 8 starting at the top LED working your way down the bread board. This is why I said to have the board to the left as you can wire it as below... | |
13 o--------o ---/\/\/\/\/\--- ---O---| | |
12 o--------o ---/\/\/\/\/\--- ---O---| | |
11 o--------o ---/\/\/\/\/\--- ---O---| | |
10 o--------o ---/\/\/\/\/\--- ---O---| | |
09 o--------o ---/\/\/\/\/\--- ---O---| | |
Image 7: Wire the orange wires like before to the Piezo (pin 8), wait led (pin 7) and button (pin 6) | |
Note the position of pin 6 is critical other wise the traffic lights will constantly loop as if the button was held down. | |
## Programming The Arduino | |
media: http://www.deviantsart.com/2jrp98p.png | |
notes: Programming the Arduino could not be easier, however we have to tell the Arduino IDE where to look for the Arduino and what type of Arduino to talk to. | |
To tell it what type to talk to go to TOOLS > BOARD > ARDUINO DIECIMILA. | |
To tell it where to look for the Arduino go to TOOLS > SERIAL PORT, and choose the most logical port, it will say usb serial or some thing similar, not bluetooth or any thing else, worst case scenario you get it wrong and have to set it to another port. | |
Now you to open the attached PDE file and upload it to the board, by pressing the button with an arrow pointing to some dots/... | |
-> | | |
This will take a few moments and if successful your Arduino will now be running the code, press the button furthest to the right (serial monitor) to control the board with a terminal like interface. | |
# Notes | |
Below is the link to the code snippets for this project. | |
http://goo.gl/pGev0r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":"9469547","user":"VimKanzo","description":"Intelligent Traffic Control System (ITCS)","urls":["http://www.deviantsart.com/8eadk4.jpg","undefined"],"raw":"# Title \nIntelligent Traffic Control System\n# Picture \nmedia: http://www.deviantsart.com/8eadk4.jpg\n# Objective\nThe aim of this project is to monitor and report on the traffic light in the country which is one of the cause of traffic in the country since most of them are not functioning and they are also been monitored manually. Our project initiative aims to solve the problem of manual monitoring. Our project will monitor traffic lights by the use of sensors and report to MTTU whenever a traffic light breaks down by triggering the sensors to pinpoint the location of where the traffic light is and send out an SMS alert to MTTU for them to know there is a traffic light breaks down. We believe this is going to help the MTTU monitor traffic light effectively and attend to them within the shortest possible time. We also want to use solar panels as secondary power and backup for the traffic lights ensuring that they are operational always.\n# Duration\n2 Weeks\n# Age Group\n13-16\n# Materials\n## Edit me!\n* description:Edit me!\n* quantity:0\n* price:10€\n* link:\n\n# Steps\n## Description\nmedia: undefined\n\nnotes: undefined\n\n# Notes\nundefined\n","steps":[{"description":"Parts","$$hashKey":"009","notes":"These are minimum requirements you could order more for backup or expansion of this project.\n\n1 Breadboard (This is its module number type. Not really necessary)\n1 Jumper Links \n2 Red LEDs \n1 Orange (not amber, but optional)\n2 Green LEDs \n1 White LED \n1 Piezo Sounder\n1 Push to make button (Tactile tact Push Button Switch 6x6x5mm)\n1 10K Resistors\n1 220ohm Resistors\n1 Arduino Uno or Diecimila\n\nOPTIONAL - 1x 3m USB Cable\n\nBest news is, you won't need any tools or soldering for this project, it’s just pushing bits together! Once you have all the parts you are ready to assemble your project, however if you are planning to make this project more permanent you will want to get some form of strip board to solder your work down once it’s working."},{"$$hashKey":"011","description":"Setting up the LEDs","notes":"Getting started is pretty easy, simply layout and check is all the components are intact, it’s best to have the Arduino to the left of the breadboard, and disconnected. The next steps of this guide will take you through mounting the components on the breadboard, wiring the breadboard to the Arduino, and finally programme the Arduino, after you will be able to test if it works."},{"$$hashKey":"015","notes":"Before we begin ensure all LEDs are connected the right way else you might burn them. The short lead goes on the right and the longer on the left. We will be adding the resistors later so be sure not to plug in any power yet as it could damage the LEDs. \n\nThe image below shows the long and short leads, and then the second image shows how they should be wired, third showing the order.\n\nTIP! Ensure that you have the LEDs spread across from the 5 column bit to the two column bit or else they will not work and you will have a short circuit.","description":"Step 3","picture":"http://www.deviantsart.com/scra87.jpg","media":"http://www.deviantsart.com/scra87.jpg"},{"$$hashKey":"01X","description":"Fixing the Piezo on the Breadboard","notes":"We will be coming back to this and will need to lift it to install jumpers to the Arduino but for now just put it in place with one pin on either side of the central divide so we don't short between the two pins.\n\nThe bread board pins are connected from left to right in two sections of 5 with a divide in the middle to separate the two sections, and the 2 outer pins are connected from top to bottom in two columns, these are on both sides but are not connected from one side of the board to the other, in other terms these can be used to provide two separate circuits independent of each other if required.\n\nAdditionally on some boards the top and bottom halves are not connected so you may have to make the jump using a wire from the top half to the bottom half if your circuit does not work.","picture":"http://www.deviantsart.com/1l06ntc.jpg","media":"http://www.deviantsart.com/1l06ntc.jpg"},{"$$hashKey":"023","description":"Mounting the Push to Release Button","notes":"The button has 4 pins, ensure these are all connected and don't bend then like with the Piezo have it sit across the central divider.\n\nNext from the top wire the top right hand pin into the red side of the vertical pins, like the LEDs (see the 2nd image attached below)\n\nUse the resistor BROWN BLACK ORANGE GOLD (10k) and wire it as shown in the 4th image attached below. (From the bottom right running vertically down the board, a small way 1 inch is enough).","picture":"http://www.deviantsart.com/1upmr2g.jpg","media":"http://www.deviantsart.com/1upmr2g.jpg"},{"$$hashKey":"029","description":"Resistors","notes":"Using the 220 ohm resistors wire from the LEDs across the divider to the same row on the opposite side, (See 2nd image for example) and repeat for all the LEDs.\n\nAdd the white LED beween the Piezo and button and add a resistor to that LED also.\n\nThe 3rd image below shows the final result. (note the GREEN wire is not necessary, unless your circuit doesn't work like mine did, it joins the top half of the boards power rails to the bottom half as some boards are split).","picture":"http://www.deviantsart.com/1aojao3.jpg","media":"http://www.deviantsart.com/1aojao3.jpg"},{"$$hashKey":"02D","description":"Wiring","notes":"Now we are going to wire the Arduino to the breadboard, the wires all word in the order from top to bottom, and do not cross over so if the wrong lights come on at the wrong time patch the cables back in the right places...\n\nImages below show how these should be wired.\n\nImage 2 & 3: From the 5v line go to the resistor we placed coming out of the button.\n\nImage 4 & 5: The green wire on the GND (ground) pin goes to the red rail which you connected the cathode of your LEDs to.\n\nImage 6: The LEDs are wired in turn from pin 13 down to 8 starting at the top LED working your way down the bread board. This is why I said to have the board to the left as you can wire it as below...\n\n13 o--------o ---/\\/\\/\\/\\/\\--- ---O---|\n12 o--------o ---/\\/\\/\\/\\/\\--- ---O---|\n11 o--------o ---/\\/\\/\\/\\/\\--- ---O---|\n10 o--------o ---/\\/\\/\\/\\/\\--- ---O---|\n09 o--------o ---/\\/\\/\\/\\/\\--- ---O---|\n\nImage 7: Wire the orange wires like before to the Piezo (pin 8), wait led (pin 7) and button (pin 6)\n\nNote the position of pin 6 is critical other wise the traffic lights will constantly loop as if the button was held down.","picture":"http://www.deviantsart.com/3frmvml.jpg","media":"http://www.deviantsart.com/3frmvml.jpg"},{"$$hashKey":"02H","notes":"Programming the Arduino could not be easier, however we have to tell the Arduino IDE where to look for the Arduino and what type of Arduino to talk to.\n\nTo tell it what type to talk to go to TOOLS > BOARD > ARDUINO DIECIMILA.\n\nTo tell it where to look for the Arduino go to TOOLS > SERIAL PORT, and choose the most logical port, it will say usb serial or some thing similar, not bluetooth or any thing else, worst case scenario you get it wrong and have to set it to another port.\n\nNow you to open the attached PDE file and upload it to the board, by pressing the button with an arrow pointing to some dots/...\n\n-> |\n\nThis will take a few moments and if successful your Arduino will now be running the code, press the button furthest to the right (serial monitor) to control the board with a terminal like interface.","description":"Programming The Arduino","picture":"http://www.deviantsart.com/2jrp98p.png","media":"http://www.deviantsart.com/2jrp98p.png"}],"materials":[{"item":"1","description":"Soldering Iron","quantity":"1","price":"$4.59","link":"http://www.ebay.com/itm/60W-110V-Pencil-Welding-Tip-Soldering-Iron-Solder-Heat-Tool-/350660165686?pt=LH_DefaultDomain_0&hash=item51a4f98036","$$hashKey":"007"},{"$$hashKey":"00D","item":"2","description":"9v Battery","quantity":"1","price":"$0.99","link":"http://www.ebay.com/itm/2-PACKS-SONY-ULTRA-HEAVY-DUTY-9V-BATTERIES-99-pence-ONLY-/350788676243?pt=UK_ConsumerElectronics_Batteries_SM&hash=item51aca26a93"},{"$$hashKey":"00G","item":"3","description":"220ohms Resister","quantity":"1","link":"http://www.ebay.com/itm/100pcs-1-4W-220ohm-1-accuracy-Metal-Film-Resistor-220-Ohm-/251469396956?pt=LH_DefaultDomain_0&hash=item3a8cbe7bdc","price":"$1.26"},{"$$hashKey":"00J","item":"4","description":"Breadboard (The link attached to this breadboard comes with a set of jumpers)","quantity":"1","price":"$5.45","link":"http://www.ebay.com/itm/MB102-830-Tie-Points-Solderless-PCB-Breadboard-MB-102-65PCS-Jumper-cable-wires-/121101205763?pt=LH_DefaultDomain_0&hash=item1c3231c103"},{"$$hashKey":"00M","item":"5","description":"Arduino Uno","quantity":"1","link":"http://www.adafruit.com/products/50","price":"$29.95"},{"$$hashKey":"00P","item":"6","description":"Solder (1 Yard will be find, but you could purchase the bundle for later use)","quantity":"1 yard","link":"http://www.ebay.com/itm/1PCS-0-5mm-Tin-Lead-Rosin-Core-Solder-Soldering-Wire-100g-/261055245964?pt=LH_DefaultDomain_0&hash=item3cc81aee8c","price":"$6.61"},{"$$hashKey":"00S","item":"8","link":"http://www.ebay.com/itm/RESISTOR-10-K-OHM-1-4-WATT-5-NEW-NOS-QTY-100-/201025508105?pt=LH_DefaultDomain_0&hash=item2ece0dd309","description":"10kohms","quantity":"1","price":"$2.45"},{"$$hashKey":"00V","item":"9","description":"Tactile tact Push Button Switch 6x6x5mm","quantity":"1","link":"http://www.ebay.com/itm/10-Pcs-Tactile-tact-Push-Button-Switch-6x6x5mm-/221388102893?pt=LH_DefaultDomain_0&hash=item338bc25ced","price":"$2.38"},{"$$hashKey":"01F","item":"10","description":"Red, Orange, Green & White LEDs (LED Kit 120pcs)","quantity":"1","price":"$5.99","link":"http://www.ebay.com/itm/6-value-3mm-diffused-Round-LED-Kit-120pcs-Red-Green-Yellow-White-Blue-Orange-led-/291096400651?pt=LH_DefaultDomain_0&hash=item43c6b2930b"},{"$$hashKey":"01I","item":"11","description":"Jumper Links","quantity":"1","price":"$3.68","link":"http://www.ebay.com/itm/80-Pcs-20cm-2-54MM-Male-to-Female-Dupont-Wire-Jumper-Cables-for-Arduino-Shield-/290975002105?pt=LH_DefaultDomain_0&hash=item43bf762df9"},{"$$hashKey":"01L","item":"12","quantity":"1","description":"Piezo Sounder","price":"$1.50","link":"http://www.ebay.com/itm/Pack-of-3-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-20mm-/171245652652?pt=LH_DefaultDomain_0&hash=item27df094aac"},{"$$hashKey":"01O","item":"13","description":"USB A Male to B Mini 5 Pin Sync Cable (This cable already comes with your Arduino so its optional)","quantity":"1","price":"$1.04","link":"http://www.ebay.com/itm/New-Hot-Sale-stylish-USB-A-Male-to-B-Mini-5-Pin-Sync-Cable-Data-line-FM-US-/291098658669?pt=US_USB_Cables_Hubs_Adapters&hash=item43c6d5076d"}],"title":"Intelligent Traffic Control System (ITCS)","objective":"PROJECT AIM:\n\nThe aim of this project is to monitor and report on the traffic light in the country which is one of the cause of traffic in the country since most of them are not functioning and they are also been monitored manually. Our project initiative aims to solve the problem of manual monitoring. Our project will monitor traffic lights by the use of sensors and report to MTTU whenever a traffic light breaks down by triggering the sensors to pinpoint the location of where the traffic light is and send out an SMS alert to MTTU for them to know there is a traffic light breaks down. We believe this is going to help the MTTU monitor traffic light effectively and attend to them within the shortest possible time. We also want to use solar panels as secondary power and backup for the traffic lights ensuring that they are operational always.\n\n\nFeatures of the Circuit:\n• Monitor when the traffic light breaks down\n•\tSend out GPS location to base station\n•\tSend out SMS Alert to Base Station\n\n\nComponents Needed: \n•\tSoldering supplies (soldering iron, solder)\n•\t6 LED (We would actually use only 3 Red, Yellow and Green, but the other 3 would be spare )\n•\t9v Battery = 1\n• 100ohms Resister = 3\n•\tBreadboard = 1\n•\tPlug cables Male and Female (Long 3 & 3 Short)\n•\tArduino Uno = 1\n•\tArduino SIM900 GPRS/GMS Shield\t= 1\n\n\nChallenges Encountered:\n1.\tHow to monitor the circuit and alert when there is fault\n2.\tTiming differences between the traffic lights flashes.\n3.\tIdentifying the various types of traffic light the country has.","picture":"http://www.deviantsart.com/8eadk4.jpg","media":"http://www.deviantsart.com/8eadk4.jpg","ageGroup":"13-16","duration":"2 Weeks","content":"<h1>Title</h1>\n\n<p>Intelligent Traffic Control System (ITCS)</p>\n\n<h1>Picture</h1>\n\n<p>{{0}}</p>\n\n<h1>Objective</h1>\n\n<p>PROJECT AIM:</p>\n\n<p>The aim of this project is to monitor and report on the traffic light in the country which is one of the cause of traffic in the country since most of them are not functioning and they are also been monitored manually. Our project initiative aims to solve the problem of manual monitoring. Our project will monitor traffic lights by the use of sensors and report to MTTU whenever a traffic light breaks down by triggering the sensors to pinpoint the location of where the traffic light is and send out an SMS alert to MTTU for them to know there is a traffic light breaks down. We believe this is going to help the MTTU monitor traffic light effectively and attend to them within the shortest possible time. We also want to use solar panels as secondary power and backup for the traffic lights ensuring that they are operational always.</p>\n\n<p>Features of the Circuit:\n• Monitor when the traffic light breaks down\n• Send out GPS location to base station\n• Send out SMS Alert to Base Station</p>\n\n<p>Components Needed: \n• Soldering supplies (soldering iron, solder)\n• 6 LED (We would actually use only 3 Red, Yellow and Green, but the other 3 would be spare )\n• 9v Battery = 1\n• 100ohms Resister = 3\n• Breadboard = 1\n• Plug cables Male and Female (Long 3 & 3 Short)\n• Arduino Uno = 1\n• Arduino SIM900 GPRS/GMS Shield = 1</p>\n\n<p>Challenges Encountered:\n1. How to monitor the circuit and alert when there is fault\n2. Timing differences between the traffic lights flashes.\n3. Identifying the various types of traffic light the country has.</p>\n\n<h1>Duration</h1>\n\n<p>2 Weeks</p>\n\n<h1>Age Group</h1>\n\n<p>13-16</p>\n\n<h1>Materials</h1>\n\n<h2>1</h2>\n\n<ul>\n<li>description:Soldering Iron</li>\n<li>quantity:1</li>\n<li>price:$4.59</li>\n<li>link:<a href=\"http://www.ebay.com/itm/60W-110V-Pencil-Welding-Tip-Soldering-Iron-Solder-Heat-Tool-/350660165686?pt=LH_DefaultDomain_0&hash=item51a4f98036\">http://www.ebay.com/itm/60W-110V-Pencil-Welding-Tip-Soldering-Iron-Solder-Heat-Tool-/350660165686?pt=LH_DefaultDomain_0&hash=item51a4f98036</a></li>\n</ul>\n\n<h2>2</h2>\n\n<ul>\n<li>description:9v Battery</li>\n<li>quantity:1</li>\n<li>price:$0.99</li>\n<li>link:<a href=\"http://www.ebay.com/itm/2-PACKS-SONY-ULTRA-HEAVY-DUTY-9V-BATTERIES-99-pence-ONLY-/350788676243?pt=UK_ConsumerElectronics_Batteries_SM&hash=item51aca26a93\">http://www.ebay.com/itm/2-PACKS-SONY-ULTRA-HEAVY-DUTY-9V-BATTERIES-99-pence-ONLY-/350788676243?pt=UK_ConsumerElectronics_Batteries_SM&hash=item51aca26a93</a></li>\n</ul>\n\n<h2>3</h2>\n\n<ul>\n<li>description:220ohms Resister</li>\n<li>quantity:1</li>\n<li>price:$1.26</li>\n<li>link:<a href=\"http://www.ebay.com/itm/100pcs-1-4W-220ohm-1-accuracy-Metal-Film-Resistor-220-Ohm-/251469396956?pt=LH_DefaultDomain_0&hash=item3a8cbe7bdc\">http://www.ebay.com/itm/100pcs-1-4W-220ohm-1-accuracy-Metal-Film-Resistor-220-Ohm-/251469396956?pt=LH_DefaultDomain_0&hash=item3a8cbe7bdc</a></li>\n</ul>\n\n<h2>4</h2>\n\n<ul>\n<li>description:Breadboard (The link attached to this breadboard comes with a set of jumpers)</li>\n<li>quantity:1</li>\n<li>price:$5.45</li>\n<li>link:<a href=\"http://www.ebay.com/itm/MB102-830-Tie-Points-Solderless-PCB-Breadboard-MB-102-65PCS-Jumper-cable-wires-/121101205763?pt=LH_DefaultDomain_0&hash=item1c3231c103\">http://www.ebay.com/itm/MB102-830-Tie-Points-Solderless-PCB-Breadboard-MB-102-65PCS-Jumper-cable-wires-/121101205763?pt=LH_DefaultDomain_0&hash=item1c3231c103</a></li>\n</ul>\n\n<h2>5</h2>\n\n<ul>\n<li>description:Arduino Uno</li>\n<li>quantity:1</li>\n<li>price:$29.95</li>\n<li>link:<a href=\"http://www.adafruit.com/products/50\">http://www.adafruit.com/products/50</a></li>\n</ul>\n\n<h2>6</h2>\n\n<ul>\n<li>description:Solder (1 Yard will be find, but you could purchase the bundle for later use)</li>\n<li>quantity:1 yard</li>\n<li>price:$6.61</li>\n<li>link:<a href=\"http://www.ebay.com/itm/1PCS-0-5mm-Tin-Lead-Rosin-Core-Solder-Soldering-Wire-100g-/261055245964?pt=LH_DefaultDomain_0&hash=item3cc81aee8c\">http://www.ebay.com/itm/1PCS-0-5mm-Tin-Lead-Rosin-Core-Solder-Soldering-Wire-100g-/261055245964?pt=LH_DefaultDomain_0&hash=item3cc81aee8c</a></li>\n</ul>\n\n<h2>8</h2>\n\n<ul>\n<li>description:10kohms</li>\n<li>quantity:1</li>\n<li>price:$2.45</li>\n<li>link:<a href=\"http://www.ebay.com/itm/RESISTOR-10-K-OHM-1-4-WATT-5-NEW-NOS-QTY-100-/201025508105?pt=LH_DefaultDomain_0&hash=item2ece0dd309\">http://www.ebay.com/itm/RESISTOR-10-K-OHM-1-4-WATT-5-NEW-NOS-QTY-100-/201025508105?pt=LH_DefaultDomain_0&hash=item2ece0dd309</a></li>\n</ul>\n\n<h2>9</h2>\n\n<ul>\n<li>description:Tactile tact Push Button Switch 6x6x5mm</li>\n<li>quantity:1</li>\n<li>price:$2.38</li>\n<li>link:<a href=\"http://www.ebay.com/itm/10-Pcs-Tactile-tact-Push-Button-Switch-6x6x5mm-/221388102893?pt=LH_DefaultDomain_0&hash=item338bc25ced\">http://www.ebay.com/itm/10-Pcs-Tactile-tact-Push-Button-Switch-6x6x5mm-/221388102893?pt=LH_DefaultDomain_0&hash=item338bc25ced</a></li>\n</ul>\n\n<h2>10</h2>\n\n<ul>\n<li>description:Red, Orange, Green & White LEDs (LED Kit 120pcs)</li>\n<li>quantity:1</li>\n<li>price:$5.99</li>\n<li>link:<a href=\"http://www.ebay.com/itm/6-value-3mm-diffused-Round-LED-Kit-120pcs-Red-Green-Yellow-White-Blue-Orange-led-/291096400651?pt=LH_DefaultDomain_0&hash=item43c6b2930b\">http://www.ebay.com/itm/6-value-3mm-diffused-Round-LED-Kit-120pcs-Red-Green-Yellow-White-Blue-Orange-led-/291096400651?pt=LH_DefaultDomain_0&hash=item43c6b2930b</a></li>\n</ul>\n\n<h2>11</h2>\n\n<ul>\n<li>description:Jumper Links</li>\n<li>quantity:1</li>\n<li>price:$3.68</li>\n<li>link:<a href=\"http://www.ebay.com/itm/80-Pcs-20cm-2-54MM-Male-to-Female-Dupont-Wire-Jumper-Cables-for-Arduino-Shield-/290975002105?pt=LH_DefaultDomain_0&hash=item43bf762df9\">http://www.ebay.com/itm/80-Pcs-20cm-2-54MM-Male-to-Female-Dupont-Wire-Jumper-Cables-for-Arduino-Shield-/290975002105?pt=LH_DefaultDomain_0&hash=item43bf762df9</a></li>\n</ul>\n\n<h2>12</h2>\n\n<ul>\n<li>description:Piezo Sounder</li>\n<li>quantity:1</li>\n<li>price:$1.50</li>\n<li>link:<a href=\"http://www.ebay.com/itm/Pack-of-3-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-20mm-/171245652652?pt=LH_DefaultDomain_0&hash=item27df094aac\">http://www.ebay.com/itm/Pack-of-3-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-20mm-/171245652652?pt=LH_DefaultDomain_0&hash=item27df094aac</a></li>\n</ul>\n\n<h2>13</h2>\n\n<ul>\n<li>description:USB A Male to B Mini 5 Pin Sync Cable (This cable already comes with your Arduino so its optional)</li>\n<li>quantity:1</li>\n<li>price:$1.04</li>\n<li>link:<a href=\"http://www.ebay.com/itm/New-Hot-Sale-stylish-USB-A-Male-to-B-Mini-5-Pin-Sync-Cable-Data-line-FM-US-/291098658669?pt=US_USB_Cables_Hubs_Adapters&hash=item43c6d5076d\">http://www.ebay.com/itm/New-Hot-Sale-stylish-USB-A-Male-to-B-Mini-5-Pin-Sync-Cable-Data-line-FM-US-/291098658669?pt=US_USB_Cables_Hubs_Adapters&hash=item43c6d5076d</a></li>\n</ul>\n\n<h1>Steps</h1>\n\n<h2>Parts</h2>\n\n<p>{{1}}</p>\n\n<p>notes: These are minimum requirements you could order more for backup or expansion of this project.</p>\n\n<p>1 Breadboard (This is its module number type. Not really necessary)\n1 Jumper Links \n2 Red LEDs \n1 Orange (not amber, but optional)\n2 Green LEDs \n1 White LED \n1 Piezo Sounder\n1 Push to make button (Tactile tact Push Button Switch 6x6x5mm)\n1 10K Resistors\n1 220ohm Resistors\n1 Arduino Uno or Diecimila</p>\n\n<p>OPTIONAL - 1x 3m USB Cable</p>\n\n<p>Best news is, you won't need any tools or soldering for this project, it’s just pushing bits together! Once you have all the parts you are ready to assemble your project, however if you are planning to make this project more permanent you will want to get some form of strip board to solder your work down once it’s working.</p>\n\n<h2>Setting up the LEDs</h2>\n\n<p>{{2}}</p>\n\n<p>notes: Getting started is pretty easy, simply layout and check is all the components are intact, it’s best to have the Arduino to the left of the breadboard, and disconnected. The next steps of this guide will take you through mounting the components on the breadboard, wiring the breadboard to the Arduino, and finally programme the Arduino, after you will be able to test if it works.</p>\n\n<h2>Step 3</h2>\n\n<p>{{3}}</p>\n\n<p>notes: Before we begin ensure all LEDs are connected the right way else you might burn them. The short lead goes on the right and the longer on the left. We will be adding the resistors later so be sure not to plug in any power yet as it could damage the LEDs. </p>\n\n<p>The image below shows the long and short leads, and then the second image shows how they should be wired, third showing the order.</p>\n\n<p>TIP! Ensure that you have the LEDs spread across from the 5 column bit to the two column bit or else they will not work and you will have a short circuit.</p>\n\n<h2>Fixing the Piezo on the Breadboard</h2>\n\n<p>{{4}}</p>\n\n<p>notes: We will be coming back to this and will need to lift it to install jumpers to the Arduino but for now just put it in place with one pin on either side of the central divide so we don't short between the two pins.</p>\n\n<p>The bread board pins are connected from left to right in two sections of 5 with a divide in the middle to separate the two sections, and the 2 outer pins are connected from top to bottom in two columns, these are on both sides but are not connected from one side of the board to the other, in other terms these can be used to provide two separate circuits independent of each other if required.</p>\n\n<p>Additionally on some boards the top and bottom halves are not connected so you may have to make the jump using a wire from the top half to the bottom half if your circuit does not work.</p>\n\n<h2>Mounting the Push to Release Button</h2>\n\n<p>{{5}}</p>\n\n<p>notes: The button has 4 pins, ensure these are all connected and don't bend then like with the Piezo have it sit across the central divider.</p>\n\n<p>Next from the top wire the top right hand pin into the red side of the vertical pins, like the LEDs (see the 2nd image attached below)</p>\n\n<p>Use the resistor BROWN BLACK ORANGE GOLD (10k) and wire it as shown in the 4th image attached below. (From the bottom right running vertically down the board, a small way 1 inch is enough).</p>\n\n<h2>Resistors</h2>\n\n<p>{{6}}</p>\n\n<p>notes: Using the 220 ohm resistors wire from the LEDs across the divider to the same row on the opposite side, (See 2nd image for example) and repeat for all the LEDs.</p>\n\n<p>Add the white LED beween the Piezo and button and add a resistor to that LED also.</p>\n\n<p>The 3rd image below shows the final result. (note the GREEN wire is not necessary, unless your circuit doesn't work like mine did, it joins the top half of the boards power rails to the bottom half as some boards are split).</p>\n\n<h2>Wiring</h2>\n\n<p>{{7}}</p>\n\n<p>notes: Now we are going to wire the Arduino to the breadboard, the wires all word in the order from top to bottom, and do not cross over so if the wrong lights come on at the wrong time patch the cables back in the right places...</p>\n\n<p>Images below show how these should be wired.</p>\n\n<p>Image 2 & 3: From the 5v line go to the resistor we placed coming out of the button.</p>\n\n<p>Image 4 & 5: The green wire on the GND (ground) pin goes to the red rail which you connected the cathode of your LEDs to.</p>\n\n<p>Image 6: The LEDs are wired in turn from pin 13 down to 8 starting at the top LED working your way down the bread board. This is why I said to have the board to the left as you can wire it as below...</p>\n\n<p>13 o--------o ---/\\/\\/\\/\\/--- ---O---|\n12 o--------o ---/\\/\\/\\/\\/--- ---O---|\n11 o--------o ---/\\/\\/\\/\\/--- ---O---|\n10 o--------o ---/\\/\\/\\/\\/--- ---O---|\n09 o--------o ---/\\/\\/\\/\\/--- ---O---|</p>\n\n<p>Image 7: Wire the orange wires like before to the Piezo (pin 8), wait led (pin 7) and button (pin 6)</p>\n\n<p>Note the position of pin 6 is critical other wise the traffic lights will constantly loop as if the button was held down.</p>\n\n<h2>Programming The Arduino</h2>\n\n<p>{{8}}</p>\n\n<p>notes: Programming the Arduino could not be easier, however we have to tell the Arduino IDE where to look for the Arduino and what type of Arduino to talk to.</p>\n\n<p>To tell it what type to talk to go to TOOLS > BOARD > ARDUINO DIECIMILA.</p>\n\n<p>To tell it where to look for the Arduino go to TOOLS > SERIAL PORT, and choose the most logical port, it will say usb serial or some thing similar, not bluetooth or any thing else, worst case scenario you get it wrong and have to set it to another port.</p>\n\n<p>Now you to open the attached PDE file and upload it to the board, by pressing the button with an arrow pointing to some dots/...</p>\n\n<p>-> |</p>\n\n<p>This will take a few moments and if successful your Arduino will now be running the code, press the button furthest to the right (serial monitor) to control the board with a terminal like interface.</p>\n\n<h1>Notes</h1>\n\n<p>Below is the code snippets for this project.</p>\n\n<h1>include // Include the EEPROM library</h1>\n\n<p>// Settings</p>\n\n<h1>define crossTime 3000</h1>\n\n<h1>define changeTime 1500</h1>\n\n<h1>define waitTime 3000</h1>\n\n<h1>define beeps 50</h1>\n\n<h1>define beepLength 10</h1>\n\n<h1>define beepPitch 1</h1>\n\n<h1>define beepSilence 75</h1>\n\n<p>// PIN CONFIGUTRATION</p>\n\n<h1>define redLed 13</h1>\n\n<h1>define yellowLed 12</h1>\n\n<h1>define greenLed 11</h1>\n\n<h1>define greenManLed 10</h1>\n\n<h1>define redManLed 9</h1>\n\n<h1>define button 6</h1>\n\n<h1>define waitLed 7</h1>\n\n<h1>define sounder 8</h1>\n\n<p>// Other Settings</p>\n\n<h1>define disableBeeper 0 // Which byte of memory will store the</h1>\n\n<p>// disableBeeper value.\n/*\n //////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n END OF SETTINGS\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////////////\n */</p>\n\n<p>int stopCount = 0;\nint firstRun = 1;</p>\n\n<p>/<strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>\n * SETUP\n <strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>/</p>\n\n<p>void setup()\n{\n Serial.begin(9600); // Setup for serial communuication at 9600bps\n pinMode(redLed, OUTPUT); // Define pin modes\n pinMode(yellowLed, OUTPUT);\n pinMode(greenLed, OUTPUT);\n pinMode(greenManLed, OUTPUT);\n pinMode(redManLed, OUTPUT);\n pinMode(waitLed, OUTPUT);\n pinMode(sounder, OUTPUT);\n pinMode(button, INPUT);\n}</p>\n\n<p>/<strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>\n * BEEPER\n <strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>/\nvoid beeper() {\n if (!EEPROM.read(disableBeeper)) { // If the disableBeeper byte is not true\n Serial.println(\"Beeping\"); // Print to screen that were beeping\n for (int i = 0; i < beeps; i++) { // Loop for defined number of beeps\n for (int i = 0; i < beepLength; i++) { // For defined beep length\n digitalWrite(sounder, HIGH); // Beeper on\n delay(beepPitch); // Delay\n digitalWrite(sounder, LOW); // Beeper off\n delay(beepPitch); // Delay\n }\n delay(beepSilence); // Silence between beeps\n }\n }\n}</p>\n\n<p>/<strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>\n * STOP\n <strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>/</p>\n\n<p>void stop() {\n stopCount++; // Increase stop count by 1\n Serial.println(\"\"); // Print a marker with the stop count\n Serial.print(\"==[\");\n Serial.print(stopCount);\n Serial.println(\"]==========================\");</p>\n\n<p>// Commence stop sequence</p>\n\n<p>digitalWrite(waitLed, HIGH); // Turn on wait light\n delay(waitTime); // Delay</p>\n\n<p>Serial.println(\"TRAFFIC - Caution\"); // Print the change in light status\n digitalWrite(greenLed, LOW); // Turn off green traffic light\n digitalWrite(yellowLed, HIGH); // Turn on yellow traffic light\n delay(changeTime); // Delay</p>\n\n<p>Serial.println(\"TRAFFIC - Stop\"); // Print change in light status\n digitalWrite(yellowLed, LOW); // Turn off yellow traffic light\n digitalWrite(redLed, HIGH); // Turn on red traffic light\n delay(changeTime); // Delay</p>\n\n<p>Serial.println(\"PEDESTRIANS - Go\"); // Print change in light status\n digitalWrite(waitLed, LOW); // Turn off wait light\n digitalWrite(redManLed, LOW); // Turn off red pedestrian light\n digitalWrite(greenManLed, HIGH); // Turn on green pedestrian light\n beeper(); // Perform beeper function\n delay(changeTime); // Delay</p>\n\n<p>Serial.println(\"PEDESTRIANS - Stop\"); // Print change in light status\n digitalWrite(greenManLed, LOW); // Turn off green pedestrian light\n digitalWrite(redManLed, HIGH); // Turn on red pedestrian light\n delay(changeTime); // Delay</p>\n\n<p>Serial.println(\"TRAFFIC - Caution\"); // Print change in light status\n digitalWrite(yellowLed, HIGH); // Turn on yellow traffic light\n delay(changeTime); // Delay</p>\n\n<p>Serial.println(\"TRAFFIC - Go\"); // Print change in light status\n digitalWrite(redLed, LOW); // Turn off red traffic light\n digitalWrite(yellowLed, LOW); // Turn off yellow traffic light\n digitalWrite(greenLed, HIGH); // Turn on green traffic light\n Serial.println(\"\"); // Print a clean line\n}</p>\n\n<p>/<strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>\n * MAIN LOOP\n <strong><em>*</em>**<em>*</em>**<em>*</em>***</strong>/</p>\n\n<p>void loop()\n{\n if (firstRun) { // Check to see if this is the first loop\n Serial.println(\"\"); // Print menu\n Serial.println(\"+------------------------+\");\n Serial.println(\"| TRAFFIC CONTROL SYSTEM |\");\n Serial.println(\"+------------------------+\");\n Serial.println(\"\");\n Serial.println(\"Commands: [s]top traffic\");\n Serial.println(\" [t]oggle beeper\");\n Serial.println(\"\");</p>\n\n<pre><code>if (EEPROM.read(disableBeeper)) { // Check EEPROM to see if the beeper should be disabled\n Serial.println(\"NOTE - Beeper disabled\"); // If it should be then print a message\n}\n\nfirstRun = 0; // Mark the firstRun = 0 so we don't do this\n</code></pre>\n\n<p>} // again as we are looping</p>\n\n<p>digitalWrite(greenLed, HIGH); // Set the default lights to on\n digitalWrite(redManLed, HIGH);</p>\n\n<p>if (!digitalRead(button)) { // If the button is pressed\n stop(); // Perform stop function\n }</p>\n\n<p>if (Serial.available() > 0) { // If serial data is avaialble\n int serialData = Serial.read(); // Read one byte of data into the var\n if (serialData == 115) { // If the byte == ASCI 115\n stop(); // Perform stop function</p>\n\n<pre><code>}\nelse if (serialData == 116) { // If the byte == ASCI 116\n if (EEPROM.read(disableBeeper)) { // Check to see if beeper disabled\n EEPROM.write(disableBeeper, 0); // Enable it\n Serial.println(\"Beeper enabled\"); // Print beeper enabled\n }\n else { // If beeper is enabled\n EEPROM.write(disableBeeper, 1); // Disable beeper\n Serial.println(\"Beeper disabled\"); // Print beeper disabled\n }\n}\nelse {\n Serial.println(\"ERROR - Command not recognised!\"); // For any other value print an error msg.\n}\n</code></pre>\n\n<p>}\n}</p>","ownedByMe":"true","notes":"Below is the link to the code snippets for this project.\n\nhttp://goo.gl/pGev0r"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment