Design and build a rotating LED display

156 downloads 13513 Views 5MB Size Report
Oct 31, 2012 - 5.2 Generator structure design . ..... Figure 11: AC generator design diagram . ...... function along with any custom functions in an .ino file. This file ..... https://dragonfly486.wordpress.com/2012/10/31/flicker-fusion-frequency-fff/.
Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Mechatronic Project 478 Final Report

Design and build a rotating LED display

Mr A Bestbier 16968107 Supervisor: Mr WS Smit 2015

i

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Design and build a rotating LED display Mechatronic Project 478 Final Report

Mr A Bestbier Student Number: 16968107 Supervisor: Mr WS Smit

23 October 2015

i

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

Contents List of figures ......................................................................................................... vi List of tables........................................................................................................ viii Executive Summary .............................................................................................. ix ESCA Outcomes ..................................................................................................... x Acknowledgements ..............................................................................................xii 1

Introduction ..................................................................................................... 1 1.1 Problem formulation................................................................................ 1 1.2 Objectives ................................................................................................ 2 1.3 Motivation ............................................................................................... 2

2

Literature study .............................................................................................. 3 2.1 Physiological study.................................................................................. 3 2.2 Existing rotating displays ........................................................................ 4 2.3 Electromagnetic induction ....................................................................... 5 2.3.1 AC Generation ............................................................................. 5 2.3.2 Inductive coupling ....................................................................... 6

3

Quality function deployment ......................................................................... 7 3.1 Project requirements ................................................................................ 7 3.2 Engineering characteristics...................................................................... 8

4

Concept generation and evaluation ............................................................... 9 4.1 Physical decomposition ........................................................................... 9 4.2 Conceptual solutions ............................................................................... 9 4.2.1 Spinning rod .............................................................................. 10 4.2.2 Motor ......................................................................................... 11 4.2.3 Communication ......................................................................... 11 4.2.4 Power transfer ............................................................................ 11 4.2.5 Processor .................................................................................... 13 4.3

5

4.2.6 Position sensor ........................................................................... 13 Final concept ......................................................................................... 14

AC generator design ..................................................................................... 15 5.1 Magnetic field design ............................................................................ 15 5.2 Generator structure design..................................................................... 17 5.3 Testing of the AC generator .................................................................. 18 ii

Rotating LED display

Final Report

Andre Bestbier

2015 6

16968107

Electronic circuit design ............................................................................... 20 6.1 Power supply ......................................................................................... 20 6.2 LED strip ............................................................................................... 21 6.3 Bluetooth module .................................................................................. 23 6.4 Photo interrupter .................................................................................... 23 6.5 Controller............................................................................................... 24 6.6 Speed control ......................................................................................... 24 6.7 Testing of electronic subsystems ........................................................... 25 6.7.1 Power supply ............................................................................. 25 6.7.2 Photo interrupter ........................................................................ 25 6.7.3 Speed control ............................................................................. 26

7

Physical structure design.............................................................................. 27 7.1 Base design ............................................................................................ 27 7.2 Rod design ............................................................................................. 28 7.3 Assembly of the physical structure ....................................................... 29 7.4 Testing of the physical structure ........................................................... 30

8

Software ......................................................................................................... 31 8.1 Controlling shift registers ...................................................................... 32 8.2 Bluetooth setup and communication ..................................................... 33 8.2.1 Configuration in command mode .............................................. 33 8.2.2 Communication in data mode .................................................... 33 8.3

8.2.3 Data storage ............................................................................... 34 Sensor read and timing .......................................................................... 34 8.3.1 Reading sensor values ............................................................... 34

8.4

8.3.2 Timing the display ..................................................................... 34 User interface ........................................................................................ 35 8.4.1 Setting up the serial connection ................................................. 35 8.4.2 Graphical user interface ............................................................. 35 8.4.3 Input conversions ....................................................................... 36

9

Evaluation and recommendations ............................................................... 37 9.1 AC generator evaluation ........................................................................ 37 9.2 Electronic circuit evaluation .................................................................. 37 9.3 Physical structure evaluation ................................................................. 38 9.4 Software evaluation ............................................................................... 38 9.5 Overall evaluation and results ............................................................... 39

10 Conclusion ..................................................................................................... 41 iii

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

11 References ...................................................................................................... 42 Appendix A: Techno-economic analysis....................................................... 44 A1. Time schedule........................................................................................ 44 A2. Budget and actual costs ......................................................................... 44 A3. Technical impact ................................................................................... 46 A4. Return on investment............................................................................. 46 A5. Potential for commercialization ............................................................ 46 Appendix B:

Risk assessment ........................................................................ 47

Appendix C: Calculations .............................................................................. 49 C1. Engineering characteristics.................................................................... 49 C1.1

Display resolution ...................................................................... 49

C1.2

LED light intensity .................................................................... 49

C1.3

Minimum on time for LED........................................................ 49

C1.4

Maximum time to switch LEDs................................................. 49

C1.5

Power need for spinning circuit ................................................. 50

C1.6

Motor torque .............................................................................. 50

C1.7 Power need for motor ................................................................ 52 C2. AC generator design .............................................................................. 52 C2.1

Designed induced voltage .......................................................... 52

C2.2 Actual induced voltage .............................................................. 52 C3. Electronic circuits .................................................................................. 53 C3.1

Smoothing capacitor .................................................................. 53

C3.2

Register shifting time ................................................................ 54

C3.3

LED resistor sizes ...................................................................... 54

C3.4

Actual motor torque ................................................................... 54

Appendix D: Data sheets ................................................................................ 55 D1. Photo interrupter .................................................................................... 55 D2. Voltage regulator ................................................................................... 56 D3. RBD LEDs ............................................................................................ 57 D4. Shift registers ......................................................................................... 58 Appendix E: Source code ............................................................................... 59 E1. loop() function ....................................................................................... 59 E2. displayFunction() function .................................................................... 60 E3. readSerial() function .............................................................................. 60 E4. shift() function ....................................................................................... 61 iv

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

E5. bluetoothSetup() function ...................................................................... 61 Appendix F:

LED strip schematic diagram................................................. 62

Appendix G: Detailed drawings .................................................................... 63 G1. Shaft layout drawing ............................................................................. 63 G2. Base layout drawing .............................................................................. 63 G3. Rod layout drawing ............................................................................... 65

v

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

List of figures Figure 1: Illusion of motion used in film industry [Eadweard Muybridge] .............................. 3 Figure 2: Path of vision from object to brain [Mike Wood] ...................................................... 3 Figure 3: Homemade rotating LED display [Vamsi Danda] ..................................................... 4 Figure 4: Rotating LED display kit [Beijiayue] ......................................................................... 5 Figure 5: AC generator principles [Wayne Storr]...................................................................... 6 Figure 6: Diagram of electromagnetic coupling principles [A. Bestbier] ................................. 6 Figure 7: Physical decomposition of rotating LED display ....................................................... 9 Figure 8: Orientation concepts, A and B ................................................................................. 10 Figure 9: Two methods of power transfer [A Bestbier] ........................................................... 11 Figure 10: CAD model of generated concept rotating display ................................................ 14 Figure 11: AC generator design diagram ................................................................................. 15 Figure 12: Cross section of AC generator................................................................................ 16 Figure 13: Flux density plots of AC generator ........................................................................ 16 Figure 14: Manufactured shaft with copper coils .................................................................... 17 Figure 15: Sectioned CAD drawing of AC generator (left) and actual AC generator (right) . 18 Figure 16: Oscilloscope reading of generator output ............................................................... 19 Figure 17: Schematic diagram of the rectifier and regulator circuit ........................................ 20 Figure 18: Plot of voltage over the capacitor versus time ....................................................... 21 Figure 19: Schematic diagram of a section of LED strip......................................................... 22 Figure 20: LED strip PCB layout............................................................................................. 22 Figure 21: Front and back of manufactured PCB .................................................................... 22 Figure 22: Schematic diagram of photo interrupter ................................................................. 23 Figure 23: Schematic diagram of complete spinning circuitry ................................................ 24 Figure 24: Voltage levels of photo interrupter gate in operation ............................................. 25 Figure 25: Base CAD drawing ................................................................................................. 27 Figure 26: CAD design of the rod............................................................................................ 28 Figure 27: Exploded CAD assembly of display ...................................................................... 29 Figure 28: Completed rotating LED display............................................................................ 30 Figure 29: Flow diagram of function sequence ....................................................................... 31 Figure 30: Flow diagram of shift() function ............................................................................ 32 Figure 31: Flow of information through the Bluetooth connection ......................................... 34 Figure 32: Flow diagram of the display‟s timing process........................................................ 35 vi

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 33: Graphical user interface screenshots ...................................................................... 36 Figure 34: "ABC" text displayed ............................................................................................. 39 Figure 35: "LED" text displayed .............................................................................................. 39 Figure 36: Picture of a house displayed ................................................................................... 40 Figure 37: Picture of a boat displayed ..................................................................................... 40 Figure 38: Gantt chart of the rotating LED display schedule .................................................. 44 Figure 39: Bar chart of actual an planned costs ....................................................................... 45 Figure 40: Diagram of spinning rod......................................................................................... 50 Figure 41: Diagram of rotating loop ........................................................................................ 51 Figure 42: Actual magnetic flux density plot of AG generator ............................................... 52 Figure 43: Plot of rectifier output versus time ......................................................................... 53 Figure 44: Schematic diagram of LED strip ............................................................................ 62

vii

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

List of tables Table 1: Engineering characteristics .......................................................................................... 8 Table 2: Evaluation of orientation concepts ............................................................................ 10 Table 3: Evaluation of orientation concepts ............................................................................ 12 Table 4: Processor evaluation .................................................................................................. 13 Table 5: Costs of purchases and manufacturing ...................................................................... 45 Table 6: Contact details in case of an emergency .................................................................... 48 Table 7: Forward voltage drops for LEDs ............................................................................... 54

viii

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

Executive Summary Title of Project Rotating LED display Objectives Design, build and test a rotating display prototype that relies on the “memory” of the human eye to build up an image. What (am I going to / did I) do that is new/unique? The display will be durable and reliable, unlike previous attempts. A unique user interface will be written to control the device wirelessly. The display will not use slip rings to transfer power to the rotating circuitry; instead it will use some kind of “wireless” power transfer method. What are the (expected) findings? The design and construction of a functioning rotating LED display prototype is the expected end result. A user must be able to control the image to be displayed by means of a user interface on a personal computer. A clear and stable image is expected to be displayed to the onlookers. The display should be durable and reliable. What value will/do the results have? A working prototype will be built that can act as a stepping stone to a production model. Subsystems developed during this project will be unique and possibly of value for future projects. The device will use electronics to demonstrate a physiological phenomenon in an aesthetically pleasing and exciting way that will inspire people and capture the imagination. If more than one student is involved, what part will/did I do? No other students are involved. Which aspects of the project will carry on after completion of my part? The continuation of the project is not yet planned. Future projects may be undertaken to optimise the display and to implement image processing software to allow the user to display any image from the computer.

ix

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

ESCA Outcomes 1. Problem solving:  Analyses and defines the problem  Identifies the criteria for an acceptable solution  Identifies necessary information, engineering knowledge and skills  Generates, analyses and evaluates possible approaches to solution  Formulates and presents the solution in an appropriate form 2. Application of scientific and engineering knowledge:  Mathematical and numerical analysis – models engineering components  Communicates concepts, ideas and theories with the aid of mathematics  Uses physical laws for the solution of engineering problems 3. Engineering design:  Designs components, systems or products as part of the project  Plans and manages the design process  Acquires and evaluates knowledge: applies correct principles, evaluates and uses design tools  Performs analysis, quantitative modelling and optimisation  Alternatives were critically considered, evaluated and solution was found  Techno-economic analyses  Project‟s result is functional and utilises knowledge from the applicable areas 5. Engineering methods, skills and tools, Information Technology:  Uses appropriate engineering methods, skills and tools  Tests and assesses the results produced by the method, skill or tool  Creates computer applications as required by the discipline 6. Professional and technical communication:  Uses appropriate structure, style and language  Uses effective graphical support 8. Individual, team and multidisciplinary working:  Identifies and focuses on objectives  Works strategically  Executes tasks effectively 9. Independent learning ability:  Applicable independent research was conducted and sensibly used  Sources and evaluates information  Accesses and applies knowledge acquired outside formal instruction

x

Chapters 1.1 1.2, 3.1, 3.2 2 4.1, 4.2, 4.3 4.3 Chapters 5.2, 6.1 2, 3, 5, 6 Appendix C 5 Chapters 5, 6, 7, 8 4.3 2, 5, 6, 7, 8 5.2, 6.1 4 Appendix B 9.5 Chapters 5.2, 5.4, 6.1, 6.2 5, 6, 7 8, Appendix D Chapters All chapters, reports, presentation Chapters 1.2 All chapters 9 Chapters 2 References

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Department of Mechanical and Mechatronic Engineering Stellenbosch University Declaration I know that plagiarism is wrong. Plagiarism is to use another's work (even if it is summarised, translated or rephrased) and pretend that it is one's own. This assignment is my own work. Each contribution to and quotation (e.g. "cut and paste") in this assignment from the work(s) of other people has been explicitly attributed, and has been cited and referenced. In addition to being explicitly attributed, all quotations are enclosed in inverted commas, and long quotations are additionally in indented paragraphs. I have not allowed, and will not allow, anyone to use my work (in paper, graphics, electronic, verbal or any other format) with the intention of passing it off as his/her own work. I know that a mark of zero may be awarded to assignments with plagiarism and also that no opportunity be given to submit an improved assignment. I know that students involved in plagiarism will be reported to the Registrar and/or the Central Disciplinary Committee.

Name: .................................................. Student no: .................................................. Signature: .................................................. Date: ..................................................

xi

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Acknowledgements I would like to thank Mr Smit, supervisor of this project, for his guidance, leadership and support. I would also like to thank all the technical staff of the Electrical and Electronic Engineering department who assisted me with the technical and practical aspects of the project, with special thanks to Mr Petzer, Mr Brandt and Mr Pieterse.

xii

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

1 Introduction The ability to transfer information and meaning is a central part of human existence. Since the start of the electrical era a wonderful array of new ways of communication became possible. Electrical screens form a major part of this revolution and there is a permanent need for new and existing ways to display images electronically. The purpose of this project is to investigate, design and build a display that relies on the „memory‟ of the human eye in order to build up an image. The design consists of a spinning rod with a strip of small and bright, tri-coloured light emitting diodes (LEDs) at the end. The LEDs are turned on at the right moments to build up an image. A user is able to control the image to be displayed through a user interface on a personal computer. This project will set out to achieve the original objectives as described by the project definition and the study leader. This document is a design report. It will provide some technical background about the topic, after which the design and manufacture procedure will be discussed. Lastly the rotating LED display will be evaluated to see if it can display a clear and steady image in a reliable and sustainable way.

1.1 Problem formulation This project arose from the need to solve a complex problem. The problem can be broken into its basic parts in order to obtain a better understanding of it. The need was initially stated by the project supervisor, Mr Smit, as follows:    

A display should be built. The display should rely on the memory of the human eye to build up an image. The design contains a thin, spinning rod with small and bright, tri-colour LEDs. LEDs should be turned on at the right moments to build up the image.

Additional details about the problem were gained through discussions with the project supervisor. Subsequent assumptions could be made about the problem, based on a background of engineering knowledge and practical experience. By compiling all these given and derived goals, a complete problem definition can be formulated as follows: Design and build a durable and reliable rotating LED display. The display should use the memory of the human eye to build up an image by switching a strip of bright, tri-coloured LEDs on and off while spinning them on a thin rod.

1

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

1.2 Objectives In order to solve the problem defined above, certain objectives need to be set. Achieving these objectives will lead to a successful solution to the problem. The primary objective is to design and build a rotating LED display. Being a complex problem it can be divided into various secondary objectives. The following are the secondary objectives that guided this project:      

To do research and to obtain information concerning the principles and functionality of the rotating LED display. To design and construct a reliable and durable mechanical structure to support and spin the LED rod. To design and assemble an electronic circuit to control the LED display. To design and implement a durable and effective way of powering the circuit. To design and create a way to communicate with the rotating LED display in order to send commands and telling it what to display. To end up with a working prototype of a rotating LED display incorporating all the above-mentioned features, as well as being more reliable and durable than current models.

This report will discuss the above-mentioned objectives and document the design and implementation processes that accompany each. These objectives also serve as a definition of the project‟s scope. All tasks necessary to reach these objectives are within the project‟s scope. Design philosophies that guided this project include design for durability, reliability, simplicity and efficient use of space and material.

1.3 Motivation The motivation behind this project is to push the boundaries of the electronic display as it is known today. The driving force is innovation and the creation of a unique prototype to inspire and capture the imagination of onlookers. The rotating LED display and related technology have many uses, which justifies the money and time that will be spent on this project. The display can be used in the fields of advertising, display signs, entertainment and aesthetics. A unique attribute of this rotating display is the fact that its physical form is notably smaller than its apparent size when spinning. This means that when not in use this display will occupy a fraction of the space of a normal display, as well as use far less LEDs than a stationary LED display. Modified versions of the rotating LED display can be used on a variety of spinning structures, like wheels, fans and wind turbines. The distinctive sub-systems, algorithms and features developed in this project will lead the way in creating better rotating LED display in future and may lead to useful contributions to other fields of technology as well. In order to create the display various unique systems will be developed that will also make a contribution to other fields of technology. These one-of-akind systems include the power supply used to power the spinning LEDs and the algorithms used to control the LEDs.

2

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

2 Literature study 2.1 Physiological study The rotating LED display relies on the apparent “memory” of the human eye. This phenomenon is not completely understood by scientists. Various attempts have been made to explain this effect of which the most recent is called flicker fusion [1].* Flicker fusion is also associated with the science of films, where a series of discrete images displayed in quick succession will appear to the viewer as a single image [1]. The black spaces between successive images on a film reel is not perceived by the viewer, for a positive afterimage of the previous image remains in vision [2]. The illusion of movement, like in a film, is part of the short-range apparent motion theory [3], but is not part of the scope of this project, since only stationary images will be displayed. Figure 1 shows an example of a series of images that will cause the illusion of fluid motion when displayed in quick succession.

Figure 1: Illusion of motion used in film industry [Eadweard Muybridge] It is stated that flicker fusion is caused by a combination of physiological effects. The one of interest to this study is the remnant of an image perceived by a viewer for a finite time after the image has been removed. This is called a positive afterimage. It is believed that this is caused by persisting activity in the occipital lobe of the brain because of retinal photoreceptor cells sending neural impulses [2]. The path of vision from object to brain which is responsible for the afterimage effect is shown in Figure 2.

Figure 2: Path of vision from object to brain [Mike Wood]

*

Sources are indicated by a number or name in square brackets. Refer to the number in the list of references.

3

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

The flicker fusion threshold is the frequency at which a flickering light appears completely steady to a human observer. This frequency is of utmost importance to this project, for it will be the minimum frequency at which the display should rotate. effect. The human flicker fusion threshold highly depends on the brightness of the light source and varies substantially from one individual to another. It is usually taken at 15 to 20 Hz [4] and modern movies are recorded at 24 Hz. A display refresh rate of 60 Hz is used in CRT screens, which can cause a faint flicker. Modern displays increase their refresh rate to up to 100 Hz to avoid flicker, but most humans cannot detect flicker in refresh rates higher than 75 Hz [5].

2.2 Existing rotating displays A study of the current state to rotating LED displays show that there are at present two categories of LED displays. On the one hand there is a series of home-built prototypes. These are built by hobbyists and vary from very simple to quite advanced. Most of them use 8 LEDs and a single shift register which is pre-programmed to display a fixed image. They also rely either on slip rings or a battery to power the spinning circuitry. Overall these prototypes are poorly designed, improvised and not especially durable. Figure 3 shows an example of such a home-made rotating LED display from an online open source community. This display was built by Vamsi Danda [6].

Figure 3: Homemade rotating LED display [Vamsi Danda] On the other hand there are manufactured rotating LED displays. These come in kits which can be assembled at home or can be bought pre-assembled. These designs are usually very compact and consists of a single printed circuit board fixed to a motor. Many of these models also rely on slip rings or batteries for power, but there are some displays that make use of induction power of some sort. These displays can be very advanced: some have image processing software and others can display images in three dimensions. Figure 4 on the next page shows a rotating LED display kit made by Beijiayue and advertised on AliExpress [7].

4

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 4: Rotating LED display kit [Beijiayue]

2.3 Electromagnetic induction One of the unique challenges of this project is powering the rotating circuitry. As seen in the literature study of existing rotating LED displays, the traditional way of powering the display is through the use of slip rings or a battery. These methods do not comply with this project‟s design goals of durability and reliability. Slip rings are susceptible to wear and batteries run out of power. Therefore an alternative way to power the display needs to be researched. This study focuses on the principles of electromagnetic induction with the aim of using it to power the display being designed in this project. Faraday‟s law of electromagnetic induction describes how a magnetic field will interact with an electric circuit to induce an electromotive force (EMF) [8]. According to this law, a EMF is induced in a conductor that is placed in a changing magnetic field. It can be expressed by the following equation: . The direction of the EMF is in such a way as to oppose the change which created it. This is described by Lenz‟s law and is responsible for the negative sign in the equation [9]. A magnetic field, B, originates from electrical currents and magnetic materials and is measured in Tesla. Magnetic flux, ɸB, is the surface integral of the magnetic field passing through a surface. Permanent magnets are graded by their maximum energy product. This can be related to the magnetic flux per unit volume of the magnet [10]. The following two applications of Faraday‟s law is of interest to this project. 2.3.1 AC Generation Alternating current (AC) generation is an application of Faraday‟s law. A diagram illustrating the basic principles of an AC generator is shown in Figure 5 on the next page. A changing magnetic field can be achieved by moving the conductor within the magnetic field in such a way that it will cut the magnetic lines of force. In this case to relative movement is achieved by rotating the coil.

5

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

Figure 5: AC generator principles [Wayne Storr] 2.3.2 Inductive coupling Inductive coupling is the transfer of energy between two magnetically coupled coils that resonate at the same frequency [11]. A common practical example of inductive coupling is found in a transformer. Alternating current through the transmitting coil creates a changing magnetic field. This magnetic field induces voltage in the collector coil. Any energy passed through the transmitting coil will oscillate and die away slowly. Because the receiver coil resonates at the same frequency, it can pick up most of the energy before it is lost. Figure 6 shows a diagram of the principles of electromagnetic coupling. L1 and L2 are the coupled coils. The AC current in the primary coil on the left side is generated and it then induces a current to flow in the secondary coil on the right side. As seen in Figure 6, the coils do not need to be in contact for power to be transferred.

Figure 6: Diagram of electromagnetic coupling principles [A. Bestbier]

6

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

3 Quality function deployment This chapter aims to establish the requirements of the project and then to relate these requirements to engineering characteristics with quantitative parameters. This is an important step leading to the generation of concepts. The goal of the engineering characteristics is threefold: firstly to generate a list of well-defined specifications for the rotating LED display, secondly to calculate or derive design goals for each of the specifications, and lastly to get a sense of the relative importance of the different specifications, in order to see which carries the most weight.

3.1 Project requirements Requirements arise from the problem statement and a study of current technology in this field. It is important to identify all the needs expressed, to ensure that they will be taken into account when designing the rotating LED display. These are non-technical goals that are set for this project. Here follow the main project requirements:        

The display should spin faster than the human flicker fusion The display should have enough LEDs to display text The device should display text in a stationary and stable fashion The device should fit on a standard desk of display cabinet The spinning electronics should be powered “wirelessly” The device should be durable and reliable The device should be controllable by a user on a computer in the same room The device should run smoothly and silently

7

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

3.2 Engineering characteristics The project requirements can be related to engineering characteristics containing measurable design goals as shown in Table 1. Calculations regarding some of the values can be found in Appendix C, as shown in the reference column. The relative importance is a percentage given to each engineering characteristic, showing its importance relative to the others. The engineering characteristics, design goals and the relative importance between them will be used throughout the design process. They will act as guidelines when generating concepts and criteria during the evaluation of these concepts. The final prototype will also be evaluated using the following table as guideline: Table 1: Engineering characteristics Engineering characteristics

Design goal

Reference

Relative Importance

Spinning radius

100 mm

2%

Number of LEDs

16

6%

Display resolution

100x16

C1.1

5%

Light intensity

> 200 mcd per LED

C1.2

5%

Rotational speed

20 Hz

Minimum on time for LEDs

14%

-4

C1.3

8%

-6

C1.4

10%

5x10 s

Maximum time to switch LEDs

5x10 s

Voltage supply for spinning circuit

>5V

Current draw for spinning circuit

~ 0.54 A

C1.5

9%

Power need for spinning circuit

~ 2.7 W

C1.5

9%

Motor torque

0.0482 Nm

C1.6

4%

Power need for motor

0.9644 W

C1.7

6%

Lifetime

> 500 h

3%

Components used

Locally available

2%

Communication speed

< 5 s per instruction

3%

Communication protocol

Serial

2%

12%

8

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

4 Concept generation and evaluation This project, being a complex engineering problem, consists of many subsystems working together to form a whole. The method that will be used in this chapter consists of a physical decomposition, finding various concepts for the basic structures, evaluating the solutions and synthesizing these solutions to form a working design.

4.1 Physical decomposition Breaking this complex problem into its basic elements will be the first step in finding the best solution. Figure 7 shows a diagram of the physical decomposition of the rotating LED display. At the top is the rotating LED display as a whole. It is then divided into four characteristic parts and each part is divided into its basic elements. Element blocks marked with blue on the diagram are areas where concepts need to be generated and evaluated.

Figure 7: Physical decomposition of rotating LED display

4.2 Conceptual solutions Various solutions can be proposed for each of the physical units as marked with blue in Figure 7. The function of these elements is known and their design goals have been identified in Chapter 3. Possible solutions will be proposed in this section. These solutions originate from the accumulated body of engineering knowledge supplemented by the knowledge gained from the literature study. Where necessary, an analysis of strengths and weaknesses will be done to identify the best solution to a problem. The following section will discuss these solutions, evaluate them and identify the best one.

9

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

4.2.1 Spinning rod There are two possible orientations with regards to the spinning rod and the placement of the LED as shown in Figure 8 . In orientation A the motor is placed on the x-z plane some distance from the ground. The display turns around the y-axis and the spinning LEDs form a circular shape. In orientation B the motor is placed on the ground and the shaft turns around the z-axis. The spinning LEDs form a cylindrical shape.

Figure 8: Orientation concepts, A and B The strengths and weaknesses of both conceptual orientations are shown in Table 2. Strengths are highlighted with green and weaknesses with red. Table 2: Evaluation of orientation concepts Orientation A

Orientation B



Easy to mount LEDs



Square shaped display



Simple spinning rod



Simple support structure



Complex support structure



Capable of 360° display



Wedge shaped display



Low center of gravity



High center of gravity



Complex spinning rod



Susceptible for vibrations



Bending moment on rod

Orientation B is chosen because of all the advantages listed in Table 2. The main consideration is the centre of gravity and the complexity of the support structure. Vibrations and imbalances are a major threat to the display. Orientation B allows the motor to be fixed securely to a base and minimal support structures are needed. This orientation also enables a square image to be displayed 360° around a vertical axis.

10

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

4.2.2 Motor An electric motor must be chosen to rotate the LED rod. A choice must be made between brushed or brushless. Brushed motors are simpler to run than brushless for they are powered by direct current (DC) and are cheaper. Brushless motors, on the other hand, have higher torque for size ratios than brushed ones and are more durable [12]. Since durability is one of the design goals, the brushless motor is chosen. The brushless motor is also more compact and easier to attach a shaft to, because of its outrunner form. 4.2.3 Communication A method of communication needs to be established so that a user can send commands to the display. Three options are considered for this: serial over USB, Bluetooth and Wi-Fi. Serial communication over USB depends on a cable connection to transfer data. The processor will be spinning along with the rest of the display. This means that the display will have to be stopped to connect a cable and update the image. This is neither practical nor efficient. The solution is to use wireless communication. Bluetooth and Wi-Fi are two protocols used to send data wirelessly via radio waves in the 2.4 GHz frequency range [13]. Both of these protocols will work for this device. Bluetooth is chosen, because it is intended for medium speed and personal area networks over short distances such as the one that will be necessary for this device. 4.2.4 Power transfer Two options to supply power to the spinning circuit were discussed in the literature study, namely AC generation and inductive coupling. Both are based on the principles of electromagnetic induction. These two options lead to the following two conceptual power supplies shown in Figure 9:

Induction coupling

AC generation

Rotating coil

Secondary coil Primary coil

Magnets Figure 9: Two methods of power transfer [A Bestbier]

11

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

Each method of power transfer will lead to a different direction of the structures design. For the AC generator, some kind of structure needs to surround a rotating shaft to create a stationary magnetic field. A shaft will connect the motor to the spinning rod. This shaft will contain copper coils and will rotate inside the magnetic field. For the inductive coupling method, there will be a stationary coil just above the motor and a spinning coil on the rotating rod. The stationary coil will be connected to a AC power source and will induce voltage in the coil spinning along with the rotating display. The strengths and weaknesses of both power transfer methods are shown in Table 3. Strengths are highlighted with green and weaknesses with red. Table 3: Evaluation of orientation concepts AC generation

Inductive coupling



High power transfer



No magnets needed



Harnesses spinning motion



Simple design



Robust



Lighter



No additional circuitry needed



Distance reduces power transfer



Well known principle



Additional circuitry generate AC current



Extra hardware needed



LED control circuit needs to be tuned to resonate at specific frequency



Extra torque needed to rotate shaft



Interference with motor coils

and

understood

needed

to

Both types of energy transfer methods evaluated in Table 3 have their strengths and weaknesses. There is no obvious choice. Since the main consideration for the choice of power supply is power transfer, AC generation is a more suitable option to supply power to the rotating display. Its higher power transfer in relation to inductive coupling is especially attractive in this application. The stationary magnetic field of the generator can by produced by permanent magnets or by current carrying coils. Permanent magnets are preferred for this function, because they are smaller and can produce a stronger magnetic field in this case. Furthermore, coils will need an additional electric circuit to power them.

12

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

4.2.5 Processor A variety of programmable microcontrollers are available that will work for this project. A few of the options will be investigated in order to choose the best one. Processors are evaluated in terms of speed, size, pins, memory and ease of use. Table 4 shows the results. Table 4: Processor evaluation Processor

Renesas rl78g13 Pic 18f4680 [17]

Arduino Mini [14]

Pro MSP430 LaunchPad [15]

Speed

16 MHz

16 MHz

32 MHz

40 MHz

I/O Pins

20

14

52

20

Memory

32 kB

16 kB

512 kB

64 kB

Size

33x18 mm

55x70 mm

30x100 mm

36x8 mm

Stand-alone

Yes

Yes

Yes

No

Ease of use

Medium

Easy

Hard

Hard

[16]

After an analysis of all the available options it is decided to use the Arduino Pro Mini. It is the smallest of the options that can operate without supporting hardware. This is important, because space- and weight-carrying capability is limited on the spinning part of the display. It is very versatile and relatively easy to install and program. There are abundant open source libraries available and this device is easily connected to various peripheral devices. A 10-bit analog-to-digital converter will be very helpful when reading outputs from sensors. 4.2.6 Position sensor A sensor is needed to sense the angular position of the rotating rod. This sensor will have to be able to alert the microcontroller each time the rod passes a specific position. Two sensors are considered for this task: firstly, a photo interrupter, using an infrared emitter and receiver, and secondly, a hall effect sensor that varies its output relative to a magnetic field. The photo interrupter is chosen, because it has a fast enough switching time of 0.1 μs, as shown by its datasheet [Appendix D1], and because it will not be affected by the magnetic field of the induction power supply.

13

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

4.3 Final concept The top-down decomposition is followed by bottom-up synthesis. All the parts chosen by the various evaluation processes will be combined to form the final design for a working rotating LED display prototype. The final prototype consists of a LED strip in a vertical position, fixed to a thin rod. The rod is connected to a brushless motor via a shaft. The shaft holds a number of copper coils which rotate inside a magnetic field, forming an AC generator. An Arduino Pro Mini aided by a photo interrupter sensor will control the LEDs. A user will communicate with the rotating display through a Bluetooth connection. Figure 10 shows a CAD model of the concept generated in this chapter.

Upright rod orientation Arduino Pro Mini & Bluetooth module

Photo interrupter

AC generator Base structure

Brushless motor

Figure 10: CAD model of generated concept rotating display Some of the chosen subsystems will need further development and design in order to be fully functional. This chapter selects all the physical parts. In the chapters to follow these parts will be designed. The design process will be similar for all the subsystems. Each subsystem will be divided further into its basic parts. These parts will be designed and developed. Finally the various parts will be tested and integrated. The chapters to follow will document the design of the AC generator, electronic circuits, physical structure and software respectively.

14

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

5 AC generator design An AC generator was chosen for the transfer of power to the rotating circuitry. This chapter aims to design the AC generator. Figure 11 shows a diagram of the basic layout of the AC generator. Coil ends powering display

Display attach here Rotating shaft

Copper coils

Stationary magnet

Stationary magnet

Motor attach here

Figure 11: AC generator design diagram The spinning circuitry containing the processor, LEDs and Bluetooth module needs to be supplied with 5 V DC. The AC generator supplies power to a power supply subsystem containing a current rectifier and a 5 V voltage regulator. The exact characteristics of the power supply is not yet known, so certain assumptions will be made. Assume a voltage drop over the current rectifier of 1.4 V and a output ripple voltage of 0.2 V. If the regulator needs a minimum of 5 V, the AC generator must generate a sine wave with a minimum peak voltage of . It has also been established that the shaft will rotate at 20 Hz.

5.1 Magnetic field design N38 neodymium rear-earth permanent magnets were selected to provide a stationary magnetic field. Neodymium magnets are used, because it is the strongest type of permanent magnet that is commercially available [18]. Eight Neodymium bar magnets will be arranged in four sets of two at opposite sides of the rotating shaft to create the magnetic field. The goal is to get as many flux linkages between the coils and the magnetic field. To achieve this, the magnetic flux density between the magnets needs to be as high as possible. A laminated ring of high permeability will complete the path of the flux around the outside of the shaft. The use of laminations reduces eddy currents [19]. Minimizing air gaps will strengthen the magnetic intensity.

15

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

In order to calculate the flux density, the structure of the shaft, magnets and laminated ring needs to be modelled. Finite Element Method Magnetics (FEMM) [20] is an open source software that analyses the magnetic characteristics of structures. FEMM will be used to aid the design of the AC generator. The main goal of this simulation is to calculate the average flux density that passes through the coils as the shaft rotates. Figure 12 shown a cross section through the AC generator. This is also the view that will be modelled using FEMM. 1018 Steel

Holes for bolts Rotating shaft (1018 Steel)

Magnetisation direction

Copper coils (SWG 14) Stationary magnet (N38)

Air gap

Figure 12: Cross section of AC generator A FEMM simulation was run using the properties as shown in Figure 12 and with the shaft in two positions of rotation. Figure 13, A and B show the results in the form of a colour-coded flux density plot.

B

A

Figure 13: Flux density plots of AC generator From Figure 13 it is seen that the average flux density through the coils of the AC generator is 1.2 Tesla. This property is used to calculate the EMF generated by the generator. On the basis of Faraday‟s equation, as shown in the literature study, the following formula can be derived to express the EMF in terms of the field density, rotation speed, number of coils and coil area.

16

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

𝐸𝑀𝐹 𝐸𝑀𝐹 𝐸𝑀𝐹

𝑑 𝐵 𝑑𝑡 𝑑(𝐵 𝐴) 𝑁 𝑑𝑡 𝑁 (𝐵 𝐴) 𝜔 𝑁

Equation 1: Faraday's law to calculate induced voltage Certain assumptions must be made since all the variables are not known. With the surface area of the coil as 0.00045 m2 and the number of coils as 150, the induced EMF is predicted have a peak voltage of 10.1788 V. Step-by-step calculations are included in Appendix C2. This is within the range of the voltage regulator and it allows for some voltage drop to occur when the signal is rectified.

5.2 Generator structure design By means of these assumed and calculated parameters a final design can be made of the AC generator. The shaft will connect the rotating rod to the motor and will have slots machined into it to hold the copper coils. Insulated copper wire with a 0.2 mm diameter will be used to wind two coils of 100 turns each onto the shaft. Figure 14 shows the manufactured shaft with the copper coils. Detailed drawings can be found in the Appendix G and the drawing pack included in the project file.

Figure 14: Manufactured shaft with copper coils The outer ring of the generator is built up out of discs laser cut from 0.6 mm thick mild steel sheets. These discs are stacked and bolted together. Protrusions on the top and bottom discs hold the magnets in place and the bottom disc has holes to fix it to the base. A 3D-printed bearing housing is bolted on the top disk and holds a bearing to locate the shaft concentrically inside the ring structure. Figure 15 on the next page shows a sectioned CAD drawing of the AC generator next to the manufactured version.

17

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 15: Sectioned CAD drawing of AC generator (left) and actual AC generator (right)

5.3 Testing of the AC generator The AC generator was constructed as designed and it was tested to see if it performs as predicted. The two main concerns with regards to the generator are the physical structure and the power transfer capabilities. This section describes the testing procedure and the results. The first test was to see if all the components of the generator fit together as planned. During the assembly of the parts it was noted that the magnets are bigger than initially expected. The sets of 2 magnets each did not fit into the allocated space provided, and interfered with the shaft‟s rotation. A magnet was removed from each set to prevent this interference, leaving only four magnets to produce the magnetic field. This resulted in a weaker magnetic field. FEMM simulation predicts that the magnetic flux density will drop 54.17%, from 1.2 T to 0.55 T. Recalculating the induced EMF of this reduced magnetic field results in a peak EMF of 4.665 V. EMF calculations and the magnetic flux density plot can be seen in Appendix C2.2.

18

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

To test the power transfer capacity of the generator, the ends of the spinning coil was connected to an oscilloscope by means of a slip ring. The motor was powered up and a voltage reading was made. Figure 16 shows a screenshot of the oscilloscope reading.

Figure 16: Oscilloscope reading of generator output

The signal seen in Figure 16 is as expected. The high frequency noise in the signal is due to uneven contact made by the slip ring. The signal is that of an alternating voltage supply. The peaks of the signal are somewhat more pointed due to the shape of the coils and the magnetic field. The peak EMF is about 4 V which is significantly lower that initially planned. This is primarily caused by the weaker magnetic field and also to some extent by losses in the system due to inefficiencies ignored by the calculations. The measured reduced peak EMF (Figure 16) is 14.25% smaller than the calculated peak EMK (Appendix C2.2). Assuming that this trend will continue when the magnetic field ( ) increased, the peak EMF when using all eight magnets will be . This is more than the minimum required peak voltage for the power supply.

19

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

6 Electronic circuit design In this chapter the design of the electronic system of the rotating display will be described.. This system can be subdivided into five subsystems: power supply, LED strip, Bluetooth module, photo interrupter, controller and speed control.

6.1 Power supply The AC generator is designed to output a sine wave of amplitude 10.1788 V at 20 Hz. This signal needs to be converted to a steady 5 V direct current to supply power to the rest of the electronics. A two-step power supply is designed to achieve this. Step one is needed to supply the voltage regulator with its minimum input voltage of 5 V as indicated by the datasheet [Appendix D2]. The generated AC signal is passed through a full bridge diode rectifier. Four 1N007 diodes are used along with a capacitor to smooth out the signal to a maximum ripple voltage of 0.2 V. In Appendix C3.1 the size of the capacitor is calculated to be 220 μF. Step two is needed to regulate the voltage to a steady 5 V to be used by the rest of the electronic components. The voltage regulator will supply an output voltage of 5 V with a tolerance of 4% as indicated by its datasheet (Appendix D2). A schematic diagram of the rectifier circuit and the regulator in shown in Figure 17.

Figure 17: Schematic diagram of the rectifier and regulator circuit LT SPICE is free software [21] used to draw and simulate electronic circuits. This tool is used to simulate the output of step one of the power supply, the diode bridge, and plot the voltage over the smoothing capacitor. A voltage versus time graph in the circuit is shown in Figure 18 on the next page. It is seen from this figure that the ripple voltage is within the desired range of 0.2 V. This signal can now be passed through the voltage regulator and be reregulated to a steady 5 V to be used by the electronic components of the rotating display.

20

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 18: Plot of voltage over the capacitor versus time

6.2 LED strip The display will consist of a strip of 16 red, green and blue (RGB) LEDs. An output is needed to control each colour of each LED, which means that 48 channels are needed to control the whole strip. A series of six serial-in, parallel-out, 8-bit registers will be used to control the LEDs. This setup makes it is possible to control 48 channels using only three digital output pins of the controller. 74HC4094 shift registers Appendix D4 are used for two main reasons. Firstly, they have data and storage registers, meaning new data can be shifted while the old data are still available on the parallel output pins [datasheet in Appendix D.4]. This means that the LEDs can be switched on and off more quickly. Secondly, they will allow for a total shifting time of 5.0526x10-7 s as calculated in Appendix C3.2. This is fast enough to satisfy the design goal set in Chapter 3. By using the recommended current for the LEDs [datasheet in Appendix D3] the required resistances can by calculated as shown in Appendix C3.3. The standard resistor value of 120 Ω is used for the red LEDs and 82 Ω for green and blue LEDs. Figure 19 shows a schematic diagram of a section of the LED strip circuit drawn with Eagle PCB free software[22]. Only two of the shift registers are shown to illustrate the connections between them. The complete schematic can be seen in Appendix F.

21

Rotating LED display

Final Report

Andre Bestbier

2015

16968107 Figure 19: Schematic diagram of a section of LED strip

Common anode RGB LEDs will be used, which means that the LED will light up if the corresponding pin on the shift register is pulled low. The display will be powered by the 5V power supply. To reduce the size of the LED strip a printed circuit board (PCB) will be designed to hold the components. Furthermore, surface-mount (SMD) resistors and shift registers will be used. A 5-pin header will be used to supply power and connect the LED strip to the controller. Eagle PCB‟s free software [22] is used to design the PCB layout that is shown in Figure 20. This layout is designed to be manufactured with a milling machine. Design considerations for milling include the thickness of copper tracks, distance between tracks and the reduction of the number of vias.

Figure 20: LED strip PCB layout Figure 21 shows the front and back of the completed PCB with soldered components.

Figure 21: Front and back of manufactured PCB

22

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

6.3 Bluetooth module Bluetooth was chosen during the concept generation phase as the preferred method of communication between the display and a computer. A variety of similar Bluetooth modules are available on the market. The Bluetooth Mate Silver module was chosen, because it is designed specifically to work with the Arduino Pro range of controllers [23]. This module acts as a serial pipe, replacing the RX and TX wires of a serial cable. Data received through the RX pin are passed out through Bluetooth and data received through Bluetooth are passed out through the TX pin. The module is powered from the 5 V power supply and connects to two I/O pins of the controller.

6.4 Photo interrupter A photo interrupter was chosen for position sensing. The photo interrupter consists of an infrared emitter on one end and an infrared detector on the other. Figure 22 shows a schematic diagram of the photo interrupter.

Figure 22: Schematic diagram of photo interrupter If the gap between the emitter and detector is open, the detector gate lets current through and Analog out equals 5 V (Vcc). If the gap is blocked, the detector gate is closed and Analog out equals ground. Analog out is connected to an analog pin of the Arduino and this pin will read the analog level. 1k Ω resistors will be used to limit the current through the emitter and detector. The resistor in series with the detector also acts as a pull-down resistor. An analog signal is used, because the voltage change at Analog out is not discrete, but continuous. The microcontroller will analyse this analog signal and decide if the gate is open or closed.

23

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

6.5 Controller An Arduino pro mini will be used to control the display. This development board is based on the ATmega328 integrated microcontroller. The board is supplied with 5V from the power supply and is used to communicate with the LED strip, Bluetooth module and photo interrupter sensor. The controller, power supply and Bluetooth module are soldered to a prototyping board and wires are used to connect the LED and photo interrupter circuit. Figure 23 shows a schematic diagram of the complete spinning circuitry.

Figure 23: Schematic diagram of complete spinning circuitry The microcontroller can be programmed through a serial over USB connection to a computer with supporting software. The microcontroller board does not include an USB-to-Serial converter. An FTDI device like the FT232RL can be used to provide this conversion. An alternative way to program the microcontroller is by using another Arduino product with an onboard USB-to-Serial converter. For this project an Arduino Uno is used. The ATmega IC is removed from the DIP socket on the Uno and the RX, TX, ground and reset pins of the Uno is connected to the corresponding pins on the Arduino Pro Mini. The Uno is then connected to the computer by means of a USB cable. The Arduino Pro mini can now be programmed via the Uno.

6.6 Speed control A brushless motor was chosen during the concept generation phase. Specifications for selecting the correct brushless motor include the physical shape and size, torque, speed and availability. The motor must be able to overcome the inertia of the spinning structure and the counter torque of the AC generator. The required torque was calculated during the setting up of the engineering characteristics in Chapter 3. RC Hobby SA is a local distributor of motors and motor accessories. The 5010-620 KV model is chosen for this device. It meets the torque and speed requirements and the flat outrunner shape is ideal for use in this design.

24

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

An electronic circuit is needed to control the brushless motor. The motor needs three phase power which will be supplied by an electronic speed controller (ESC). The supplier suggests a 10 ESC for the selected motor [24]. The RCTimer 12 A ESC with SimonK firmware is chosen, because it has the correct current rating and is locally available. The ESC is supplied with 12 V by a bench power supply. A pulse width modulated (PWM) signal is sent to the ESC to control the speed of the motor. A programmable microcontroller will be used to generate the PWM signal.

6.7 Testing of electronic subsystems Tests were carried out to check if the various electrical subsystems perform as designed. This section describes these tests and shows the results. 6.7.1 Power supply The power supply was built and tested to see if it can regulate a signal similar to the one that the AC generator is designed to generate. The rectifier was built and connected to a signal generator set to generate a 20 Hz sine wave of amplitude 10.1788 V to simulate the AC generator output. It was found that the power supply functions as designed and outputs a steady 5 V signal. 6.7.2 Photo interrupter The photo interrupter‟s analog out signal was tested to determine the voltage levels corresponding to the different states of the gate. The sensor was wired up as designed and the voltage of Analog out was measured while the gate was opened and closed. It was seen that 1.73 V corresponds to an open gate, and 0.01 V to a closed one. Figure 24 shows a graph plotted of the voltage on Analog out versus time as the gate was opened and closed.

Figure 24: Voltage levels of photo interrupter gate in operation

25

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

6.7.3 Speed control The ESC system was tested to see how to motor responds. A test was done to calibrate the ESC and to determine in what range the PWM needs to be generated. Code was written for an Arduino Uno microcontroller to generate a PWM signal. The signal has a frequency of 50 Hz, an amplitude of 5 V and a pulse width that can be varied by entering a period. The motor was connected and the pulse width varied to see how the motor responds. The test showed that the ESC operates with a PWM signal from 1.4 ms to 1.8 ms. The ideal PWM signal was found by flashing the microcontroller‟s on-board LED at 20 Hz and varying the speed of the motor until the flashing LED was observed to flash in a stationary position. The ideal PWM signal pulse width period was found to be 1.71 ms.

26

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

7 Physical structure design In this chapter the design of a physical structure for the display will be described. The structure will consist of two parts. The one part will be standing on the floor, the base, and the other part will be rotating with the shaft of the motor, the rod.

7.1 Base design The function of the base is to support all the other components in a stable way and to provide attachment for the motor and generator. It is to have holes at the bottom, so that it can be fixed to a flat surface. The other main consideration is that it should be strong enough the withstand the forces acting on it without losing structural integrity. Another aspect that will influence the design of the base is the manufacturing method. Two methods are considered for this, namely 3D-printing and welding. 3D-printing is a very affordable, practical and accurate type of modern rapid manufacturing. It is ideal for this application, since intricate designs can be achieved with relative ease. Welding, on the other hand, is limited in accuracy and needs to be done by a skilled technician. For these reasons 3D-printing is chosen as manufacturing method. Design for 3D-printing entails the use of stress relief gaps to prevent warping and fillets to avoid sharp edges. Figure 25 shows a CAD drawing of a shape that will realise the functional requirements using the design guidelines for 3D-printing. A detailed drawing can be found in Appendix D2.

Figure 25: Base CAD drawing Acrylonitrile butadiene styrene (ABS) plastic will be used for the base material. It is relatively strong and mildly flexible, which is good for vibration absorption [25].

27

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

7.2 Rod design The function of the rod is to support the spinning circuitry and to hold the LED strip in the correct position. The rod is made out of aluminum channel. Aluminum is chosen, because is strong and light. The channel shape improves the strength and stiffness of the rod. The desired shape is achieved by cutting and bending the channel. Holes are drilled to attach the electronic circuits. Figure 26 shows a CAD design of the rod. Detailed drawings can be seen in Appendix D3.

Figure 26: CAD design of the rod It is important for the rod to be balanced around its axis. This will allow for smooth spinning and will minimise vibrations. Most of the weight will be on the LEDs‟ side of the rod, so a counterweight is added to balance the rod. To determine the weight of the counterweight, a simple experiment was done. The rod was placed on a narrow edge with the hole for the shaft in the middle. The counterweight was moved outward from the center until the rod balanced on the narrow edge. The counterweight was then fixed in this position.

28

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

7.3 Assembly of the physical structure The motor and generator are screwed to the base. The shaft is screwed onto the motor and the bearing is fitted on top of the shaft. The LED PCB, controller circuit and photo interrupter circuit is bolted into the rod. Lastly, the rod is bolted on top of the shaft. A bracket is bolted to the generator‟s bottom plate to line up with the gap in the photo interrupter and this will serve as the zero position indicator of the display. The ESC circuit is connected to the motor and the bench power supply. Figure 27 shows an exploded CAD assembly of the display to illustrate how the physical structure fits together with some of the other components.

Counterweight Spinning circuitry Rod

PCB

AC generator LED strip

Shaft

Motor

Base

Figure 27: Exploded CAD assembly of display

29

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

7.4 Testing of the physical structure The success of the physical structure lies in its ability to hold all the other components together and support the entire rotating LED display. By assembling the various parts it is possible to see if the rod and base function as designed. Figure 28 shows a photo of the completed device. The base is bolted to a wooden plank to secure it.

Figure 28: Completed rotating LED display

30

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

8 Software This chapter concerns the development of the software to control the display. The same modular approach for designing the hardware is also followed when designing the software. The software can be divided into two main categories: Microcontroller software and user interface software. The microcontroller functions include controlling the shift registers, communication through Bluetooth, reading from the sensor and timing the LED output. All these functions are done by the on-board microcontroller. An open-source IDE specially developed by Arduino is used to write C++ code and upload it to the microcontroller [26]. The IDE enables the programmer to develop code in a simplified environment by only writing a setup() function and a loop() function along with any custom functions in an .ino file. This file is compiled, linked with standard libraries and then uploaded to the microcontroller. The user interface software is written using open course software called Processing [27]. This software will run on a personal computer (PC) loaded with a Windows 8 operating system. Source code of the functions described in this chapter can be found in Appendix E. Headings in the appendix will correspond with headings used in this chapter. Figure 29 shows a flow diagram that illustrates the sequence in which functions are called in the microcontroller and how events trigger certain actions. The individual functions will be discussed in the following sections and reference can be made to this diagram to see how the different functions fit together.

Figure 29: Flow diagram of function sequence

31

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

8.1 Controlling shift registers The first function of the microcontroller is to shift bits to the shift registers. Code is written to control the three pins connected to the LED PCB, namely data, clock, and strobe. This process happens in the Shift() function on the Arduino Pro Mini. This function receives an array of 48 binary integers as a parameter and then shifts the array to the registers. A one will result in a high logic level and a zero to a low logic level on the corresponding register pin. The shift registers used are serial-in/parallel-out registers, meaning that the data pin will send a signal containing serial information to the registers. Data is shifted through the registers on each positive edge of the clock pin. The registers are latched, meaning that shifting happens while the strobe pin is low and data is transferred to the pins of the register when the strobe pin is high. The shiftOut() function in the Arduino library is used to control the data and clock pins. The array is divided into six sets of eight bits and these sets are shifted one by one to the registers. As the next set is shifted, the previous set moves to the next register. The Figure 30 shows an diagram of how this process works.

Figure 30: Flow diagram of shift() function

32

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

8.2 Bluetooth setup and communication After the hardware hook-up of the Bluetooth Mate Silver (Bluetooth module) is done as described in chapter 6, the software setup can be done. Detailed information regarding the use of the module can be found in the device‟s user manual. The Bluetooth module has two communication modes: command mode and data mode. Firstly command mode will be used to configure the device and secondly data mode to receive data during normal operation [28]. 8.2.1 Configuration in command mode The firmware on the Bluetooth module can be configured in command mode through a serial connection with the microcontroller. The Arduino SoftwareSerial library is used to establish a serial connection between the microcontroller and the Bluetooth module via pins 2 and 3 on the microcontroller. This frees up the physical UART of the microcontroller for use when communicating with the PC of uploading code to the controller. To enter command mode the string “$$$” is sent to the module. The default baud rate of the Bluetooth module is 115200 bps. This baud rate will be reduced to 9600 bps each time the Bluetooth module is powered up, because 115200 bps can sometimes be too fast for the Software Serial connection. The command “U,9600,N” temporarily changes the baud rate to 9600 bps with no parity. The device name will be changed once off to “LED_Display” by sending the command “SN,LED_Display”. The Bluetooth device is paired to the PC by powering up the Bluetooth module and then using the PC to check for available Bluetooth devices. The PC is paired with “LED_Display” using the default PIN for the Bluetooth module, 1234. PC com Port 5 is identified at the Bluetooth communication port of the PC and will be accessed by the interface software. 8.2.2 Communication in data mode To send data between the Bluetooth device and PC a serial terminal is opened to the Bluetooth communication port of the PC, com port 5. As soon as a connection is made to a paired device, the Bluetooth module enters data mode and acts as a serial pipeline. The module passes all data received through Bluetooth to the microcontroller via the RX/TX connection. The user interface software will send a series of bytes that represents the desired image that should be displayed. As soon as the microcontroller detects that there is serial data available from the Bluetooth module, it calls the readSerial() function. This function receives data one byte at a time through the SoftwareSerial connection with the Bluetooth module. The function stores these bytes in variables that can be sent to the shift registers as needed. The Bluetooth module idles until a new data is sent from the PC, and then the process is repeated. Figure 31 on the next page shows a diagram adapted from the Bluetooth Mate Silver‟s user manual that depicts the flow of information through the Bluetooth connection.

33

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 31: Flow of information through the Bluetooth connection 8.2.3 Data storage The data received by the microcontroller, through the Bluetooth connection, need to be stored in a way that can be shifted to the registers when needed. This conversion is done in the serialRead() function. The data is received byte by byte, with each byte representing the state of one shift register for one 100th of a rotation. The bytes are received and stored in a 6 by 100 array 2 dimensional (2D) array. This array contains display information of one complete rotation.

8.3 Sensor read and timing 8.3.1 Reading sensor values The photo interrupter is connected to analog pin A0 of the microcontroller as described in the hardware setup in chapter 6.4. The ATmega328 integrated circuit of the microcontroller has an on-board analog-to-digital (A/D) converter with a 10-bit resolution, meaning it can return integers from 0 to 1023. During the testing of the photo interrupter in Chapter 6, it was seen that the Analog out signal was 1.73 V when the gate is open, and 0.01 V when closed. The A/D converter will convert these analog voltage levels to 354 and 2 respectively. A function, readSensor(), is written to read the value from the sensor. A simple if() statement can be coded to check if the digitalised voltage level is within a certain range and thereby determining the status of the photo interrupter gate. 8.3.2 Timing the display The photo interrupter gate will open and close once per rotation of the display. This will happen when the rod passes the zero position, marked by a protrusion from the base which obstructs the infra-red beam of the photo interrupter. This indicates that a new rotation has begun and it triggers a series of events regarding the timing of the display. The time that the loop() function takes to complete once is used as an unit of time to assist in the timing of the display. A period counter is created that increments each time the loop() function is completed. Each time the photo interrupter is triggered, the period counter is divided by 100 (amount of horizontal pixels) to get the period of a pixel after which the period counter is zeroed. A loop counter simultaneously counts the loop() function repetitions 34

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

until it reaches the period of a pixel. When this happens the next pixel is displayed. This process is repeated until all 100 horizontal pixels are displayed and then gets repeated when the photo interrupter is triggered again. Figure 32 shows a flow diagram of the timing process.

Figure 32: Flow diagram of the display’s timing process

8.4 User interface A user interface is coded in Processing and runs on the PC. The function of the interface is to allow the user to send commands, telling the display what to display. It contains code for setting up the serial connection, creating the graphical user interface (GUI) and converting the user input to serial data. Source code for the interfacing software can be found in the project file. 8.4.1 Setting up the serial connection When the user interface program is launched, a serial terminal is opened to the Bluetooth communication port of the PC, com port 5. A Processing library for serial communication will be used to send the user input from the PC to the Bluetooth module. Data is written to this serial port, byte by byte, at a rate of 9600 bps. This is the rate at which the Bluetooth module is configured to work. 8.4.2 Graphical user interface A GUI is coded to allow the user to communicate with the device in a logical and simple way. This interface will consist of a window with a series of buttons, tabs and text areas. The controlP5 Processing library, written by Andreas Schlegel, is used to create the interface. The user is able to input text by typing in a textbox, or to draw an image on a blank surface. This text or image is then converted to an array of bytes and sent through the serial port when 35

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

the user presses the “Send” button. Other inputs include selecting a colour, clearing the display, reconnecting to the display, and quitting the interface program. Figure 33 shows a screenshot of the two input methods available in the user interface program.

Figure 33: Graphical user interface screenshots 8.4.3 Input conversions A 2D array of integers is created to represent the state of the display. The array contains 48 rows and 100 columns. One column of 48 elements, represents the state of the LEDs during one 100th of a rotation. A 1 represents off and a 0 represents on. The input from the user is always converted by the backend of the interface software to this 2D array, regardless of the input method. When the user presses “Send”, the elements of the 2D array are grouped together in bytes with each bit representing an integer of the original array. This conversion results in an array of 6 rows and 100 columns. The bytes are then sent one by one to the serial port and will be received by the serialRead() function.

36

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

9 Evaluation and recommendations After the completion of the project the rotating LED display is evaluated. The different subsections of the display will first be evaluated individually and then comments will be made about the device as a whole. The performance is measured against the design goals set in Chapter 3. The results of the project will also be discussed in this chapter.

9.1 AC generator evaluation The results of the tests on the AC generator in Chapter 5 show a reduction in the voltage generated. An actual peak voltage of 4.6653 V instead of the designed peak voltage of 10.1788 V is achieved. This is less than the minimum of 6.6 V needed to power the spinning circuitry. Therefore the design of the AC generator does not meet the requirements and does not function as needed. This is due to the fact that less magnets were used than planned. To a lesser extent it is also due to the fact the inefficiencies were not taken into proper account. To solve this problem, the space for magnets can be enlarged and an efficiency factor can be used. It will also help if more power supply prototypes can be built and tested. The use of inductive coupling should also be considered in greater detail. Furthermore, with regards to the shaft that forms part of the AC generator: The shaft, that connects the motor to the spinning rod, is not concentric enough to allow for smooth spinning at high speeds. The misalignment causes a vibration when the motor speeds up. This means that the display cannot be spun at its optimal rate of 20 Hz. This reduces the POV effect by a small margin. These misalignments can be prevented by placing a narrower concentricity tolerance on the threaded holes at the top and bottom of the shaft when it is sent to be manufactured. A tolerance of 0.05 mm should be sufficient to prevent the vibration at 20 Hz.

9.2 Electronic circuit evaluation The different elements of the spinning circuit were tested and every one of them functioned as designed. The minimum light intensity per LED is 800 mdc (Appendix D3) which is more than the design goal of 200 mdc. The switch time for the LED strip is 5.9526x10-7 s as calculated in Appendix 3.2, which is less than the design goal of 5x10-6 s. The only alteration needed is the addition of a 9V battery to supply power instead of the dysfunctional AC generator. The battery is connected to the voltage regulator. An improvement can be made to the LED strip. Surface mount RGB LEDs can be used instead of the through-hole type. By doing this and compacting the component placement, it is possible to reduce the size of the LED strip PCB. This will lead to weight reduction and a better-looking design.

37

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

During the testing of the ESC it was found that the motor loses speed after some time, although the PWM signal stays constant. This is due to the fact that the motor operates on the threshold of its minimum speed. To prevent the speed loss from happening, a motor with a smaller motor constant (Kv) can be selected. A motor with a Kv of 360 will be more suitable for steady operation at 20 Hz. To counter this loss of speed, a potentiometer is added to the microcontroller to allow the user to manually vary the speed of the motor. The user can compensate for the loss of speed over time by turning the potentiometer, thereby changing the PWM signal sent to the ESC.

9.3 Physical structure evaluation The only problem encountered with regards to the physical design was the manufacture of the base. The large flat bottom part of the base warped when the plastic cooled. This warping of the plastic can be prevented by changing the form of the flat, bottom part of the base from a square to a circle. More stress relief gaps can also be added. A 3D-printing technique called rafting can also be used to prevent this warping. It is recommended that the use of a welded steel base also be investigated. A steel base will be more rigid and vibration-resistant. The increased weight will also anchor the display.

9.4 Software evaluation Two comments can be made regarding the software of the project: firstly about the communication time between the PC and the Bluetooth device, and secondly about the software on the microcontroller. The time it takes the computer to send 100 horizontal pixels worth of information to the computer is 6.734 s. This is more than the design goal of 5 s. Communication time can be reduced by choosing a higher baud rate. A baud rate of 38400 bps will shorten the time substantially. Although the microcontroller has 32 Kb of flash memory, only 2 Kb of that memory is available for the storage of global variables. This causes a problem when an attempt is made to create an array of 48 times 100 elements. As a result of this limitation the number of pixels is reduced to 70x16. It is possible to work around this problem by storing the incoming serial data as a long data type instead of an int data type.

38

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

9.5 Overall evaluation and results At the end it is possible to integrate all the subsystems to form a functioning rotating LED display. The various parts are assembled with screws, bolts and nuts. The spinning electrical parts are connected to each other and the motor is connected to a 12 V power supply through the ESC. After the software is flashed to the microcontroller, the device is ready to be tested. Test messages “ABC” (Figure 34) and “LED” (Figure 35) are sent to the display individually via the text interface, after which a drawn picture of a house (Figure 36) and a boat (Figure 37) is sent via the draw interface. It can be noted that the images displayed by the device are clear and stable and similar to the commands sent by the user.

Figure 34: "ABC" text displayed

Figure 35: "LED" text displayed

39

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 36: Picture of a house displayed

Figure 37: Picture of a boat displayed

40

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

10 Conclusion This project aimed to achieve the original objectives as described by the project definition and by the study leader: to design and build a display that relies on the „memory‟ of the human eye in order to build up an image. The report documented the design and construction of such a device. Knowledge gained from the project problem statement and a literary study led the way to generating various conceptual solutions to the different subsystems of the rotating LED display. The best solution was chosen and synthesised to a final concept. The parts of the final concept were designed, manufactured and constructed. The evaluation of the various subsystems and the device as a whole led to the following conclusions: The mechanical structure designed, is strong and rigid enough to support the device. The electronic circuit designed to control the LEDs functioned as planned with no alterations from the initial design. The power transfer subsystem did not deliver enough power to the spinning circuit because of variance in procured parts. This issue was bypassed by the addition of a battery. The communication subsystem worked as planned, although a bit more slowly. The data received are accurate and reliable each time. An intuitive and effective user interface is used to send commands to the display. The end product is a working prototype of an rotating LED display. The images displayed are clearly visible in a stable position. The images also represent the user‟s commands accurately. Because of the functioning prototype, this project can be labelled as a success.

41

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

11 References 1) Simonson E, Brožek J. Flicker Fusion Frequency: Background and Applications. Physiological Reviews. 1952 1 July; 32(3):349-378. Available at: http://physrev.physiology.org/content/32/3/349. [Accessed March 2015]. 2) Encyclopædia Britannica. S.v. Afterimage. Psychology. Last Updated 2-19-2015. Available at: http://global.britannica.com/topic/afterimage. [Accessed March 2015]. 3) Anderson J, Anderson B. The myth of persistence of vision revisited. Journal of Film and Video. 1993 Spring; 45(1):3-12. Champaign: University of Illinois Press. Available at: http://www.jstor.org/stable/20687993?seq=8#page_scan_tab_contents. [Accessed March 2015]. 4) Kang A. Dragonfly. PSY 486 : Vision & Perception Project. Flicker Fusion Frequency (FFF). 2012 October 31. [ONLINE] Available at: https://dragonfly486.wordpress.com/2012/10/31/flicker-fusion-frequency-fff/. [Accessed June 2015]. 5) Mineault P. What‟s the maximal frame rate humans can perceive? 2011 November 20. [ONLINE] Available at: http://xcorr.net/2011/11/20/whats-the-maximal-frame-ratehumans-can-perceive/. [Accessed June 2015]. 6) Danda V. Propeller LED Display. 2012 30 March. Homemade Robo Blog. [ONLINE] Available at: http://homemaderobo.blogspot.in/2012/03/propellerrotating-leddisplay.html#comment-form. [Accessed April 2015]. 7) AliExpress. POV display by Beijiayue. [ONLINE] Available at: http://www.aliexpress.com/item/DIY-electronic-learning-suite-LED-clock-turn-suiteLED-display-suite-POV-on-the-parts/32362609910.html. [Accessed April 2015]. 8) Sadiku MNO. Elements of Electromagnetics (fourth ed.). Oxford: Oxford University Press. 2007:386. ISBN 0-19-530048-3 9) Schmitt R. Electromagnetics explained (first ed.) Newnes Publishers. 2002:75. ISBN-13: 978-0750674034 10) Rare Earth Magnets by Amazing Magnets. Magnet Grade Chart, LLC. 2015. [ONLINE] Available at: http://www.amazingmagnets.com/magnetgrades.aspx. [Accessed June 2015]. 11) Wilson T. How Wireless Power Works. 2007 12 January. [ONLINE] Available at: http://electronics.howstuffworks.com/everyday-tech/wireless-power.htm. [Accessed April 2015]. 12) Dirjish M. What‟s The Difference Between Brush DC And Brushless DC Motors. Feb 16, 2012. Electronic Design. [ONLINE] Available at: http://electronicdesign.com/electromechanical/what-s-difference-between-brush-dc-andbrushless-dc-motors. [Accessed June 2015]. 13) Bluetooth basics. Bluetooth Website. 2015. [ONLINE] Available at: http://www.bluetooth.com/Pages/Basics.aspx. [Accessed July 2015]. 14) Arduino-ArduinoProMini. Arduino Pro Mini. 2015. [ONLINE] Available at: https://www.arduino.cc/en/Main/ArduinoBoardProMini. [Accessed July2015]. 15) Texas Instruments. MSP430 LaunchPad Value Line Development kit. 2015. [ONLINE] Available at: http://www.ti.com/tool/msp-exp430g2. [Accessed July 2015]. 16) Renesas Electronics America. RL78/G13 Product Overview. 2015. [ONLINE] Available at: http://am.renesas.com/products/mpumcu/rl78/rl78g1x/rl78g13/index.jsp. [Accessed July 2015]. 42

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

17) Microchip Technology. Pic 18f4680 Data sheet. 2015. [ONLINE] Available at: http://ww1.microchip.com/downloads/en/DeviceDoc/39625c.pdf. [Accessed July 2015]. 18) Adam Hill. WiseGEEK website. What are neodymium magnets? Conjecture Corp. 2015. [ONLINE] Available at: http://www.wisegeek.org/what-are-neodymiummagnets.htm#didyouknowout. [Accessed July 2015]. 19) Chapman, SJ. Electrical Machinery Fundamentals. (5th edition). McGraw Hill. 2012:26 ISBN 978 007 108617 2 20) Finite Element Method Magnetics : HomePage. April 6 2014. [ONLINE] Available at: http://www.femm.info/wiki/HomePage. [Accessed August 2015]. 21) Linear Technology – Design Simulation and Device Models. LTspice IV. 2015. [ONLINE] Available at: http://www.linear.com/designtools/software/#LTspice. [Accessed August 2015]. 22) Cadsoft. EAGLE PCB. 2015. [ONLINE] Available at: http://www.cadsoftusa.com/eaglepcb-design-software/about-eagle/. [Accessed September 2015]. 23) Sparkfun. Bluetooth Mate Silver. 2015. [ONLINE] Available at: https://www.sparkfun.com/products/12576. [Accessed July 2015]. 24) 24) RC Hobby SA. Multi-Rotor Brushless Motor. 2015. [ONLINE] Available at: http://quadcopter.co.za/index.php?route=product/product&path=18&product_id=51. [Accessed June 2015]. 25) Adams ME, Buckley DJ, Colborn RE. Acrylonitrile-Butadiene-Styrene (Rapra Review reports). Rapra Technology Ltd. 1993:11. ISBN-10: 185957002X 26) Arduino. Arduino Software. 2015. [ONLINE] Available at: https://www.arduino.cc/en/Main/Software. [Accessed October 2015]. 27) Processing 2015. [ONLINE] Available at: https://processing.org/. [Accessed ]. 28) Sparkfun. Using the BlueSMiRF. 2015. [ONLINE] Available at: https://learn.sparkfun.com/tutorials/using-thebluesmirf?_ga=1.36124195.247628218.1442428181. [Accessed October 2015].

43

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Appendix A:

Techno-economic analysis

A1. Time schedule Figure 38 shows a Gantt chart of the baseline schedule (gray) set up during the planning phase and the actual schedule (blue). In average activities took longer, which meant that tasks had to be overlapped more. The testing and debugging phases started later and took longer than expected due to the complicated nature of integrating the subsystems. All milestones were reached on time. In total, the project was completed in less time than planned for. Planned project hours: 563 Actual project hours: 533

Figure 38: Gantt chart of the rotating LED display schedule

A2. Budget and actual costs Figure 39 on the next page shows a bar chart comparing the planned and actual cost of the student‟s own time for different phases of the project. At the start the cost was lower than higher than planned and towards the end the actual costs became lower. In total the cost for the student‟s own time is less than planned. This is because to project was completed in less time than planned for. Planned cost of the student‟s own time: R197 050.00 Actual cost of the student‟s own time: R186 550.00

44

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Figure 39: Bar chart of actual an planned costs Table 5 shows the cost of purchases items and manufacturing processes. These costs is more than planned for due to insufficient information about the exact parts and manufacturing processes needed while doing the planning. Table 5: Costs of purchases and manufacturing

The total actual cost can be calculated by adding the cost of the student‟s own time, the cost of purchased items and the cost of manufacturing processes. The rotating LED display project was completed under budget. Planned total cost: R198 910.00 Actual total cost: R189 777.00 45

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

A3. Technical impact The technical value of this project lies in the unique combination of purchased and manufactured components. The way the subsystems were designed and integrated enriches the current body of knowledge in the field of rotating LED displays. This document, along with the developed prototype, can serve as a valuable stepping stone to future research in this field.

A4. Return on investment The investment for the sponsor is the intellectual property generated by the research and the opportunity to continue the research in this field. The bulk of the project‟s expenses was used for the concept generation, evaluation, planning and developing stages. The expense on manufacturing processes and the procurement of components was minimal. Consequently, the return on investment for the projects sponsor is high.

A5. Potential for commercialization If there is a market for rotating LED displays, this prototype will be an excellent candidate to server as a stepping stone towards a production model.

46

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Appendix B:

Risk assessment

Appendix B documents the risk assessment for this project. This assessment takes into account all laboratory or experimental setups and includes safety measures, safety procedures and emergency evacuation procedures. Guidelines will be given to ensure safe conditions at all times. These guidelines can be found on the department of Mechanical and Mechatronic Engineering‟s website in the document: Safety procedures for laboratory setups. Sections of Appendix B are copied directly from this document and credit goes to the writers of the document and Stellenbosch University. This project will make use of the Mechatronic laboratory for experimental setups to test the various subsystems of the rotating LED display. The tests include the testing of the electronic speed control and the AC generator. Risks include:    

Being hit by the spinning structure Fingers, hair or loose clothes being entangled in the spinning structure The spinning structure disintegrating and objects flying through the air at high speeds Electric shock

People at risk:  

Person who is going to use the setup People who are in close proximity to the setup

Safety procedures and steps to minimise risk:         

Wear protective eyewear Keep hands clear of spinning structure Fasten hair and do not wear loose clothing Ensure that all parts of the structure is fastened securely before staring up the motor Incorporate a safety stop switch Ensure that all wires are isolated Keep fluids away from the setup Always wear shoes in the laboratory Disconnect device from power when working on it

47

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Emergency procedure: The standard procedures of the laboratory used should be followed. The individual conducting the experiment should familiarize himself/herself with the locations of emergency exits, fire extinguishers and first aid kits. Table 6 can be referred to in the case of an emergency. Table 6: Contact details in case of an emergency

48

Rotating LED display

Final Report

Andre Bestbier

2015

Appendix C:

16968107

Calculations

C1. Engineering characteristics C1.1 Display resolution

Therefore the resolution is chosen as 100 wide by 16 high C1.2 LED light intensity Standard LEDs available from China Young Sun LED technology have a luminous intensity of between 180 and 200 candela. The aim is to use LED brighter than this. C1.3 Minimum on time for LED

The minimum on time for a LED in 0.5ms. Shift registers must be able to keep up with this speed . C1.4 Maximum time to switch LEDs The maximum allowable time to switch the LEDs to a new state must be so that it does not interfere with the image displayed. A maximum switch time goal is set to be 1% of the minimum on time for any LED.

49

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

C1.5 Power need for spinning circuit Assume that only 5V components will be used in the rotating circuit. By analyzing standard components it is possible to estimate the current draw of the spinning circuit.

C1.6 Motor torque The motor must have enough torque to overcome the inertia of the spinning rod and the counter torque due to the magnetic field. Torque to overcome friction forces is assumed to be insignificant. Torque to overcome inertia of spinning rod: The spinning rod is modeled mathematically. Figure 40 shows the a diagram of the rod. Masses are handled as point loads and lengths and masses are conservative estimations.

Figure 40: Diagram of spinning rod

50

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

Torque to overcome magnetic field of AC generator: The fundamental principles of a rotating loop is used to estimate the counter torque induced by the AC generator. Figure 41 shows a diagram of a rotating loop. The parameters are estimated while keeping in mind the physical size of the device. The magnetic field is calculated as shown in Appendix C3.

Figure 41: Diagram of rotating loop

51

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

C1.7 Power need for motor If the motor produces a torque of 0.0482 Nm and turns at an angular velocity of 20 Hz the power output of the motor can be calculated as:

C2. AC generator design C2.1 Designed induced voltage

C2.2 Actual induced voltage The FEMM analysis of the AC generator is repeated with the reduced number of magnets. Figure 42 shows the actual magnetic flux density plot of the generator. It can be seen from the figure that the average density is about 0.55 T. All the other parameters are the same as designed.

Figure 42: Actual magnetic flux density plot of AG generator

52

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

C3. Electronic circuits C3.1 Smoothing capacitor A ripple voltage of 0.2 V is chosen to lower the minimum peak voltage required without needing to use an unnecessary large capacitor. The resistance of the spinning circuit was measured. 1N007 diodes are used with a forward voltage drop of 0.7 V. Figure 43 shown a plot of voltage versus time of the rectifier output in blue.

Figure 43: Plot of rectifier output versus time

Use the standard value higher than 200μF to ensure ripple is smaller than 0.2V. Choose C = 220μF. 53

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

C3.2 Register shifting time The time that it takes to shift a complete set of LED state data through the shift registers is to be calculated. 48 bits of data are to be shifted. 74HC4094 are used. 74HC4094 register capabilities:

C3.3 LED resistor sizes All LEDs are connected to 5V and require a forward of 20mA. The forward voltage drop varies for different colours. Table 7 from the LED data sheet shows the forward voltage drops. Resistors are placed in series with the LEDs to regulate current. Resistor values are to be calculated. Table 7: Forward voltage drops for LEDs

A standard value of 120Ω is chosen for the red LEDs and 82Ω for the green and blue LEDs. Slightly lower resistances are chosen to allow a larger than normal current to flow. This will increase the brightness of the LEDs. The low duty cycle will prevent current damage. C3.4 Actual motor torque The motor draws 0.75 A at 12V when spinning at 1200 rpm with its normal operating load. The power and torque developed are to be calculated.

54

Rotating LED display

Final Report

2015

Appendix D:

Andre Bestbier 16968107

Data sheets

D1. Photo interrupter

55

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

D2. Voltage regulator

56

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

D3. RBD LEDs

57

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

D4. Shift registers

58

Rotating LED display

Final Report

2015

Appendix E:

Andre Bestbier 16968107

Source code

E1. loop() function //-------------------------------------------- CHECK BLUETOOTH ----------------------------------if (bluetooth.available()) { serialFlag = 1; readSerial(); //Read and store tha data } //-------------------------------------------- CHECK INTERRUPT ----------------------------------//Positive spike from the photo interruptor - zero position reached if (analogRead(A0) < 100 && gateFlag == 0 && serialFlag == 0) { digitalWrite(ledPin, HIGH); period = periodCount; //Calculate the periode periodCount = 0; //Reset the period timer gateFlag = 1; dispFlag = 1; } else if (analogRead(A0) > 100 && gateFlag == 1 && serialFlag == 0) { digitalWrite(ledPin, LOW); gateFlag = 0; } //------------------------------------------- CHECK DISPLAY STATUS ------------------------------if (dispFlag == 1 && serialFlag == 0) { displayFunction(); //Display the next coulomb of the image } //------------------------------------------ LOOP() FUNCTION COUNTER -----------------------if (periodCount < 1000) { periodCount++; //Increment the loop counter } }

59

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

E2. displayFunction() function void displayFunction() { if (loopCount == (period / 100)) { shift(val[pixelCount]); pixelCount++; if (pixelCount == x) { pixelCount = 0 dispFlag = 0; shift(zero); } loopCount = 0; } loopCount++; }

//Calculate pixel period //Shift the next coulomb of if the image //If the while image has been displayed

E3. readSerial() function void readSerial() { if (count6 < 6) { val[countX][count6] = ((int)bluetooth.read()); count6++; } if (count6 == 6) { countX++; count6 = 0; } if (countX == x) { countX = 0; count6 = 0; serialFlag = 0; digitalWrite(ledPin, HIGH); //On-board LED indicate when upload is done delay(50); digitalWrite(ledPin, LOW); } }

60

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

E4. shift() function void shift(int val[]) { digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, val[0]); //Shift value to register 6 shiftOut(dataPin, clockPin, MSBFIRST, val[1]); //Shift value to register 5 shiftOut(dataPin, clockPin, MSBFIRST, val[2]); //Shift value to register 4 shiftOut(dataPin, clockPin, MSBFIRST, val[3]); //Shift value to register 3 shiftOut(dataPin, clockPin, MSBFIRST, val[4]); //Shift value to register 2 shiftOut(dataPin, clockPin, MSBFIRST, val[5]); //Shift value to register 1 digitalWrite(latchPin, HIGH); }

E5. bluetoothSetup() function void bluetoothSetup() { bluetooth.begin(115200); bluetooth.print("$"); bluetooth.print("$"); bluetooth.print("$"); delay(100); bluetooth.println("U,9600,N"); bluetooth.begin(9600); }

// The Bluetooth Mate defaults to 115200bps // Print three times individually // Enter command mode // Short delay, wait for the Mate to send back CMD // Temporarily Change the baud rate to 9600, no parity // Start Bluetooth serial at

61

Rotating LED display

Final Report

Andre Bestbier

2015

16968107

Appendix F:

LED strip schematic diagram

Figure 44: Schematic diagram of LED strip 62

Rotating LED display

Final Report

2015

Appendix G:

Andre Bestbier 16968107

Detailed drawings

G1. Shaft layout drawing

G2. Base layout drawing 63

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

64

Rotating LED display

Final Report

2015

Andre Bestbier 16968107

G3. Rod layout drawing

65