Problem powering Flora and Neopixel Ring

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

Hello, I'm trying to power up a Flora and a 16 led Neopixel ring, with a lipo battery, 3.7v 1000 mAh.
When i touch the copper plate it supposed to turn the ring on with red, and then turn off when no touching anything. It works just fine when the ring and the flora are powered with an usb (one for each) but when I change the flora to be powered with the battery, and touch the copper, the ring goes crazy, flickers in every color and it's a mess. If I power the ring with the battery and the flora via usb, the ring just doesn't light. If I try to power both with the battery it just does nothing, lol. I tried putting a step up between the battery and the flora or ring but it's the same. Help.
Attachments
Untitled-1.jpg
Untitled-1.jpg (750.88 KiB) Viewed 123 times

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Problem powering Flora and Neopixel Ring

Post by dastels »

I assume you want this wearable and battery powered. It would help if you posted your code. Without seeing it, all that comes to mind is that I'd try powering the ring with the 3.3v output from the Flora. The catch is that that can only provide 250mA (less what the flora needs). 16 NeoPixels set yo full brightness red needs 320mA. So if you drop the brightness it will use less. Half brightness would be good. That's usually not a big problem as NeoPixels are really bright.

Dave

User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Re: Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

This is my horrible code(?)

Code: Select all

#include <Adafruit_NeoPixel.h>
#include <CapacitiveSensor.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define PIN    6
#define NUMPIXELS 16


CapacitiveSensor   cs_9_10 = CapacitiveSensor(9,10);        // 10M 
Adafruit_NeoPixel strip(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);


void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  cs_9_10.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
   Serial.begin(9600);
}

void loop() {
  
  long start = millis();
  long total1 =  cs_9_10.capacitiveSensor(30);
  if (total1 > 4000){ 
  strip.setPixelColor(0, 255, 0, 0);
  strip.setPixelColor(1, 255, 0, 0);
  strip.setPixelColor(2, 255, 0, 0);
  strip.setPixelColor(3, 255, 0, 0);
  strip.setPixelColor(4, 255, 0, 0);
  strip.setPixelColor(5, 255, 0, 0);
  strip.setPixelColor(6, 255, 0, 0);
  strip.setPixelColor(7, 255, 0, 0);
  strip.setPixelColor(8, 255, 0, 0);
  strip.setPixelColor(9, 255, 0, 0);
  strip.setPixelColor(10, 255, 0, 0);
  strip.setPixelColor(11, 255, 0, 0);
  strip.setPixelColor(12, 255, 0, 0);
  strip.setPixelColor(13, 255, 0, 0);
  strip.setPixelColor(14, 255, 0, 0);
  strip.setPixelColor(15, 255, 0, 0);
  
  strip.show();
  }
  else {
  strip.clear();
  strip.show();
  }
}
As I said, it works very well when both are powered from usb cables...

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Problem powering Flora and Neopixel Ring

Post by dastels »

A couple things.

You can use

Code: Select all

strip.fill(strip.Color(255, 0, 0))
but you should try a lower brightness of red, e.g.

Code: Select all

strip.fill(strip.Color(128, 0, 0))
I would also add a capacitor as described in the NeoPixel guide: https://learn.adafruit.com/adafruit-neopixel-uberguide, specifically
Before connecting NeoPixels to any large power source (DC “wall wart” or even a large battery), add a capacitor (500–1000 µF at 6.3V or higher) across the + and – terminals as shown above. The capacitor buffers sudden changes in the current drawn by the strip.
Dave

User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Re: Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

Well, now it works, but... instead of lighting up when touching the copper plate, it work when i touch the battery... ???? USB keeps working fine with both plugged on usb...

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Problem powering Flora and Neopixel Ring

Post by dastels »

Huh. Maybe try a long wire to the sensor so your hand isn;'t too near the Flora.

Dave

User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Re: Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

Its a 1 meter wire lol and yes, it's weird whats happening...

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Problem powering Flora and Neopixel Ring

Post by dastels »

Is it shielded/twisted pair. You want the pad to act as the antenna, not the entire length of the wire.

Dave

User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Re: Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

It's not shielded, but I don't think it matters cuz it works fine when using usb as power source :S ??

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Problem powering Flora and Neopixel Ring

Post by dastels »

Hmm. As a work around, would powering from a USB powerbank work?

Dave

User avatar
Vulkan52
 
Posts: 13
Joined: Thu May 05, 2022 1:01 pm

Re: Problem powering Flora and Neopixel Ring

Post by Vulkan52 »

mmm I don't have one, I would ask a friend is they have one and see what's up.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”