Académique Documents
Professionnel Documents
Culture Documents
Table of Contents
step 1: FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
step 2: Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
License: Public Domain Dedication (pd)
Continue to the next page and I'll answer a few questions and show you how to make it
step 1: FAQ
How does it work?
Skin type and sunscreen are easy - Mr. Burns just asks you to provide that information. Measuring Ultraviolet radiation is complex;
Initially, I went to the usual sources to get a UV sensor, but I found out they were very expensive ($20 - $30). If you take a regular LED and invert it (so the anode is
connected to ground), it will generate a very weak voltage in response to light, but you need an op-amp circuit to amplify the voltage & I wanted something simpler.
Finally, I came across this whitepaper from Mitsubishi - they had the problem of sensing when to turn on the light in your remote control; a capacitive sensor would turn it
on when it's not needed and waste power. They figured out a way to sense light using the backlight LED itself - and that's what Mr. Burns is based on.
When you use an LED as a photodiode, it's sensitive to wavelengths equal to it's output color and shorter. By using a blue LED that generates light at 415nm, it's a
perfect fit for sensing UVA, and it's cheap (<$1)
Once Mr. Burns has skin tone, UV level, and sunscreen info, it uses WHO data (pdf) to determine how long until you get a sunburn.
Here's a walkthrough of how it works. Note that I'm using a Propeller Platform SD and LCD UI module, but this instructable will also show you how to do it on a
breadboard.
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
How Accurate is it?
The sensor picks up the UVA and measures it correctly. Exposure calculations are based on WHO research, too. It's pretty accurate, the most likely cause of error is
sunscreen;
Most people don't put on enough sunscreen - you're supposed to put on 1mg/cm 2 , which means about an ounce to cover an adult male. You're also supposed to re-
apply every 2 hours. If you do this correctly, you're fine, but otherwise, you should under-estimate the SPF of your sunscreen.
Also, Mr. Burns measures incident UVA at the beginning of the exposure, but it doesn't re-adjust if UV changes. The literature isn't clear as to whether your skin is
equally sensitive throughout the exposure. It's easy to implement, though - and if I find evidence that it is, I'll update the code.
It's a Parallax Propeller running at 80Mhz connected to an HD44780 8x2 character LCD (4-bit interface). The Propeller stores the exposure table in RAM and measures
incident UV through an R/C decay circuit.
step 2: Materials
I built mine with a Propeller Platform SD and an LCD UI module. If you've got those, then the only thing you'll need is blue LED and 22pF Cap. Download the file on step
9 to your SD card, attach the LED & Cap, and you're ready to go.
But I'll also show you how to build Mr. Burns on a breadboard - and here's what you'll need for that;
Code
Here's the sourcecode. Everything is available under the MIT license.
Parallax Propeller
Available at Parallax
5Mhz Crystal
Available at Parallax
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
32kb EEPROM
Mouser Part #579-24LC256-I/P
Blue LED
Mouser Part 859-LTL42UB6N
5x Tactile Switches
Mouser Part #653-B3F-1000
A Prop Plug
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
step 4: Make it: Power and Propeller
Add the voltage regulator and bypass caps as shown on the image below. Also, add the battery box, connecting the black wire to the negative rail, and the red wire to the
input on the regulator.
I've also added pull up resistors in the picture, that's for the EEPROM I'll add in the next step.
Your basic Propeller setup is now complete. Plug your Prop Plug into the headers, connect the usb cable and fire up the Propeller Tool. Hit F7 and make sure you can
communicate with the Prop
The crystal goes on the pins marked Xo and Xi. No need for caps on the crystal.
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
step 7: Make it: UI and Sensor
Add the buttons, as shown on the schematic. You'll need 4 buttons;
1. Left
2. Right
3. Enter
4. Begin Exposure
If you edit the code, you can get away with less, although it's nice to have the additional inputs. I've breadboarded 2 buttons below.
Also add the LED and cap. This is your UV sensor portion of the circuit. The longer lead on the LED goes to the negative rail, the shorter lead connects to P7.
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
step 8: Make it: Programming
Once you've got everything wired up, download the sourcecode (here), connect your Prop Plug and program the Propeller.
3 - You don't need a Prop Plug. The Propeller Platform SD has a bootloader, so you just unzip this file and copy to the root of your SD Card.
4 - You'll need to add a blue LED and a 22pf Cap. You can get the Blue LED right here, the battery pack is here. The long lead from the LED goes to ground, the short
lead goes through the hole marked P7. Connect the cap on the other side of the board to the same holes - doesn't matter which lead goes to which hole.
Related Instructables
Propeller
Muzak Propeller Platform (video) The LCD UI El Jugador:
Visualizer by Platform by by nmcclana Module by Retro DIY Game
Propeller
nmcclana nmcclana Platform Battery The single most nmcclana Console by Lycra Sun Mask
Pack by effective way to / Hood by
get rid of a nmcclana
nmcclana TimAnderson
sunburn by
drpepper8412
http://www.instructables.com/id/Build-a-Sunburn-Alarm/
Advertisements
Comments
9 comments Add Comment
http://www.instructables.com/id/Build-a-Sunburn-Alarm/