Don't like ads? Help support the Mercs by becoming a Supporter or Auxiliary Member today!
Official Members also get to use the forum ad-free - so kit up and join us!

 Helmet LED's - Need help

  • 9 Replies
  • 1752 Views

Coenn Jeenx


    *
  • *
  • 173
  • Awards Celebration Chicago
Helmet LED's - Need help
« on: Jun 20, 2019, 07:19 PM »
To start off - I am a Mechanical Engineer but know only enough about electronics to be dangerous. I am working on a new helmet and want to add some nice slowly flashing LED's...sort of a breathing effect. I saw a post from Mandalore about a premade frequency generator chip that I bought for a few bucks and some cheap LED strands. Got the strands and connected my Power bank only to find out the voltage provided was a bit too low for the lights. No worries I though - found a small voltage boost chip for a few bucks that works great. 5 VDC in and 10-12 VDC out. Lights work great on constantly. Added an on/off switch - still works great. Finally get my Ne555 chip in the mail and connect the circuit only to nearly have a seizure. The flashing was insanely fast. Tried adjusting the knob on the chip to some improvement but even at the slowest I can make it, it is really fast.

I have tried to connect the Ne555 both before and after the voltage booster, both ways produce the same result - flashing but way too fast. I even tried taking the voltage booster out of the mix and using a 9vdc battery, but that had the same result - seizure inducing flashes.

I need help figuring out what I am doing wrong. Did I buy the wrong thing? Am I missing a resistor or something to slow it down? I am providing links to the two chips I bought below.

https://www.amazon.com/gp/product/B06XHJ13RY/ref=ppx_yo_dt_b_asin_image_o01_s00?ie=UTF8&psc=1

https://www.amazon.com/gp/product/B07MTZB2GD/ref=ppx_yo_dt_b_asin_image_o02_s00?ie=UTF8&psc=1

Any assistance would be greatly appreciated!

Logged
OM#2100
"I reject your reality and substitute my own."
Adam Savage

Fi-8015


    *
  • *
  • *
  • 2923
  • Awards 40% increase or more Award for 10 official invasions.
Re: Helmet LED's - Need help
« Reply #1 on: Jun 21, 2019, 06:11 AM »
Hi, what kind of LED are you using? 5V is far more than most LEDs need.
The comments on Amazon say the minimum frequency of your module is 15 Hz, I guess that's the problem. A LED flashing fifteen times a second is far away from "nice slowly flashing", I guess. The only way to slow it down further is replacing the components.
I found an online tool to calculate the needed values: http://www.ohmslawcalculator.com/555-astable-calculator

But I fear it might be easier to build a circuit according to your desired flashing rates instead of modifying the module.

Logged
Helmets for Sale in the Trading Station

electriFi - Mando Electronics English / German

Coenn Jeenx


    *
  • *
  • 173
  • Awards Celebration Chicago
Re: Helmet LED's - Need help
« Reply #2 on: Jun 23, 2019, 08:54 PM »
I was trying to avoid using an arduino but after trying a few things  I decided just to give it a whirl with a nano board and it was super easy so I am baggin the frequency chip and just going with the Nano and the voltage booster. The LED strands I bought say "12 VDC" and anything below 6 VDC or so they are either so weak you can't see them or they flutter on and off. I output the voltage from the Nano (5 VDC) thru the booster and the LEDs work fine. The breathing effect I was looking for isn't quite as smooth as I wanted because of that but I think it looks pretty good. I am going to keep thinking about it and tinkering with different things I find while I keep working on painting my helmet. Maybe I can figure out something a little better by the time I finish the paint.

Logged
OM#2100
"I reject your reality and substitute my own."
Adam Savage
Re: Helmet LED's - Need help
« Reply #3 on: Jun 25, 2019, 01:41 AM »
Glad you got it sorted out!

The premade 555 circuit looks okay, but that'll only output an on/off pulse and might be stuck at higher frequencies. For a slower flash you might need to adjust some components. Not too hard, but if your nano works that's awesome! As for the breathing / pulsing effect, LEDs aren't easily dimmable my varying voltage, the easiest method is Pulse Width Modulation, which your Arduino can handle natively!

You can use analogWrite() in a loop to ramp up the PWM frequency to fade in, hold at 255 (max), then fade out. Driving the actual LEDs seems to be some trouble here. Fi-8015 is correct in that most LEDs should be fine on 5v (in fact, most have an "on" voltage around 1.5-3v), so your LED strip is probably stepping down the input voltage to make it run on standard 12v (which is easily available in cars and computers and such). Since stepping up to step down is a small current waste, you might be able to modify the LED strip to run on 5v again, then you just need to use a transistor on the output pin of your Nano to drive the LEDs.

When you're ready to pick this up again, could you share some images of your LED strip? Anything that looks like an electronic circuit would be handy. Hopefully, there's an obvious step-down section at the start of the strip that you can desolder and bypass, and replace with a transistor, a couple resistors, and have some fun breathing LEDs!

[Edit: The roughness you are seeing on the LEDs currently is probably caused by the booster not keeping up with the switching frequency of the Arduino's output, if you're dimming using the PWM pins. It could also be that the arduino has a limited current output (~30mA  usually), so if you're going direct from Nano to the power boost you may be exceeding the rated output. Power boost circuits have an inductor that boosts the power by rapidly switching themselves, which results in a step-like ramping of output power. If you're dimming the input power to the boost, the output will be very jagged looking.

[A quicker solution that might produce results is to add a transistor after the power boost to switch the current, leaving the boost constantly running so it can have time to stabilize. This should clean up the dimming, in theory, but your LED strip may have its own madness going on.]

« Last Edit: Jun 25, 2019, 01:49 AM by MauAbata » Logged

LightningLion


    *
  • 159
  • Electronics are my thing
Re: Helmet LED's - Need help
« Reply #4 on: Jul 05, 2019, 03:31 AM »

While we wait for more info on your LED stripe, this is a very very rough idea of what you could do:
-You carry the power (batteries) to the power booster so it's constantly on and working.
-The PWM pin of the Arduino goes to a transistor that opens/closes the power feeding from booster to LED stripe.

That way you amplify the Arduino's 5V PWM to a 12V PWM signal. There are probably better ways to do it tho.
Then you have to loop the analogWrite() from 50 to 100% (128 - 255) and 100% back to 50% (or other values you're comfortable with).

Another option to consider for future projects are the ws2812b (Adafruit's NeoPixels) which are very easy to program effects for, as you can directly set the colours and brightness via commands.

Logged
Lion's electronics corner

Rionu Custom Electronics for your Mandos
--->> Sales thread

WIPs: Nite Owl helmet. Modern era helmet.

Mundo Airsofter - Airsoft news & reviews

Coenn Jeenx


    *
  • *
  • 173
  • Awards Celebration Chicago
Re: Helmet LED's - Need help
« Reply #5 on: Jul 05, 2019, 06:43 AM »
These are the lights I bought. Right now, I am not using a transistor but just running from my nano to the boost to the lights and though the fade effect is a bit “rough “ I think I will leave it for now. I will try to get a short video and see if I can post it later today.

Zento Deals 8 Packs of Trimmable... https://www.amazon.com/dp/B0711QZNB9?ref=ppx_pop_mob_ap_share

Logged
OM#2100
"I reject your reality and substitute my own."
Adam Savage
Re: Helmet LED's - Need help
« Reply #6 on: Jul 11, 2019, 07:52 PM »
These are the lights I bought. Right now, I am not using a transistor but just running from my nano to the boost to the lights and though the fade effect is a bit “rough “ I think I will leave it for now. I will try to get a short video and see if I can post it later today.

Zento Deals 8 Packs of Trimmable... https://www.amazon.com/dp/B0711QZNB9?ref=ppx_pop_mob_ap_share

That's a pretty simple LED strip actually. The concern here is the current flow through the PWM pin. Arduino pins aren't rated for very high current, and a 12v strip coming off a boost is probably pulling a lot. I hooked up a simulation here of your setup, and couldn't go over 75% (128 + 64) on the PWM pin or my chip became unstable (ATMega 328P, so... Arduino Uno-ish).

For the curious minds, here's a view of what's going on when driving a DC-DC boost circuit off a PWM pin:



The pink line is the output from the Arduino's PWM pin, cycling from ~0.5% to 75%. The Green line is the output of the DC-DC boost. For the most part, it actually seems pretty smooth, but the boost converter is smoothing off the PWM signal. LEDs don't usually dim based on voltage, they're *kind of* an on/off thing, so to "dim" you'd want to preserve the square wave coming from the PWM pin, otherwise they'd cut out at a certain voltage. This is essentially what the transistor is doing, and it allows the boost converter to keep a steady voltage (you can see here the green line is ramping up on each cycle of the pink.) Hm. I might dig up a mosfet and measure that.

Ultimately: Do what works, don't kill your nano!

Logged

Coenn Jeenx


    *
  • *
  • 173
  • Awards Celebration Chicago
Re: Helmet LED's - Need help
« Reply #7 on: Jul 13, 2019, 09:33 PM »
Thanks for the feedback, but in all honesty I do not really understand much of what you wrote. I understand you are saying my setup is likely drawing too much power from my nano pin but I am not sure what that really means. My plan to counteract my ignorance is to finish my setup and let it run for a long time and monitor the nano - see how hot it gets, see how long the battery lasts, etc. all before I stuff that all in my bucket with my head. I also plan on adding a nice on/off switch so that I could turn them off if necessary.
     Is there something I should put in my circuit between the boost and nano PWM pin? I thought about a transistor based on something else I read - but have no real idea of what to put in there let alone why.

Logged
OM#2100
"I reject your reality and substitute my own."
Adam Savage
Re: Helmet LED's - Need help
« Reply #8 on: Jul 17, 2019, 08:19 PM »
Transistors are essentially a switch. If you put power on one pin, current can flow through the other two pins. Your boost converter needs a little time to "warm up", it's not very long, but the input to the boost should be constant and come directly from your power source. The output is then fed directly to the + side of your LED strip, and the - side is switched by the transistor.

As for current draw on the Arduino, most are rated for ~40 milliamps, which is about enough to drive an LED with a resistor. Going over this might be fine, but it's possible it could "kill" that pin. Since you're switching it fast enough, this might not become an issue (however, if you digitalWrite() that pin to HIGH, it's a constant current, which might hurt the pin).

Here's a pretty good article that sums up the function of a transistor when controlling higher power loads from your Arduino. You can ignore most of the motor/diode bits at the beginning, but check out the "Fade it!" section:

http://bildr.org/2012/03/rfp30n06le-arduino/

Here's a diagram of how this could, in theory, look:



The 9V battery could be swapped for your boost converter (I didn't have a symbol of that available.) Power goes into both that and your Arduino from the 5V source.

The green wire coming out of the Arduino drives the "gate" of the transistor, which is the signal that turns it on and off. This requires +5v to turn on. There's a 100 ohm resistor there on the green wire to limit current from the Arduino, but you may not need that.

The black wires coming from the battery (boost in your case) just tie all the - lines together, one to the Arduino's GND, one to the transistor's "Source" pin (this is essentially the - connection for your LED strip). The black wire also connects the gate of the transistor to ground through a big resistor (10k ohm), which helps to clear the voltage out when the green wire switches off.

Finally, the blue wire connects the LED strips - side to the transistor's "drain". When the green wire is on, current flows through the transistor from drain to source, connecting the - terminal of your LED strip like a switch.

Here's a link to a transistor that could be used: https://www.sparkfun.com/products/10213

Logged

Coenn Jeenx


    *
  • *
  • 173
  • Awards Celebration Chicago
Re: Helmet LED's - Need help
« Reply #9 on: Aug 02, 2019, 09:38 PM »
Finally made some progress on my Gen 2 bucket with LED's. Feels done. Got the LED's working, mic is installed, painting and weathering done, padding in. Feeling pretty good about it. Just need a few troops in it to make sure everything is good to go...

Here is a still shot - link below is a short video showing the "breathing" effects...


https://imgur.com/DjWs1km

Logged
OM#2100
"I reject your reality and substitute my own."
Adam Savage
 


Don't like ads? Help support the Mercs by becoming a Supporter or Auxiliary Member today!
Official Members also get to use the forum ad-free - so kit up and join us!




Powered by EzPortal
anything