wearable UV Index & weather sensor

Similar projects worth following
Keychain sized UV and environmental sensor

The aim... to build a small, wearable instrument to check UV index, air temperature, humidity and air pressure.

Why is it important? (the problem description)

Natural sunlight contains UV rays, they are important for life (e.g. body's vitamin D production)

However, too much UV exposure can cause serious health problems, so you have to achieve the optimal UV dose for your body.

On the other hand, tracking and predicting weather changes has been desired by people for a long time. The basis of weather observation is still the measuring and recording of barometric air pressure, temperature and relative humidity.

Use cases

Avoid Sunburn

On the one hand you can check the current UV index, on the other hand you can keep track of the accumulated UV exposure checking the "UV index hour" value, which correlates with the UV erytherma dose.

By monitoring the UV index and the total UV exposure you can protect yourself in time (e.g. by applying sunblock, using some shading...)

Predict weather changes or storms

The rule of thumb is, when the pressure is stationary or slowly rising, you can expect nice weather. Falling pressure is followed by bad weather, and quickly falling pressure usually means that a storm is coming.

Estimate elevation

Atmospheric pressure changes ~12 mBar / 100m. By reading the pressure difference, you can easily calculate the altitude change.

Indoor humidity control

Too low or high humidity can be uncomfortable, check the indoor humidity then turn on the humidifier if it's too low, or if it's too high you can decrease it by airing the room or turning on the air conditioner.

Observe the trend in the changes of the values

The observation of the changes in the environmental characteristics can also be meaningful.

UV Index and sunburn...

Check out this project log for calculation details.

System Design Diagramm

System design document

Technical features

Atmel AVR ATTiny for reading the sensors and displaying the data.

Pico-power design, to extend battery life.

Custom 3D printed case

Lightweight: 11g

Dimensions: 50mm * 32mm * 8.1 mm

Read the story about the re-design reasons in this project log

Finals video

Semifinals video (the details)

Quarterfinals video (the development process)

Bonus Features:

Altimeter -

Arcade game -


UV-badge device is licensed under the GNU General Public License v3.0.

  • 1 × Sharp Memory LCD 128px * 128px - monochrome
  • 1 × ATMEL ATtiny861A picopower risc cpu
  • 1 × CR2016 coin cell
  • 1 × some resistors & cap's
  • 1 × BME280 enviromental sensor

View all 7 components

  • Low power challenge

    x-labz02/01/2023 at 21:08 0 comments

    Some information for the low power challenge:

    According to the past years experiences, the device is capable to run for more then 1.5 YEARS (!) on a CR2016 coin cell battery!  It's half size of the most common cr2032

    Don't forget, that the device takes environmental measurement in every 15 min, however the display operates only on user interaction.

  • SALE! - last two pieces

    x-labz08/09/2016 at 07:58 2 comments

    You can buy the last sample pieces for $55 / item. (postage included)

    The adapter clip for the in-system-programmer will be $10 / piece. The adapters will be shipped few weeks later, because those are out of "stock".


    - temperature measurement: °C / °F

    - barometric pressure: mBar

    - altimeter: meter / feet ( you can zero the altitude value, and the device will show you the difference when you eg. climb a hill, or go up to a skyscreeper)

    - UV index

    - the device takes a measurement in every 2 sec when in active mode, after 30 s left unattended falls to sleep, but takes measurement in every 30 min. so you can have an ~12 hour chart of measure data.

    The "UV index hour" ( UVIh - the accumulated or summed UV index) was removed, because after some experiments I found it quite useless (the device should face very precisely directly towards the sun for hours to get acceptable result)

    Anyway you can measure the actual UV index by turning the sensor directly in the sun direction.

    Short VIDEO of the current firmware in action:

  • V4.0 firmware published

    x-labz06/06/2016 at 19:23 0 comments

    Check out the latest firmware on github:

  • Updated User's guide

    x-labz06/06/2016 at 15:16 0 comments
  • Extending battery life

    x-labz10/29/2015 at 19:56 0 comments

    With the new improved battery management feature the device enters 'sleepwalking' mode after 30 sec. In the sleepwalking mode the display is not refreshed but the data is still acquired for the log.

    Let's compare the operation modes:

    Measurement rateevery 2 secevery 512 sec
    Display refreshevery 2 secno refresh

  • Altimeter

    x-labz09/14/2015 at 16:21 0 comments

    With this custom firmware the UV-badge sensor hardware can be used as a precision ALTIMETER!

    Check out the elevator test:

  • New function - imperial units!

    x-labz08/27/2015 at 08:12 0 comments

    The new v2.1 firmware implements the unit change function. Using the left-hand button, you can change the temperature unit from °C to °F, and back.

    The barometric pressure can be displayed in mBar and mmHg as well.

  • Bonus feature - games!

    x-labz08/23/2015 at 20:10 0 comments

    Play arcade game on the UV-badge hardware!

    ~20 FPS @ 8 MHz.

    Only 6.5 KB ROM and 145 B RAM is required.

    ...and remember, there is no frame-buffer! The application generates the picture line-by-line for every frame. The CPU can't store the whole picture in it's small RAM, and the LCD is "write only'' , you can't read the data back!

  • Samples are ready to ship!

    x-labz08/09/2015 at 13:55 4 comments

    The sample devices for the 'best product' category are fully assembled. They will be shipped with UPS.

  • Sample circuits

    x-labz07/29/2015 at 19:34 0 comments

    The sample devices are ready for #bestproduct prize. The 3D printed cases are still in production.

View all 22 project logs

  • 1
    Step 1

    Order the components

    Order the components listed in the BOM (bill of materials)

    BOM link

    Additionally you will need some more components for the programming adapter:

    Mouser ID

  • 2
    Step 2


    Order the PCB for the main circuit and for the programming adapter; don’t forget, that they should be 0.5 mm thick! Otherwise it will not fit in the case.

    Design Files

    Programming adapter

    Design file

  • 3
    Step 3


    Get the case and the programing adapter clip 3D printed. For the best result use SLS technology, e.g. “Strong and flexible” nylon material at

    Design Files

    The parts of the case are connected with thin plastic strings, separate them using a sharp knife or scalpel.

    3D printed programming adapter clip

    Design file

View all 15 instructions

Enjoy this project?



yOyOeK1 wrote 02/02/2023 at 00:17 point


  Are you sure? yes | no

hvktqstuan93th wrote 12/30/2016 at 03:43 point

why did you choose that is not ATMEL ATtiny861A other microcontroller? thank you :))))

  Are you sure? yes | no

x-labz wrote 12/30/2016 at 09:11 point


It seemed to be a good choice... One important feature is the Pico Power thing. 

  Are you sure? yes | no

hackaday wrote 08/10/2015 at 12:44 point

Nice project. I did something similar using the SI1132 sensor and buttons and beeps only for the interface. I wasn't happy, though, that the sensor could be fooled by artificial light or window light.

I'm glad I saw this as I was not aware of the ML8511. I'm testing the GUVA-S12SD breakout from Adafruit but it's not a part you can buy from Digikey or Mouser yet, while the ML8511 can.

  Are you sure? yes | no

x-labz wrote 08/10/2015 at 13:03 point

Hi, I agree with You. The Silabs UV sensors 'only' estimate the UV index by measuring the ambient light intensity. The ML8511 measures in the UV spectral range, so in cloudy weather should be more accurate.

  Are you sure? yes | no

mr.jb wrote 08/01/2015 at 10:44 point

This display might be a cheap alternative....

  Are you sure? yes | no

x-labz wrote 08/02/2015 at 19:29 point


thanks, cool! but don't forget, the sharp memory lcd has uniquely low power consumption! (max 40 uA)

  Are you sure? yes | no

mr.jb wrote 08/02/2015 at 20:21 point

How much RAM does it need ?

Have you released any code ?

  Are you sure? yes | no

hackaday wrote 08/10/2015 at 12:36 point

Nice. I was looking for something like that which was 3.3v and sunlight readable. I have a bunch of Nokia 5511 displays but they all seem to suffer from some kind of display rot.

  Are you sure? yes | no

icewalker wrote 07/14/2015 at 18:03 point

Very nice project, do you plan to release some more technical info like open source code and schematics? That would be nice... just wondering, I wish you a lot of success!!!

  Are you sure? yes | no

x-labz wrote 07/14/2015 at 18:26 point

Yes, definitely! stay tuned on twitter:  

  Are you sure? yes | no

icewalker wrote 07/14/2015 at 18:38 point

definitely cool, that's a real spirit!

I checked the twitter link (I must admit I am not so familiar with this technology, but just created an account and you have a follower) and the photo are impressive, I am looking forward to it...

  Are you sure? yes | no

Darren Enns wrote 07/08/2015 at 22:33 point

Cool!  I am very new to 'Hackaday'.  Do people who invent clever projects like this typically offer them for sale when they are complete i.e. are you planning to do so?

  Are you sure? yes | no

x-labz wrote 07/09/2015 at 08:43 point


depends on the proposal.  :-)

  Are you sure? yes | no

MicroPrototype & Design wrote 05/02/2015 at 23:35 point

Do you have a link for this display ?

Data Sheet and price.


  Are you sure? yes | no

j0z0r pwn4tr0n wrote 05/03/2015 at 00:56 point

It's forty dollars here, library provided. Google "Sharp memory display" and maybe you can find a more viable bulk supplier if you're looking for something to go in an end product. 

  Are you sure? yes | no

MicroPrototype & Design wrote 05/03/2015 at 01:30 point

Must be a typo, the display is 96x96 pixels   :-)

  Are you sure? yes | no

j0z0r pwn4tr0n wrote 05/03/2015 at 03:01 point

Ahhh, I copied and pasted without even really thinking, lol.

Here's the link to the 128x128 version. $18 for one, although I think it is just bare screen and ribbon cable. 

  Are you sure? yes | no

MicroPrototype & Design wrote 05/03/2015 at 14:37 point

Yes, Thank You. This is just what I have been looking for.

  Are you sure? yes | no

ch.dugasduvillard wrote 04/27/2015 at 10:01 point

What sensor do you used for the touch button ?

  Are you sure? yes | no

x-labz wrote 04/27/2015 at 13:12 point

analog input of the controller, but I plan to remove it from the design in the next version. I'll use a tactile switch, because power consumption reasons.

  Are you sure? yes | no

gmwatbot wrote 03/30/2015 at 21:52 point

Just brilliant. Any data logging on board?

A spin off from this board might be something I'm dying for:

  Are you sure? yes | no

x-labz wrote 03/31/2015 at 04:41 point

the measurements planned to be stored in every 30 minutes, keeping a whole day log, just to be able to see the trend

  Are you sure? yes | no

x-labz wrote 03/25/2015 at 07:14 point

Good idea! The bosch sensor just simply didn't come across.  :-) 

  Are you sure? yes | no

Will Rea wrote 03/24/2015 at 22:25 point

Just wondering what made you going with the lps25hb and si7020 and not something like the bme280?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates