Basic LED animation Teensy 2.0

Status
Not open for further replies.

brnuopbarbosa

New member
Hello everyone!

A couple of years ago i bought a teensy 2.0 for a project that was never completed, and i found it laying around a few days ago.

I recently had an idea for a prop Infinity gauntlet and i was wondering if i could use the teensy i have to do the following:

Each stone has a white LED, and there are two power on states - one where you turn on the power and the LED's turn on (possibly with a fade-in) and another where the LED's are activated via a reed switch where they turn on sequentially (from last to first knuckle, and finally the soul stone on the back of the hand).

Now, i'm not sure if this is possible using the teensy i have, but i figure that what i would need would be the LED's, a reed switch and a 3 way switch for each state (off, always on, or on with the reed switch).

My questions are:

Could this be achieved with the teensy 2.0?
Do i need any other components?
can i power the teensy + led's using button batteries (for space saving) or do i need some other type of power source?

Thanks in advance,

Bruno
 
It can certainly be done, though doing wearables is always interesting because of the motion and flexing involved.

In addition to the LEDs you also need some current limiting resistors to keep things sensible and think about how it will all be wired together to be neat and robust.

Current wise you could power it from a pair of button batteries but not for long. A single LED off one battery will glow for a couple of days, but you will be asking a fair bit more from yours so planning for a larger battery bank would be good. My suggestion would be to see if you can find a USB battery bank in the size and shape you want and use that. There are more compact and efficient ways to do things but power bank will be robust and simple. And you have a USB power bank afterwards.

You might also consider acceleromaters or flex sensors as potential ways to make this more interactive.

In any case suggested early steps are to install Teensyduino and make sure the teensy does still work and rough out some code for code using the PWM pins and managing your state changes.
 
Hello all, sorry for the long delay in getting back to you - Work has been massive lately and also i couldn't find my teensy after misplacing it... but i found it now!

Thanks to GremlinWrangler for your tips, i have been able to test it and it seems to be working fine, even after all this time.
Also thanks to Zinic for the suggestion! It sounds like a good idea, but i think i'll go easy to begin with and just do the basics ;)

I was going to star coding this weekend but i had a doubt - will i be able to run the teensy + 6 leds using a cheap powerbank? Something like this:

https://www.dhgate.com/product/led-small-thin-power-bank-10pc-a-lot-by-dhl/239163001.html (although not this specific model, probably) - size wise it would be ideal as i could fit it inside the gauntlet.

I've investigated a bit and found a few examples of people using teensy to manipulate an array of leds, and a few of them were saying that they needed mosfets because the leds drew too much power. Is that a concern i should be having?

At this moment i have bought a dozen leds and resistors just to try it out, but this being my first project of this kind, i'd though i'd ask before i did something stupid!
 
This site is neat to figure out how long a battery bank would last: https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-battery-life
Page on Teensy 2 power usage: https://www.pjrc.com/teensy/low_power.html

The WS2811 RGB LEDs I used for my LED matrix can draw 60mA at full white brightness. I would suggest you use colors that match the colors on the infinity gauntlet. I am going to say each LED will draw 20mA
I am going to guess the second to last row on table from the second link, will be the expected power draw.
If you add an accelerometer, add 1mA (even though it's much less than that).
(20*6+2.9+1)mA = 123.9mA. Plug that in to calculator in first link.
= 14.7 hours. This assumes all the LEDs will be on all the time. To me it looks like the battery bank would be fine that you have chosen.

I don't think you need mosfets. Just make sure the teensy can supply the needed current for each pin.
 
Hello all,

unfortunately i can only get on with these projects once every blue moon. But this week i was able to get this to work how i wanted it!

I've gotten a reed switch and a magnet i've salvaged from something (can't remember where from).

With my tests, the teensy was more than able to supply power to the required pins. And the reed switch works a charm!

I've coded it to do a sweep on turning on, then run a slow fade out/in, and a sweep out once the reed switch is disconnected.

here's a small video with the lights in action:

https://photos.app.goo.gl/ApyPQLXR4WBRJiGi6

Thanks GremlinWrangler and Zinic for your help!
 
Status
Not open for further replies.
Back
Top