Help making a wearable with ATTiny85, WS2812 and Si7021

I am sure most of you would have guessed most of the project already. I want the change the color of the LEDs with respect to readings from the sensor. I want this project to be very small. It needs to fit inside a 40mm40mm10mm enclosure. Im using the following:

  • Digispark attiny85 (clone)
  • 500mAh Li-ion battery
  • BMP280+Si7021 Sensor
  • WS2812 7 Bit

This is a wearable project so battery life is critical. I am thinking of using the Watchdog Timer in the attiny85 to pulse the LEDs for 10 seconds every minute. So the ATtiny will be in sleep mode for 50 seconds, then turn on, check values, pulse LEDs and go back to sleep again.

There are a few concerns for which I need some help:

  • The WS2812 modules are 5V modules, and the Attiny85 board has a 5V output. However, I will be powering it using a 3.7V li-ion battery, and the datasheet states that the digital output of the board is -0.5v to +0.5v of the Vcc. Meaning the data pin of the WS2812 will get 4.xxV while Vcc pins will get 5V. How would that work?
  • The datasheet of the WS2812 states that RGB channels each consume 20mA on each LED. So does that mean for a 7 bit module, the max power consumption will be 420mA?? :o
  • How accurate is the temperature sensing on the BMP280? I know the Si7021 is pretty accurate, and I've considered a module with both chips because it works out only marginally more than indivduals and adds a lot more to the project. However, if the BMP280 itself can be an accurate measuring device then I'll drop the Si7021 and save some more.

Bump?

Can you provide a little more information, like maybe links to the component boards you want to use, and perhaps a diagram of how you want to hook it up? And do you have any wdt code in mind?

ChrisTenone:
Can you provide a little more information, like maybe links to the component boards you want to use, and perhaps a diagram of how you want to hook it up? And do you have any wdt code in mind?

Sure, I thought its too early to get into the execution phase to list the modules, anyway heres what I plan to use:

Ive already bought the Attiny85 board, the battery and currently testing using a DHT11 sensor.

Ive got a code in mind already, I am fairly capable of coding it the way I want it to. However its the electronics part that is a bit challenging for me.

The GY-21P is a 3.3v sensor so I am planning to power it directly from the 3.7V battery. While the WS2812 is a 5V board so will be powered by the 5v on the digispark board.

The on board voltage regulator can only reduce the Vin voltage, from 7-15V to 5V. 3.7V will stay 3.7V on the 5V output. Even if you use 2 batteries for 7.4V Vin, the regulated 5V output current will be less than the LED strip will consume.

Are you boosting the battery for 5 v, or what?

If your lights are really drawing half an amp, a 500mah lipo seems kinda peaked.

DrDiettrich:
The on board voltage regulator can only reduce the Vin voltage, from 7-15V to 5V. 3.7V will stay 3.7V on the 5V output. Even if you use 2 batteries for 7.4V Vin, the regulated 5V output current will be less than the LED strip will consume.

I did not consider that!

I was planning on attaching a lipo charge controller to the back of the battery directly coz its small and it would be convenient to have a standard charging jack on board. Now I'll have to look for a 3.7v to 5V step up module+charge controller, which is small enough to be included in this project. Then I can connect the LEDs directly from the power module and not worry about current draw?

ChrisTenone:
Are you boosting the battery for 5 v, or what?

If your lights are really drawing half an amp, a 500mah lipo seems kinda peaked.

Actually upon more research it became quite clear that its 420mA MAX draw, i.e. RGB channels on All LEDs running at MAX brightness. However, I wont be doing that. These LEDs are so bright that even if they run at 50% brightness that is the max our eyes can perceive directly, anything more is only marginally brighter. Also I'll rarely be running more than one channel at any time, or all 7 LEDs together. I hope to get the final current draw at around 60mA, that too will be flashing for like 5 seconds a minute.

Bump?

No question - no answer :wink:

DrDiettrich:
No question - no answer :wink:

ashwin1224:
How accurate is the temperature sensing on the BMP280? I know the Si7021 is pretty accurate, and I've considered a module with both chips because it works out only marginally more than indivduals and adds a lot more to the project. However, if the BMP280 itself can be an accurate measuring device then I'll drop the Si7021 and save some more.

ashwin1224:
I was planning on attaching a lipo charge controller to the back of the battery directly coz its small and it would be convenient to have a standard charging jack on board. Now I'll have to look for a 3.7v to 5V step up module+charge controller, which is small enough to be included in this project. Then I can connect the LEDs directly from the power module and not worry about current draw?

There still are questions on here ::slight_smile:

I've no experience with such devices, cannot assist you :frowning:

So I went ahead and ordered a 7bit WS2812 module. Turns out these modules can easily run off a 3.7v power supply. The "5v" pin on the board can accept voltages from 1.8v to 6V, the same will be forwarded to the digital ports. Only if the voltage is more than 6V do you need to use the Vin pin, which will step it down to 5v and make that available to the I/O ports. Might be common knowledge but I did not know this lol