Programming of a Led Matrix with a Digital Vu Meter Application Ws 2015 Bachelor Arbeit
Total Page:16
File Type:pdf, Size:1020Kb
PROGRAMMING OF A LED MATRIX WITH A DIGITAL VU METER APPLICATION WS 2015 BACHELOR ARBEIT Academic Supervisor: Prof. Dr. Roland Mandl Technical Supervisor: Gerald Schickuber Student: Norberto Albujer Matriculation Number: 2738245 INDEX INTRODUCTION ............................................................................................................ 9 CHAPTER 1 ............................................................................................................... 11 ARDUINO BASIC FEATURES ............................................................................................ 11 1.1 WHAT IS ARDUINO? .......................................................................................... 12 1.2 HARDWARE ................................................................................................... 12 1.2.1 ARDUINO DUE ................................................................................................ 12 1.3 SOFTWARE ......................................................................................................... 23 1.3.1 ARDUINO SOFTWARE ....................................................................................... 23 1.3.2 ADAFRUIT NEO PIXEL LIBRARY ............................................................................ 26 CHAPTER 2 ............................................................................................................... 27 DEVICES CONNECTED TO ARDUINO ................................................................................. 27 2.1 LED MATRIX ....................................................................................................... 28 2.2 WS2812b LED ..................................................................................................... 30 2.3 ELECTRIC CIRCUIT................................................................................................ 37 2.3.1THEORICAL ELECTRIC CIRCUIT ............................................................................ 37 2.3.2 PRACTICAL CIRCUIT ON PROTOBOARD .................................................................. 50 2.3.3 PCB DESIGN .................................................................................................. 52 CHAPTER 3 ............................................................................................................... 58 3D CAD DESIGN WITH SOLIDWORKS ................................................................................. 58 3.1 WHAT IS SOLIDWORKS? .......................................................................................... 59 3.2 3D CAD LED MATRIX BOX DESIGNS ............................................................................. 59 CHAPTER 4 ............................................................................................................... 63 3D PRINTER .............................................................................................................. 63 4.1 PRINTER SOFTWARE ............................................................................................. 64 4.2 PRINTER SLICER .................................................................................................. 65 4.3 RESULTS ........................................................................................................... 66 CHAPTER 5 ............................................................................................................... 69 APPLICATION ............................................................................................................ 69 5.1 APPLICATION MODES............................................................................................. 70 5.2 PROGRAMMING USER FUNCTIONS ............................................................................. 71 Programming of a LED Matrix with a Digital VU Meter application 5.2 FLOW CHART ...................................................................................................... 77 CHAPTER 6 ............................................................................................................... 79 CONCLUSIONS AND VALUATIONS .................................................................................... 79 6.1 CONCLUSION AND PROBLEMS .................................................................................. 80 6.2 VALUATIONS ...................................................................................................... 81 BIBLIOGRAPHY ........................................................................................................... 82 ANNEX 1. ADAFRUIT NEOPIXEL LIBRARY .......................................................................... 83 ANNEX 2. APPLICATION CODE ........................................................................................ 87 ANNEX 3. VU METER PCB ............................................................................................. 116 ANNEX 4. 3D CAD PLANS ............................................................................................. 120 4 LIST OF FIGURES Figure 1. Front and back side of Arduino Due Figure 2. Arduino Due PinOut diagram Figure 3. Arduino’s Due USB ports Figure 4. Composition of arduino’s software Figure 5. Ws2812b LED matrix Figure 6. Ws2812b LED mechanical dimensions Figure 7. Ws2812b LED pin configuration Figure 8. Ws2812b LED sequence chart Figure 9. Ws2812b LED cascade method Figure 10. Ws2812b LED data transmission code Figure 11. Ws2812b LED typical application circuit Figure 12. Schematic of an operational amplifier Figure 13. Schematic of TLV2772A operational amplifier Figure 14. Dual voltage power supply for an operational amplifier Figure 15. Artificial ground for an operational amplifier Figure 16. Operational amplifier with the inputs connected to the same potential. Figure 17. AC capacitive coupling in an operational amplifier Figure 18. Schematic of a differential amplifier Figure 19. Schematic of an inverter operational amplifier Figure 20. Schematic of a buffer Figure 21. Schematic circuit for bode diagram Figure 22. Bode diagram Figure 23. Microphone und amplifier signals Figure 24. Schematic of the final amplifier electric circuit Figure 25. Control panel of EAGLE software Figure 26. Schematic of the electronic board Figure 27. Layout of the electronic board Figure 28. PCB with elements solded Figure 29. Safety connections for the PCB Figure 30. SolidWorks software Figure 31. First 3D LED matrix box design Figure 32. Second 3D LED matrix box design Figure 33. Final 3D LED matrix box design Figure 34. X400 3D printer Figure 35. Simplify 3D software Figure 36. 3D printer parameters Figure 37. Failed printout Figure 38. Third trial results Figure 39. Application flow chart Figure 40. Application modes LIST OF TABLES Table 1. Summary of Arduino’s Due features Table 2. Specifications LED matrix Table 3. WS2812b LED pin functions Table 4. WS2812b LED absolute maximum ratings Table 5. WS2812b LED electrical characteristics Table 6. WS2812b LED switching characteristics Table 7. WS2812b LED characteristics parameter Table 8. WS2812b LED data transfer time Table 9. Features of the TLV2772A Operational Amplifier. ABBREVIATIONS AND DEFINITIONS ADC: Analog to digital converter API: In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications. An API expresses a software component in terms of its operations, inputs, outputs, and underlying types. An API defines functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising each other. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together. ARM: ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings. AVR microcontroller: The AVR is a modified Harvard architecture 8- bit RISC single-chip microcontroller, which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM,EPROM, or EEPROM used by other microcontrollers at the time. MegaAVR chips became popular after they were designed into the 8-bit Arduino platform. CPU: Central Processing Unit DAC: Digital to analog converter (DAC, D/A, D2A or D-to-A). I2C: I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips Semiconductor, known today as NXP Semiconductors, used for attaching low-speed peripherals to computer motherboards and embedded systems. Alternatively I²C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C). ICSP: It is an AVRtiny programming header for the Arduino consisting of MOSI, MISO, SCK, RESET, VCC, GND. It is often referred to as an SPI (Serial Peripheral Interface) which could be considered an "expansion" of the output, but really, you are slaving the output device to the master of the SPI bus. JTAG: Joint Test Action Group (JTAG) is the common name for the IEEE 1149.1 Standard Test Access Port and Boundary-Scan Architecture. It was initially devised by electronic engineers for testing printed circuit boards using boundary scan and is still widely used for this application. Today, JTAG is also widely used for IC debug ports. In