42
REVOLIGHTS™: ARDUNIO CLONE Zack Fowler Network Security & Electronics Program, Dept. of Applied Engineering & Technology, Eastern Kentucky University 1

REVOLIGHTS™: ARDUNIO CLONE

  • Upload
    teryl

  • View
    70

  • Download
    2

Embed Size (px)

DESCRIPTION

REVOLIGHTS™: ARDUNIO CLONE. Zack Fowler Network Security & Electronics Program, Dept. of Applied Engineering & Technology, Eastern Kentucky University. OUTLINE. Abstract Motivation Introduction Problem Statement Proposed Solution Implementation Results Conclusions Future work. - PowerPoint PPT Presentation

Citation preview

Page 1: REVOLIGHTS™: ARDUNIO CLONE

1

REVOLIGHTS™: ARDUNIO CLONE

Zack FowlerNetwork Security & Electronics Program, Dept. of Applied Engineering & Technology, Eastern Kentucky University

Page 2: REVOLIGHTS™: ARDUNIO CLONE

2

OUTLINE

• Abstract• Motivation• Introduction• Problem Statement• Proposed Solution• Implementation• Results• Conclusions• Future work

Page 3: REVOLIGHTS™: ARDUNIO CLONE

3

Abstract

As more people look to bicycling as a healthy and cost-effective method of transportation, tackling safety concerns becomes even more important. The Revolights™ system is a great way to help improve bike riders’ visibility at night but does not come cheap. This is my economical Arduino-based clone of the Revolights™ system that offers life-saving technology to more people.

Page 4: REVOLIGHTS™: ARDUNIO CLONE

4

Motivation

• Since 2000, ACS data shows a 61.6% increase in bicycle commuting and the trend is continuing to grow.

• Addressing the safety concerns of commuting by bicycle is important to keep this trend.

• Some products, such as the Revolights™ system, are revolutionizing bicycle safety at night but are affordable only to a small fraction of riders.

• This project aims to reproduce the Revolights™ technology in a way that is both affordable and DIY-friendly

Page 5: REVOLIGHTS™: ARDUNIO CLONE

5

What is Revolights?

Page 6: REVOLIGHTS™: ARDUNIO CLONE

6

Introduction

This project requirs learning/refreshing the following skills:• Arduino programming at an intermediate

level.• Basic circuit design• Basic Soldering• Basic knowledge of bicycle mechanics

Page 7: REVOLIGHTS™: ARDUNIO CLONE

7

Problem Statement

Conventional bicycle lights that mount to the handlebar stem or seat stem do not offer the rider sufficient visibility to vehicles approaching the biker at a perpendicular angle. The Revolights™ system provides a great way to solve this issue, but the high price of the product prevents many people from affording this revolutionary technology. This project addresses the high cost of the Revolights™ system and provides a much cheaper, DIY alternative. This technology will prevent bicycle-related injuries and fatalities and that is something that every rider should have access to.

Page 8: REVOLIGHTS™: ARDUNIO CLONE

8

Assumptions

The final product of this project is exposed and vulnerable to weather and rough conditions. Since this project is assumed to only be used at night and on paved surfaces, I did not spend any resources on making this project weather proof, terrain proof, or aesthetically pleasing (the wiring).

Page 9: REVOLIGHTS™: ARDUNIO CLONE

9

Proposed Solution

• Steps taken to solve the problem: – Brainstorming– Learning and Designing (Arduino coding)– Writing Code– Choosing and ordering parts– Assembling hardware– Installing hardware– Testing code– Rewriting code– Future improvements

Page 10: REVOLIGHTS™: ARDUNIO CLONE

10

Brainstorming

I brainstormed the entire duration of the project as I was faced with new challenges and options:• Platform – Arduino, Attiny 167, etc• Road Bike vs new commuter bike• Number of LEDs, colors, size of arc• Which functions/variables to use in Arduino –

millis(), arrays, float, long, attachInterrupt

Page 11: REVOLIGHTS™: ARDUNIO CLONE

11

Learning and Designing

• I didn’t formally design any diagrams or schematics (except some flow charts) for the purpose of aiding in the building of the system, but I made some for the presentation.

• I had to learn a TON about Arduino to pull this project off. I used the Arduino learning page and YouTube to do this.

• Majority of time spent researching the millis() function as that is the primary function driving my project.

• I also researched a lot about arrays to shrink the size of my code considerably.

Page 12: REVOLIGHTS™: ARDUNIO CLONE

12

Page 13: REVOLIGHTS™: ARDUNIO CLONE
Page 14: REVOLIGHTS™: ARDUNIO CLONE

14

Page 15: REVOLIGHTS™: ARDUNIO CLONE
Page 16: REVOLIGHTS™: ARDUNIO CLONE
Page 17: REVOLIGHTS™: ARDUNIO CLONE

Grand total of 200 lines of code

Page 18: REVOLIGHTS™: ARDUNIO CLONE

18

Page 19: REVOLIGHTS™: ARDUNIO CLONE

Writing Code

• I spent weeks pouring through the tutorials on Arduino’s main page and watching YouTube videos.

• I had help from my friend Henry who is a software developer.• Creating a flow chart was a huge help.• Trial and error before installing the hardware – I plugged the

strands into a breadboard and watched the sequence of lights.

• Testing the code that way was difficult because it was impossible to tell if the arc was correct without the lights spinning.

19

Page 20: REVOLIGHTS™: ARDUNIO CLONE

20

Choosing Parts

• Platform – I chose Arduino because it is cheap (although not nearly as cheap as Attiny chips), very well supported/documented, and I had one avilable.

• The LEDs that are used were chosen because I could buy them in almost the exact quantity I needed, they were cheap, and they are bright with a decent viewing angle.

• The hall effects sensor that is used was chosen because it works exactly like a digital reed switch, making it simple and cheap.

Page 21: REVOLIGHTS™: ARDUNIO CLONE

21

Page 22: REVOLIGHTS™: ARDUNIO CLONE

22

Assembling Hardware

• I spent a couple hours in the lab soldering all of the LEDs, resistors, wires, and hall effects sensors together.

• The LEDs are wired in parallel, 12 pairs in white and 8 pairs in red, with one 620 ohm limiting resistor per pair.

• I verified that each strand of hardware was operational directly after soldering it together.

Page 23: REVOLIGHTS™: ARDUNIO CLONE

23

Page 24: REVOLIGHTS™: ARDUNIO CLONE

24

Installing Hardware

• To attach each strand to a spoke, I removed the spoke with a special tool and slid the strand around it and reset the spoke.

• I used electrical tape to secure the strand to the spoke, covering all exposed wiring.

• I tested each strand immediately for functionality after taping it to the spoke.

• After all the strands were secured to the spokes, I zip-tied the Arduino board as close to the center of the wheel as possible.

Page 25: REVOLIGHTS™: ARDUNIO CLONE

25

Page 26: REVOLIGHTS™: ARDUNIO CLONE

26

Page 27: REVOLIGHTS™: ARDUNIO CLONE

27

Page 28: REVOLIGHTS™: ARDUNIO CLONE

28

Installing Hardware

• At this point, each strand had more than enough wire to reach the appropriate pin on the Arduino.

• One at a time, I trimmed the positive wire of each strand to an appropriate length and inserted it into the correct pin.

• For the negative wires of each strand, I bundled them together, along with a wire grounded on the Arduino, and soldered them all together to form a common ground.

• I zip-tied the battery pack to the spokes to the spokes to provide power.

Page 29: REVOLIGHTS™: ARDUNIO CLONE

29

Page 30: REVOLIGHTS™: ARDUNIO CLONE

30

Page 31: REVOLIGHTS™: ARDUNIO CLONE

31

Page 32: REVOLIGHTS™: ARDUNIO CLONE

32

Testing Code

• I could not accurately test the interaction between the sensor and my code until all of the hardware was mounted on the wheel.

• To test my code, I would load it onto the Arduino and manually spin the wheel and observe the resulting LED sequence at different speeds.

Page 33: REVOLIGHTS™: ARDUNIO CLONE

33

Rewriting Code

• Due to proper planning and sufficient time invested in learning how to program the Arduino, no code modifications were necessary for the front wheel.

• However, once I realized the back wheel could only use 8 LEDs, I had to edit the array, the calRPM function, and the refreshLEDstate function to get the arc working correctly.

Page 34: REVOLIGHTS™: ARDUNIO CLONE

34

Future Improvements

There is plenty of room for improvement on this project, including:• Shrinking the project by using a chip like the Attiny

167 to replace the Arduino.• Weather proofing the project and making the wires

non-detachable.• Decreasing the chance the LEDs become

disoriented.• Improving the overall aesthetics.

Page 35: REVOLIGHTS™: ARDUNIO CLONE

35

Page 36: REVOLIGHTS™: ARDUNIO CLONE

36

Future Improvements

Some more additions I would like to eventually add to this project:• Solar powered or rechargeable• Wireless programming or programming via mobile

(Android)• Randomized stanbymode patterns• Multi-color LEDs• LEDs that respond to music

Page 37: REVOLIGHTS™: ARDUNIO CLONE

37

Implementation

• Getting the front wheel working was very straightforward and went surprisingly smoothly.

• Approaching the back wheel with the assumptions that it was going to be the same process as the front wheel was a mistake.

• The back wheel has 32 spokes whereas the front has 36, making it impossible to have 12 evenly spaced strands.

• Because of this, I had to rewrite parts of the code to accommodate 8 strands.

• Also, since the front wheel’s arc was 4 LEDs (120 degrees) and the back wheels was also 4 LEDs (180 degrees) I had to change the code for the front wheel to make a 6 LED arc (180 degrees) to match.

Page 38: REVOLIGHTS™: ARDUNIO CLONE

38

Results

• The most important result is a fully functioning Revolights™ clone using Arduino technology.

• This clone can also be reprogrammed by the user to alter the light sequence to their desire, an added functionality.

• The end result is cheap and DIY friendly, and most importantly it can save lives and prevent injuries.

Page 39: REVOLIGHTS™: ARDUNIO CLONE

39

Video

Page 40: REVOLIGHTS™: ARDUNIO CLONE

40

Conclusions

• This project was a ton of fun and I learned so much from it, especially how to motivate and educate myself.

• I fell in love with the simplicity and power of Arduino, I am inspired to build many more projects based on it.

• I feel like a badass riding this bike at night now.

Page 41: REVOLIGHTS™: ARDUNIO CLONE

41

References

1. Arduino - Learn the basics. (n.d.). Arduino - Learn the basics. Retrieved March 28, 2014, from http://arduino.cc/en/Tutorial/HomePagehttp://arduino.cc/en/Tutorial/HomePage

2. Program an ATtiny with Arduino. (n.d.). Instructables.com. Retrieved March 28, 2014, from http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/

3. Revolights. (2013, July 22). YouTube. Retrieved March 28, 2014, from https://www.youtube.com/watch?v=yVjL6PN4_I4

4. bildr » A Strange Attraction. Various Hall Effect Sensors. (2011, April 5). bildr RSS. Retrieved March 28, 2014, from http://bildr.org/2011/04/various-hall-effect-sensors/

5. Open Source Hardware Group. (2012, August 10). Tutorial 12: Blink an LED without using the delay() function: Arduino Course for Absolute Beginners. YouTube. Retrieved April 20, 2014, from https://www.youtube.com/watch?v=y17QOtAVn_s

6. Ribaric, T., & Younker, J. (). Arduino-enabled Patron Interaction Counting. Code{4}lib

7. Ken. "ACS: Bike Commuting Continues to Rise | League of American Bicyclists." ACS: Bike Commuting Continues to Rise | League of American Bicyclists. N.p., 25 Sept. 2013. Web. 2 May 2014. <http://bikeleague.org/content/acs-bike-commuting-continues-rise>.

Page 42: REVOLIGHTS™: ARDUNIO CLONE

42

Acknowledgements

• Picture on Slide 1 - http://arduino.cc/en/Trademark/CommunityLogo• Video on Slide 4 - https://www.youtube.com/watch?v=-UvO3QITwkU• Picture on Slide 2 - http://www.freshnessmag.com/2013/04/08/revolights-x-mission-bicycle-company/• Picture on Slide 6 - http://gearjunkie.com/revolights-bike-lights• Hall effect sensor picture Slide 20 - http://octopart.com/oh090u-optek-800069• Picture on Slide 34 - http://atmelcorporation.wordpress.com/2014/04/11/digispark-goes-pro-attiny167-on-kickstarter-%E2%80%A8%E2%80%A8/

I would like to thank my friend Henry Abbey for his invaluable role in helping me with the programming. I would also like to thank Aaron Eastham for his helpful support and encouragement through this project and his 9v battery pack he lent me.

Thanks to the team at Revolights™ for designing the original product, it is revolutionary and inspiring.