Home About Me Weekly Projects Final Project

Electronics Design


COUNTDOWN




Electronics Design Assignment




For this week, we had two assignments:






Group Assignment






Individual Assignment

For the Individual Assignment we had to re-design the Hello Board, produce and program it. The following steps were taken to achieve the given task:

  1. First I took a look at the Hello Board circuit and its components so I can have a benchmark to start.


  2. HelloBoard

  3. The next step is designing the PCB, I used EAGLE software to complete this task
  4. The next step would be starting a new project on Eagle. And take the follwing steps:
  5. After Finalizing the board, it is time to start the milling process. In order to do so the following steps need to be taken:
  6. The next step is soldering components onto PCB (Refer to Week4 Assignment for details)


  7. PCB

  8. Now that the PCB has been designed, milled and soldered, It is time to program the PCB.
  9. Now that the Arduino is serving as an ISP, it is time to connect our PCB to the Arduino
  10. Now under the tools tab, Burn Bootloader


  11. Arduino-PCB

  12. Now it is time to write the code on the Arduino IDEthat the the PCB is going to execute.



  13. int LED= 7; int BTN= 3; int ButtonState= 0; int ButtonCount= 0; int ButtonLast= 0; void setup() { // put your setup code here, to run once: pinMode (LED, OUTPUT); pinMode (BTN, INPUT); } void loop() { // put your main code here, to run repeatedly: ButtonState= digitalRead(BTN); if (ButtonState == HIGH) { delay(200); ButtonState= digitalRead(BTN); if (ButtonState == HIGH) { digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(300); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); }else if (ButtonState == LOW) {digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(300); digitalWrite (LED, LOW); delay(150); digitalWrite (LED, HIGH); delay(100); digitalWrite (LED, LOW); delay(150); } } }




  14. I have deigned this code to do two similar tasks based on the input. Since it is my first time programming an arduino I went with something simple and basic yet made the most out of it. Since I had one Button and one LED, I made the LED to flash different Morse codes.
  15. Then Check the Code and Upload it to the PCB through the Arduino Software


  16. Arduino-PCB

  17. Upload the code using the 'Upload using programmer' tool under 'Sketch'


  18. Arduino Upload

  19. Once everything is set you could just plug in the VCC and the GND and your PCB is ready


  20. Note: Although everything worked out fine, a mistake was done with the addition of the button, a 10K resistor should be added to have a cleaner signal. I was lucky that the pin I associated the button with has an internal pull up resistor called a floating pin that could be activated and solve the issue. To activate the pull up resistor all I had to do was change the code from (button, INPUT) to (button, INPUT_PULLUP).






Downloads

Eagle Schematic


Eagle Board


Gimp File


Internal Traces PNG

External Traces PNG

Pin holes PNG

Arduino Code