SlideShare a Scribd company logo
1 of 50
Goals
• Light you up!
• Show a simple example
• Give you a place to start
…
#3: LED Strip
+5VDC
#4: Battery
Clock
Data
LM2596 Adjustable
A0
D3
D
2
5
V
G
N
D
GND
#1: Arduino
Board#2: Microphone
Module
O
U
T
V
C
C
G
N
D
#5: DC-DC Converter
HEADBAND
BATTERY PACK POWER CONVERTER CABLE
(20) LEDs
1.25V
Agenda
• Why this project
• How it’s designed
• Where it could go
Why
• Skrillex was coming to town!!!
• What could we bring to the concert?
– LED Hats – too easy to steal
– LED Shirts – too ordinary
– LED Wristbands – not easily seen
– LED Skirts – not me! *
– LED Necklaces – too easy to break
• Decided on headbands
– Easy to make
– Easy to hide
– Should be cheap
* See Kristina’s presentation at 2:15PM !!
Where to Get Started
• Three major components:
– Headband
– Battery Pack
– Power Converter Cable
• Needed four sets
• Might get broken, stolen or confiscated, so
they had to be cheap.
• Maximize reuse of past projects
• Maximize reuse into future projects
Budget was $200 and schedule was 2 months
Block Diagram
…
#3: LED Strip
+5VDC
#4: Battery
Clock
Data
LM2596 Adjustable
A0
D3
D2
5V
GND
GND
#1: Arduino
Board#2: Microphone
Module
OUT
VCC
GND
#5: DC-DC Converter
HEADBAND
BATTERY PACK POWER CONVERTER CABLE
(20) LEDs
Major Design Decisions - 1
#3 LED Strip: decided to use a LPD8806-based LED Strip
1. LED Strip was chosen by convenience = I already had 2+ meters
2. Brightness set by LED Strip choice = 10mA to 15mA/LED
3. Number of LEDs set by head size = 20 LEDs
Therefore: LED strip needs roughly 300mA at full brightness
4. System voltage set by LED Strip voltage, which = 5V
5. Arduino and microphone power considered negligible
Therefore: Power needs are appr. 300mA x 5V = 1.5W
#4 Battery: Li-ion battery pack (rechargeable, high energy-density), 18650
cell size (2600mAH, popular) in a 3-cell pre-assembled pack, 11.1V
6. Battery technology needed to be rechargeable (for reuse)
7. For power, battery needed to provide 1.5W for several hours
8. Battery voltage needed to be > (5V + minimum regulation voltage)
9. Battery needed to fit in pocket or purse
10.Pre-assembled packs, with built in protection for over-charge, low-voltage
shutoff, short-circuit, etc. – safer, less hassle
Run Time
SizePower
Major Design Decisions - 2
#5 DC-DC Converter: picked a LM2596 based DC-DC converter
11.Regulator needed to have an input of 11.1V and output needed to be 5V
12.Regulator needed to handle > 300mA, 500mA preferred
13.Regulator needed to be efficient to avoid heat and maximize run-time
14.Regulator needed to be small and light weight
#1 Arduino: picked SparkFun Pro Micro, 5V version, based on size
15.Arduino voltage needed to be 5V to match LED Strip voltage
16.Arduino board size needed to be as thin as the LED strip ~ 0.5” to 0.7”
17.Arduino board needed at least one analog input and two digital outputs
#2 Microphone Module: AdaFruit P/N 1713 Electret Microphone Module
18.Microphone needed to have a built-in amplifier
19.Microphone needed to run on 5V
20.Microphone needed to have adjustable sensitivity
21.Microphone needed to be as thin as the LED Strip
22.Update: automatic gain control!!
#1: Arduino Board
• SparkFun Pro Micro
• Dimensions: 1.3” x 0.7"
• Features:
– ATmega32U4 - 5V/16MHz
– Supported by Arduino IDE
– Onboard Micro-USB
– 4 x 10-bit ADC pins
– 12 x Digital I/Os
– $20
#2: Microphone Module
• AdaFruit P/N 1713
• Small Electret Microphone
• Built-in microphone amp
• Auto Gain Control (AGC) –
variable sensitivity!
• 5V Operation
• $8
#3: LED Strip
• Popular LPD8806 Controller IC
• Sold 32 to 52 LEDs per meter
• Approximately $20 to $30 per meter
• Available from multiple sources on eBay
#4: Battery Pack
• Li-ion for size, power
density and recharging
• Pre-assembled w/ built-in
protection circuitry
• 11.1V output can be
regulated down to 5V
• 2600mAh size should
last several hours
• Small enough to fit into a
pocket or purse
• $30
#5: DC-DC Converter
• DC-DC Converter Module (LM2596 IC)
– Input: 4V to 35V – (11.1V battery voltage)
– Output: 1.5V to 30V - adjusted to 5V
– Current: 3A (max) - can handle the estimated
250mA to 300mA
– Small and efficient – 80% to 90%
• Multiple sources
• Appr. $1.25 ea.
Rough Costs
1) Arduino = $20.00
2) Microphone = $8.00
3) LED Strip = $11.50
4) DC-DC Converter = $1.25
5) Battery Pack = $30.00
6) Wiring & Plugs = $6.00
7) Headband = $1.25
8) Misc = $1.00
Total cost per Headband approximately: $80 each
Plus: Charger = $18.00
Decided to only build 3 to stick close to budget.
General Construction
• See Appendix
– Battery Pack
– Power Convertor Cable
– Headband
• ~1 to 2 hours each
Software - 1
/************************************************************************/
/* Headband01: LPD8806-based RGB LED Modules in a strip using audio input
/* lights up all LEDs in a rainbow of color, with variable brightness
/************************************************************************/
#include "LPD8806.h" //the color strip library
#include "SPI.h" //the communication library for strip
#define NLEDS 20 //Number of RGB LEDs in strand
#define AVERAGECOUNT 32 //the number of audio samples to average
#define AUDIO 0 //the analog input channel
#define OFFSET 255 //the DC offset of the microphone module
// Chose 2 pins for output; can be any valid output pins:
#define DATAPIN 2 //connect to the Data In pad on the LED strip
#define CLOCKPIN 3 //connect to the clock pad on the strip
// First parameter is the number of LEDs in the strand. Next two
// parameters are SPI data and clock pins:
LPD8806 strip = LPD8806(NLEDS, DATAPIN, CLOCKPIN);
struct RGB { // a structure to hold the color of a pixel
byte r;
byte g;
byte b;
};
Software - 2
/************************************************************************/
/* setup: the initialization code - executes once on reset (power up)
/************************************************************************/
void setup() {
strip.begin(); // Initialize the LED strip
strip.show(); // Update the strip; to start they are all 'off'
}
Software - 3
/************************************************************************/
/* loop: the main program - executes forever
/************************************************************************/
void loop() {
int audio = 0; // storage for the averaged reading
for (int i=0; i < 220; i++){
// get an averaged audio sample from the mic then
// draw a rainbow of colors out from the middle
rainbowMiddle(NLEDS, averageDetect(AUDIO), i);
}
for (int i=219; i > 0; i--){
rainbowMiddle(NLEDS, averageDetect(AUDIO), i);
}
}
Software - 4
/************************************************************************/
/* averageDetect: Get the average analog voltage on the analog input pin
/************************************************************************/
int averageDetect(int analogIn){
int averageValue = 0; // initialize average value
long int sum = 0; // initial register to hold the sum
int sensorValue = 0; // analog input sample (A/D= 0 to 1023, 0 - 5V)
// read AVERAGECOUNT analog values and find the average
for (int i=0; i < AVERAGECOUNT; i++){
// read the analog voltage (range is 0 to 1024)
// subtract the DC offset of the module and then sum
// the absolute value
sensorValue = analogRead(analogIn) - OFFSET;
sum = sum + abs(sensorValue); //
}
averageValue = (sum / AVERAGECOUNT) ; //calculate the average
return (averageValue);
}
1.25V
Software - 5
/************************************************************************/
/* rainbowMiddle: draws lines from the middle of the strip outward
/************************************************************************/
int rainbowMiddle(int peak, int brightness, byte shift){
struct RGB color = {0,0,0}; // the color of a single pixel
int j = NLEDS / 2; // middle of the strip
brightness = 0xFF / brightness;
//Color the strip from the middle out to the ends
// if the position along the strip is less than the peak, color the pixel
// else, turn off all the pixels above the peak value
for (int i = 0; i < j; i++){ // going to mirror the colors
if (i < peak){
// get the color for this position (input range 0 to 384)
color = Wheel((i * 384 / NLEDS + shift) % 384);
strip.setPixelColor(j - i-1, color.r / brightness, color.b /
brightness, color.g / brightness);
strip.setPixelColor(j + i, color.r / brightness, color.b / brightness,
color.g / brightness);
}
else {
strip.setPixelColor(j - i-1, 0, 0, 0);
strip.setPixelColor(j + i, 0, 0, 0);
}
}
strip.show(); //show the new colors - takes ~ 4.66 msec on the Uno
}
Software - 6
/************************************************************************/
/* Wheel: Input a value 0 to 384 to get an RGB value from a color wheel
/* The colors transition from r > g > b and back to r
/************************************************************************/
struct RGB Wheel(uint16_t WheelPos){
struct RGB color = {0,0,0}; // storage to calculate the color
switch(WheelPos / 128){
case 0:
color.r = 127 - WheelPos % 128; // Red down
color.g = WheelPos % 128; // Green up
color.b = 0; // Blue off
break;
case 1:
color.g = 127 - WheelPos % 128; // Green down
color.b = WheelPos % 128; // Blue up
color.r = 0; // Red off
break;
case 2:
color.b = 127 - WheelPos % 128; // Blue down
color.r = WheelPos % 128; // Red up
color.g = 0; // Green off
break;
}
return color;
}
DEMO
Where Could It Go?
• More LEDS!!!
• Cheaper, smaller electronics
• Cheaper, smaller battery
• Washable
• Add light modes
• Add spectrum analysis
• Add light sensor
• Bluetooth to phone
• Get color data from soundboard
• Send individual color data
Run Time
SizePower
Questions?
• Thank you for your time!!
• Files at:
https://www.dropbox.com/sh/kmfop133g57
8815/LjwEI3AlPT
Appendix - General Construction
• Assemble Battery Pack
• Assemble Power Convertor Cable
• Assemble Headband
Battery Pack – Step 1
• Assembled Battery
Pack using (3) 18650
3.7V 2600mAh cells
• Built-in over-charge
and over-discharge
protection circuitry
• Comes w/ 6” wires
• From All-Battery
Center on eBay
• Roughly $30 each
Battery Pack – Step 2
• Solder Deans-style to the
battery wires
• Use Female socket for
battery
• Note polarity!
• Be careful not to short
battery wires when soldering
• Use shrink tubing to protect
against accidental shorts
Battery Pack – Step 3
• Finished Battery Pack
• Charge with
compatible charger
– eBay: Tenergy TLP-2000
Li-Ion Charger
– Solder Male Deans Plug
to Charger output leads
Power Converter Cable
• Converts Battery voltage to 5V
Battery Input
5V Plug To Headband
DC-DC Converter Module
3 Foot Cable
Power Converter Cable – Step 1
• Buy a 1-meter 5.5mm/2.1mm Male-Female
Power Cable and cut into two sections
– Female socket side = appr. 6 inches
– Male plug side = remaining length – appr 3 feet
5V Plug From
Power Converter
5V Socket From
Headband
Power Converter Cable – Step 2
• Solder 6-inch 22AWG Red/Black wires to input
side of the module
• Solder the 3-foot Male Power Cable to the
output side
– Note the color and polarity of the internal wires
• Adjust trimpot to get 5V on the output
Power Converter Cable – Step 3
• Solder Red/Black wires from input side to
Male Deans Plug
• Be sure to use Shrink tubing
• Note polarity
Battery
Power Converter
Power Converter Cable – Step 4
• Fold both wires back roughly 0.5 inches from
the module edge
• Secure with tie-wraps to form strain reliefs
• Secure cables to module with tie wrap
Power Converter Cable – Step 5
• Use 1.0-inch to 1.25-inch Shrink tubing over
the entire module
• Slightly heat the ends of the tubing and pull
tight with tie-wraps
Headband
Headband – Step 1
• Cut the LPD8809 strip to 20 LEDs
• Cut along the lines
• Note the direction of the arrows – indicates
which is the “input” end
Headband – Step 2
• Solder Data (DAI) and Clock (CLK) lines to thin
flexible wires (26 – 32 AWG) roughly 3-inches
• Solder heavier gauge wire to 5V and GND (22
AWG)
Headband – Step 3
• Solder Data to I/O-2 on the Arduino
• Solder Clock to I/O-3 on the Arduino
• Solder Red 5V wire to the Arduino 5V pin
• Solder Black GND to the GND on the Arduino
• Secure wiring with tie-wrap
Headband – Step 4
• Solder the 6-inch Female Power cable to the
Arduino’s 5V and GND – confirm polarity!
• Solder 22AWG wires from Arduino to the
Microphone Module
– Blue = Mic-OUT to Arduino A0 (Analog 0)
– Black = GND
– Red = 5V
• Use tie-wrap
Headband – Step 5
• Wiring complete!
• Inspect solder joints
• Confirm connections with ohmmeter before
applying power
• Confirm everything with test code!
Note: picture shows older microphone module
Headband – Step 6
• Adjust the Microphone
Gain to lowest level
• Solder a short jumper
from Gain to Vdd
Headband – Step 7
• Hot Melt Glue can be used to secure wiring
Headband – Step 8
• Create supporting plastic band from available
material
• 1” x 19.5” Thin plastic
• Must be flexible
Headband - Step 9
• Attach one side of self-adhesive Velcro to back
• Trim other end to aid in threading into
headband
Headband - Step 10
• Tape LED Strip to plastic support strip
• Don’t block LEDs
Headband – Step 11
• Tape Arduino a bit more securely to protect
wiring
Note: picture shows older microphone module
Headband – Step 12
• If there is a logo – twist the Cotton headband
around so the outside is plain
• Cut a 1” slot in the headband
• Attached the other side of self-adhesive Velcro
to the inside of the headband on either side of
the slot
• Carefully thread the assembly into the
headband
Headband – Step 14
• Attach half of the
Velcro on the
module to one side
of the slot in the
headband
• Route the power
cable out the slot
• Insert the rest of the
module on the inside
of the headband
Headband – Step 15
• Finished installation of the electronics in the
headband
Headband – Step 16
• Done!

More Related Content

More from Mobile March

Using Chipmunk Physics to create a iOS Game - Scott Lembcke
Using Chipmunk Physics to create a iOS Game - Scott LembckeUsing Chipmunk Physics to create a iOS Game - Scott Lembcke
Using Chipmunk Physics to create a iOS Game - Scott LembckeMobile March
 
Using Mobile to Achieve Truly Integrated Marketing - Curt Prins
Using Mobile to Achieve Truly Integrated Marketing - Curt PrinsUsing Mobile to Achieve Truly Integrated Marketing - Curt Prins
Using Mobile to Achieve Truly Integrated Marketing - Curt PrinsMobile March
 
Introduction to Core Data - Jason Shapiro
Introduction to Core Data - Jason ShapiroIntroduction to Core Data - Jason Shapiro
Introduction to Core Data - Jason ShapiroMobile March
 
Developing Custom iOs Applications for Enterprise
Developing Custom iOs Applications for EnterpriseDeveloping Custom iOs Applications for Enterprise
Developing Custom iOs Applications for EnterpriseMobile March
 
Product Management for Your App
Product Management for Your AppProduct Management for Your App
Product Management for Your AppMobile March
 
Dueling Banjos: Inter-app Communication
Dueling Banjos: Inter-app Communication Dueling Banjos: Inter-app Communication
Dueling Banjos: Inter-app Communication Mobile March
 
Guy Thier Keynote Presentation
Guy Thier Keynote PresentationGuy Thier Keynote Presentation
Guy Thier Keynote PresentationMobile March
 
Mobile March Olson presentation 2012
Mobile March Olson presentation 2012Mobile March Olson presentation 2012
Mobile March Olson presentation 2012Mobile March
 
Bannin mobile march_2012_public
Bannin mobile march_2012_publicBannin mobile march_2012_public
Bannin mobile march_2012_publicMobile March
 
Beginningi os part1-bobmccune
Beginningi os part1-bobmccuneBeginningi os part1-bobmccune
Beginningi os part1-bobmccuneMobile March
 
Mobile march2012 android101-pt2
Mobile march2012 android101-pt2Mobile march2012 android101-pt2
Mobile march2012 android101-pt2Mobile March
 
Mobile march2012 android101-pt1
Mobile march2012 android101-pt1Mobile march2012 android101-pt1
Mobile march2012 android101-pt1Mobile March
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patternsMobile March
 
Beginning i os part 2 sam kirchmeier
Beginning i os part 2   sam kirchmeierBeginning i os part 2   sam kirchmeier
Beginning i os part 2 sam kirchmeierMobile March
 
Automated interactive testing for i os
Automated interactive testing for i osAutomated interactive testing for i os
Automated interactive testing for i osMobile March
 
Olson mobile march presentation 2012 03-16
Olson mobile march presentation 2012 03-16Olson mobile march presentation 2012 03-16
Olson mobile march presentation 2012 03-16Mobile March
 
Mobile marketing meltdown
Mobile marketing meltdownMobile marketing meltdown
Mobile marketing meltdownMobile March
 

More from Mobile March (20)

Using Chipmunk Physics to create a iOS Game - Scott Lembcke
Using Chipmunk Physics to create a iOS Game - Scott LembckeUsing Chipmunk Physics to create a iOS Game - Scott Lembcke
Using Chipmunk Physics to create a iOS Game - Scott Lembcke
 
Using Mobile to Achieve Truly Integrated Marketing - Curt Prins
Using Mobile to Achieve Truly Integrated Marketing - Curt PrinsUsing Mobile to Achieve Truly Integrated Marketing - Curt Prins
Using Mobile to Achieve Truly Integrated Marketing - Curt Prins
 
Introduction to Core Data - Jason Shapiro
Introduction to Core Data - Jason ShapiroIntroduction to Core Data - Jason Shapiro
Introduction to Core Data - Jason Shapiro
 
Developing Custom iOs Applications for Enterprise
Developing Custom iOs Applications for EnterpriseDeveloping Custom iOs Applications for Enterprise
Developing Custom iOs Applications for Enterprise
 
Product Management for Your App
Product Management for Your AppProduct Management for Your App
Product Management for Your App
 
Robotium Tutorial
Robotium TutorialRobotium Tutorial
Robotium Tutorial
 
Dueling Banjos: Inter-app Communication
Dueling Banjos: Inter-app Communication Dueling Banjos: Inter-app Communication
Dueling Banjos: Inter-app Communication
 
Guy Thier Keynote Presentation
Guy Thier Keynote PresentationGuy Thier Keynote Presentation
Guy Thier Keynote Presentation
 
Mobile March Olson presentation 2012
Mobile March Olson presentation 2012Mobile March Olson presentation 2012
Mobile March Olson presentation 2012
 
Bannin mobile march_2012_public
Bannin mobile march_2012_publicBannin mobile march_2012_public
Bannin mobile march_2012_public
 
Beginningi os part1-bobmccune
Beginningi os part1-bobmccuneBeginningi os part1-bobmccune
Beginningi os part1-bobmccune
 
Mobile march2012 android101-pt2
Mobile march2012 android101-pt2Mobile march2012 android101-pt2
Mobile march2012 android101-pt2
 
Mobile march2012 android101-pt1
Mobile march2012 android101-pt1Mobile march2012 android101-pt1
Mobile march2012 android101-pt1
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patterns
 
Beginning i os part 2 sam kirchmeier
Beginning i os part 2   sam kirchmeierBeginning i os part 2   sam kirchmeier
Beginning i os part 2 sam kirchmeier
 
Automated interactive testing for i os
Automated interactive testing for i osAutomated interactive testing for i os
Automated interactive testing for i os
 
Beatles&webdesign
Beatles&webdesignBeatles&webdesign
Beatles&webdesign
 
Olson mobile march presentation 2012 03-16
Olson mobile march presentation 2012 03-16Olson mobile march presentation 2012 03-16
Olson mobile march presentation 2012 03-16
 
Mobile marketing meltdown
Mobile marketing meltdownMobile marketing meltdown
Mobile marketing meltdown
 
Windows phone 7
Windows phone 7Windows phone 7
Windows phone 7
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Arduino Wearables: You Light Up My Life-Leon Durivage

  • 1.
  • 2. Goals • Light you up! • Show a simple example • Give you a place to start … #3: LED Strip +5VDC #4: Battery Clock Data LM2596 Adjustable A0 D3 D 2 5 V G N D GND #1: Arduino Board#2: Microphone Module O U T V C C G N D #5: DC-DC Converter HEADBAND BATTERY PACK POWER CONVERTER CABLE (20) LEDs 1.25V
  • 3. Agenda • Why this project • How it’s designed • Where it could go
  • 4. Why • Skrillex was coming to town!!! • What could we bring to the concert? – LED Hats – too easy to steal – LED Shirts – too ordinary – LED Wristbands – not easily seen – LED Skirts – not me! * – LED Necklaces – too easy to break • Decided on headbands – Easy to make – Easy to hide – Should be cheap * See Kristina’s presentation at 2:15PM !!
  • 5. Where to Get Started • Three major components: – Headband – Battery Pack – Power Converter Cable • Needed four sets • Might get broken, stolen or confiscated, so they had to be cheap. • Maximize reuse of past projects • Maximize reuse into future projects Budget was $200 and schedule was 2 months
  • 6. Block Diagram … #3: LED Strip +5VDC #4: Battery Clock Data LM2596 Adjustable A0 D3 D2 5V GND GND #1: Arduino Board#2: Microphone Module OUT VCC GND #5: DC-DC Converter HEADBAND BATTERY PACK POWER CONVERTER CABLE (20) LEDs
  • 7. Major Design Decisions - 1 #3 LED Strip: decided to use a LPD8806-based LED Strip 1. LED Strip was chosen by convenience = I already had 2+ meters 2. Brightness set by LED Strip choice = 10mA to 15mA/LED 3. Number of LEDs set by head size = 20 LEDs Therefore: LED strip needs roughly 300mA at full brightness 4. System voltage set by LED Strip voltage, which = 5V 5. Arduino and microphone power considered negligible Therefore: Power needs are appr. 300mA x 5V = 1.5W #4 Battery: Li-ion battery pack (rechargeable, high energy-density), 18650 cell size (2600mAH, popular) in a 3-cell pre-assembled pack, 11.1V 6. Battery technology needed to be rechargeable (for reuse) 7. For power, battery needed to provide 1.5W for several hours 8. Battery voltage needed to be > (5V + minimum regulation voltage) 9. Battery needed to fit in pocket or purse 10.Pre-assembled packs, with built in protection for over-charge, low-voltage shutoff, short-circuit, etc. – safer, less hassle Run Time SizePower
  • 8. Major Design Decisions - 2 #5 DC-DC Converter: picked a LM2596 based DC-DC converter 11.Regulator needed to have an input of 11.1V and output needed to be 5V 12.Regulator needed to handle > 300mA, 500mA preferred 13.Regulator needed to be efficient to avoid heat and maximize run-time 14.Regulator needed to be small and light weight #1 Arduino: picked SparkFun Pro Micro, 5V version, based on size 15.Arduino voltage needed to be 5V to match LED Strip voltage 16.Arduino board size needed to be as thin as the LED strip ~ 0.5” to 0.7” 17.Arduino board needed at least one analog input and two digital outputs #2 Microphone Module: AdaFruit P/N 1713 Electret Microphone Module 18.Microphone needed to have a built-in amplifier 19.Microphone needed to run on 5V 20.Microphone needed to have adjustable sensitivity 21.Microphone needed to be as thin as the LED Strip 22.Update: automatic gain control!!
  • 9. #1: Arduino Board • SparkFun Pro Micro • Dimensions: 1.3” x 0.7" • Features: – ATmega32U4 - 5V/16MHz – Supported by Arduino IDE – Onboard Micro-USB – 4 x 10-bit ADC pins – 12 x Digital I/Os – $20
  • 10. #2: Microphone Module • AdaFruit P/N 1713 • Small Electret Microphone • Built-in microphone amp • Auto Gain Control (AGC) – variable sensitivity! • 5V Operation • $8
  • 11. #3: LED Strip • Popular LPD8806 Controller IC • Sold 32 to 52 LEDs per meter • Approximately $20 to $30 per meter • Available from multiple sources on eBay
  • 12. #4: Battery Pack • Li-ion for size, power density and recharging • Pre-assembled w/ built-in protection circuitry • 11.1V output can be regulated down to 5V • 2600mAh size should last several hours • Small enough to fit into a pocket or purse • $30
  • 13. #5: DC-DC Converter • DC-DC Converter Module (LM2596 IC) – Input: 4V to 35V – (11.1V battery voltage) – Output: 1.5V to 30V - adjusted to 5V – Current: 3A (max) - can handle the estimated 250mA to 300mA – Small and efficient – 80% to 90% • Multiple sources • Appr. $1.25 ea.
  • 14. Rough Costs 1) Arduino = $20.00 2) Microphone = $8.00 3) LED Strip = $11.50 4) DC-DC Converter = $1.25 5) Battery Pack = $30.00 6) Wiring & Plugs = $6.00 7) Headband = $1.25 8) Misc = $1.00 Total cost per Headband approximately: $80 each Plus: Charger = $18.00 Decided to only build 3 to stick close to budget.
  • 15. General Construction • See Appendix – Battery Pack – Power Convertor Cable – Headband • ~1 to 2 hours each
  • 16. Software - 1 /************************************************************************/ /* Headband01: LPD8806-based RGB LED Modules in a strip using audio input /* lights up all LEDs in a rainbow of color, with variable brightness /************************************************************************/ #include "LPD8806.h" //the color strip library #include "SPI.h" //the communication library for strip #define NLEDS 20 //Number of RGB LEDs in strand #define AVERAGECOUNT 32 //the number of audio samples to average #define AUDIO 0 //the analog input channel #define OFFSET 255 //the DC offset of the microphone module // Chose 2 pins for output; can be any valid output pins: #define DATAPIN 2 //connect to the Data In pad on the LED strip #define CLOCKPIN 3 //connect to the clock pad on the strip // First parameter is the number of LEDs in the strand. Next two // parameters are SPI data and clock pins: LPD8806 strip = LPD8806(NLEDS, DATAPIN, CLOCKPIN); struct RGB { // a structure to hold the color of a pixel byte r; byte g; byte b; };
  • 17. Software - 2 /************************************************************************/ /* setup: the initialization code - executes once on reset (power up) /************************************************************************/ void setup() { strip.begin(); // Initialize the LED strip strip.show(); // Update the strip; to start they are all 'off' }
  • 18. Software - 3 /************************************************************************/ /* loop: the main program - executes forever /************************************************************************/ void loop() { int audio = 0; // storage for the averaged reading for (int i=0; i < 220; i++){ // get an averaged audio sample from the mic then // draw a rainbow of colors out from the middle rainbowMiddle(NLEDS, averageDetect(AUDIO), i); } for (int i=219; i > 0; i--){ rainbowMiddle(NLEDS, averageDetect(AUDIO), i); } }
  • 19. Software - 4 /************************************************************************/ /* averageDetect: Get the average analog voltage on the analog input pin /************************************************************************/ int averageDetect(int analogIn){ int averageValue = 0; // initialize average value long int sum = 0; // initial register to hold the sum int sensorValue = 0; // analog input sample (A/D= 0 to 1023, 0 - 5V) // read AVERAGECOUNT analog values and find the average for (int i=0; i < AVERAGECOUNT; i++){ // read the analog voltage (range is 0 to 1024) // subtract the DC offset of the module and then sum // the absolute value sensorValue = analogRead(analogIn) - OFFSET; sum = sum + abs(sensorValue); // } averageValue = (sum / AVERAGECOUNT) ; //calculate the average return (averageValue); } 1.25V
  • 20. Software - 5 /************************************************************************/ /* rainbowMiddle: draws lines from the middle of the strip outward /************************************************************************/ int rainbowMiddle(int peak, int brightness, byte shift){ struct RGB color = {0,0,0}; // the color of a single pixel int j = NLEDS / 2; // middle of the strip brightness = 0xFF / brightness; //Color the strip from the middle out to the ends // if the position along the strip is less than the peak, color the pixel // else, turn off all the pixels above the peak value for (int i = 0; i < j; i++){ // going to mirror the colors if (i < peak){ // get the color for this position (input range 0 to 384) color = Wheel((i * 384 / NLEDS + shift) % 384); strip.setPixelColor(j - i-1, color.r / brightness, color.b / brightness, color.g / brightness); strip.setPixelColor(j + i, color.r / brightness, color.b / brightness, color.g / brightness); } else { strip.setPixelColor(j - i-1, 0, 0, 0); strip.setPixelColor(j + i, 0, 0, 0); } } strip.show(); //show the new colors - takes ~ 4.66 msec on the Uno }
  • 21. Software - 6 /************************************************************************/ /* Wheel: Input a value 0 to 384 to get an RGB value from a color wheel /* The colors transition from r > g > b and back to r /************************************************************************/ struct RGB Wheel(uint16_t WheelPos){ struct RGB color = {0,0,0}; // storage to calculate the color switch(WheelPos / 128){ case 0: color.r = 127 - WheelPos % 128; // Red down color.g = WheelPos % 128; // Green up color.b = 0; // Blue off break; case 1: color.g = 127 - WheelPos % 128; // Green down color.b = WheelPos % 128; // Blue up color.r = 0; // Red off break; case 2: color.b = 127 - WheelPos % 128; // Blue down color.r = WheelPos % 128; // Red up color.g = 0; // Green off break; } return color; }
  • 22. DEMO
  • 23. Where Could It Go? • More LEDS!!! • Cheaper, smaller electronics • Cheaper, smaller battery • Washable • Add light modes • Add spectrum analysis • Add light sensor • Bluetooth to phone • Get color data from soundboard • Send individual color data Run Time SizePower
  • 24. Questions? • Thank you for your time!! • Files at: https://www.dropbox.com/sh/kmfop133g57 8815/LjwEI3AlPT
  • 25. Appendix - General Construction • Assemble Battery Pack • Assemble Power Convertor Cable • Assemble Headband
  • 26. Battery Pack – Step 1 • Assembled Battery Pack using (3) 18650 3.7V 2600mAh cells • Built-in over-charge and over-discharge protection circuitry • Comes w/ 6” wires • From All-Battery Center on eBay • Roughly $30 each
  • 27. Battery Pack – Step 2 • Solder Deans-style to the battery wires • Use Female socket for battery • Note polarity! • Be careful not to short battery wires when soldering • Use shrink tubing to protect against accidental shorts
  • 28. Battery Pack – Step 3 • Finished Battery Pack • Charge with compatible charger – eBay: Tenergy TLP-2000 Li-Ion Charger – Solder Male Deans Plug to Charger output leads
  • 29. Power Converter Cable • Converts Battery voltage to 5V Battery Input 5V Plug To Headband DC-DC Converter Module 3 Foot Cable
  • 30. Power Converter Cable – Step 1 • Buy a 1-meter 5.5mm/2.1mm Male-Female Power Cable and cut into two sections – Female socket side = appr. 6 inches – Male plug side = remaining length – appr 3 feet 5V Plug From Power Converter 5V Socket From Headband
  • 31. Power Converter Cable – Step 2 • Solder 6-inch 22AWG Red/Black wires to input side of the module • Solder the 3-foot Male Power Cable to the output side – Note the color and polarity of the internal wires • Adjust trimpot to get 5V on the output
  • 32. Power Converter Cable – Step 3 • Solder Red/Black wires from input side to Male Deans Plug • Be sure to use Shrink tubing • Note polarity Battery Power Converter
  • 33. Power Converter Cable – Step 4 • Fold both wires back roughly 0.5 inches from the module edge • Secure with tie-wraps to form strain reliefs • Secure cables to module with tie wrap
  • 34. Power Converter Cable – Step 5 • Use 1.0-inch to 1.25-inch Shrink tubing over the entire module • Slightly heat the ends of the tubing and pull tight with tie-wraps
  • 36. Headband – Step 1 • Cut the LPD8809 strip to 20 LEDs • Cut along the lines • Note the direction of the arrows – indicates which is the “input” end
  • 37. Headband – Step 2 • Solder Data (DAI) and Clock (CLK) lines to thin flexible wires (26 – 32 AWG) roughly 3-inches • Solder heavier gauge wire to 5V and GND (22 AWG)
  • 38. Headband – Step 3 • Solder Data to I/O-2 on the Arduino • Solder Clock to I/O-3 on the Arduino • Solder Red 5V wire to the Arduino 5V pin • Solder Black GND to the GND on the Arduino • Secure wiring with tie-wrap
  • 39. Headband – Step 4 • Solder the 6-inch Female Power cable to the Arduino’s 5V and GND – confirm polarity! • Solder 22AWG wires from Arduino to the Microphone Module – Blue = Mic-OUT to Arduino A0 (Analog 0) – Black = GND – Red = 5V • Use tie-wrap
  • 40. Headband – Step 5 • Wiring complete! • Inspect solder joints • Confirm connections with ohmmeter before applying power • Confirm everything with test code! Note: picture shows older microphone module
  • 41. Headband – Step 6 • Adjust the Microphone Gain to lowest level • Solder a short jumper from Gain to Vdd
  • 42. Headband – Step 7 • Hot Melt Glue can be used to secure wiring
  • 43. Headband – Step 8 • Create supporting plastic band from available material • 1” x 19.5” Thin plastic • Must be flexible
  • 44. Headband - Step 9 • Attach one side of self-adhesive Velcro to back • Trim other end to aid in threading into headband
  • 45. Headband - Step 10 • Tape LED Strip to plastic support strip • Don’t block LEDs
  • 46. Headband – Step 11 • Tape Arduino a bit more securely to protect wiring Note: picture shows older microphone module
  • 47. Headband – Step 12 • If there is a logo – twist the Cotton headband around so the outside is plain • Cut a 1” slot in the headband • Attached the other side of self-adhesive Velcro to the inside of the headband on either side of the slot • Carefully thread the assembly into the headband
  • 48. Headband – Step 14 • Attach half of the Velcro on the module to one side of the slot in the headband • Route the power cable out the slot • Insert the rest of the module on the inside of the headband
  • 49. Headband – Step 15 • Finished installation of the electronics in the headband
  • 50. Headband – Step 16 • Done!