Trinket Vader chest box
Moderators: adafruit_support_bill, adafruit

Trinket Vader chest box

by gucabe on Wed Feb 12, 2014 8:44 am

So i just created my first project using the trinket 3v version.

I bought it for this project specifically and i completed it in two days. I'm a member of the 501st Legion (a worldwide star wars costuming organization) and we make screen accurate costumes. One of the challenges we have is getting the props to look right, specially lights and sounds. This is where I found lots of potential for the trinket, it has enough memory for simple programs that do not require more than 5 io's etc.

So when I saw what the trinket could do I just went and bought two. This is the first one and I will start working on the next: Automatic helmet ventilation.

So here are two videos that I shared with my fellow 501st members.
http://www.youtube.com/watch?v=RiSFwqFV6Tw (Explanation)
http://www.youtube.com/watch?v=4bisG5iEWpA (demo with the lights off)

One thing I could not get to work is the pin4 PWM its no biggie but i just couldn't make it work.

Thanks for watching. And thanks to Adafruit for this awesome device, It's going to be in most if not all of my props from now on.

Gustavo.
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by adafruit_support_bill on Wed Feb 12, 2014 9:30 am

Awesome! Thanks for the post :D
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am

Re: Trinket Vader chest box

by gucabe on Wed Feb 12, 2014 3:06 pm

Thanks and I know this has been asked before but, in my case what would i need to do to get PWM on pin #4?

I just need it for the fade effect on a LED. that way all 3 led can have that feature.

Thanks.
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by michaelmeissner on Wed Feb 12, 2014 5:53 pm

Do you still have the Trinket connected to the USB (for power)? You might want to detach the LED when you are programming the chip (pins 3 & 4 are used by the USB connection during downloading, and it may interfere with things if the USB connection is live), and reattach it later when you are testing it. In addition, it may have a resistor on it that may interfere with the LED.

Alternatively, you could either use two Trinkets, or you could move all 3 pins to use i2c, and use the i2c pwm breakout board: http://www.adafruit.com/products/815
User avatar
michaelmeissner
 
Posts: 506
Joined: Tue Aug 28, 2012 11:40 pm

Re: Trinket Vader chest box

by thekitty on Wed Feb 12, 2014 6:15 pm

See this code for using PWM on pin 4 http://learn.adafruit.com/trinket-power ... clock/code

Yes be sure you don't have the circuit interfere with Trinket uploads. Good work.
thekitty
 
Posts: 598
Joined: Sat Mar 24, 2012 7:56 pm
Location: Mid-Atlantic

Re: Trinket Vader chest box

by gucabe on Thu Feb 13, 2014 3:22 pm

ah i see, so i never did actually tested it out stand alone, only connected to the USB... eventually i just hid the code using // for future changers so I'll remove the slashes and try it that way... ( i was using the code that Thekitty linked.)

Thanks and hope this works.
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by gucabe on Thu Feb 13, 2014 11:18 pm

Well the code worked... im not sure what i had wrong but its now working. Thanks to all of you for your input.

http://www.youtube.com/watch?v=U03k6s-g ... e=youtu.be
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by thekitty on Fri Feb 14, 2014 12:16 pm

Very nice, glad everything is working the way you want.
thekitty
 
Posts: 598
Joined: Sat Mar 24, 2012 7:56 pm
Location: Mid-Atlantic

Re: Trinket Vader chest box

by gucabe on Fri Feb 14, 2014 1:58 pm

I just can't believe how fast i got it to work and specially that i can make it do more things than my original scope of the project.

I have been looking for something like this for a while. I now have other things in mind to make with these little critters. I now understand all about breakout boards so I will try other stuff out.

I am going to make a lightsaber with a neopixel strip soon :D I have made several lightsabers using a single high powered LED but i lose the ability to make it progressively lightup. I think i can make good use of a couple of trinkets and neo pixel strips to put up quite a show.

Stay tuned. Thanks
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by jcgoodman on Fri Feb 14, 2014 5:47 pm

gucabe wrote:I am going to make a lightsaber with a neopixel strip soon :D


A light saber definitely needs a gyro and an audio codec in it. FFZZZT! WOM WOM WORRRR KSSSHT!
http://www.adafruit.com/products/1032
http://www.adafruit.com/products/1381
jcgoodman
 
Posts: 96
Joined: Thu Jan 23, 2014 5:03 pm

Re: Trinket Vader chest box

by michaelmeissner on Fri Feb 14, 2014 9:22 pm

As has been discussed in the other 57 threads about neopixels, 3.3v processors (like the 3.3v Trinket, Gemma, and Teensy) may need special handling. Some of the newer neopixels are more strict about wanting 5v (some of the early versions could run on directly attached to a lipo, and using 3.3v signalling). For example, I have a 24 led ring that will not work unless you power it with 5v, but with that ring, you can signal with a 3.3v processor (my 16/12 led rings, and 1 led stick work fine powered with either a Gemma or Trinket). Others have what they call a grumpy strip, that needs 5v, and the signaling also has to be 5v. Many of the voltage converters (for things like i2c) are not fast enough for doing neopixels. I would expect over time, it would be more likely new strips/rings that you get might be grumpy versions.

So, for something using neopixels, it might be simpler to go with 5v processors and batteries (unless you want more of a challenge). Unfortunately there are some sensors that only run at 3.3v, so you might need to do voltage conversion, but a lot of things aren't as timing sensitive as neopixels.

Finally, things that use interrupts like servos, might be problematical with a lot of neopixels.

I'm not trying to discourage you from playing with blinky lights, just trying to avoid some head banging that is currently being discussed.
User avatar
michaelmeissner
 
Posts: 506
Joined: Tue Aug 28, 2012 11:40 pm

Re: Trinket Vader chest box

by gucabe on Tue Feb 18, 2014 9:11 am

Thanks for the heads up Michael, well i have built or modified prop lightsabers and I am familiar with electronics. I normally use Li-Ion batteries for my projects, 3.7v or 7.4v but for lightsabers i go with 7.4v

Examples
Saber soundboard
http://www.youtube.com/watch?v=F_6oW11dVjw
Single Led blade
http://www.youtube.com/watch?v=34ekj_jlYvQ

I would then get a couple of trinkets (5v version) to control the neopixels and use a cheaper soundboard. The soundboard has the sensors already for the swings and clashes and it can control a led if needed but i would use that signal to trigger some effects on the neopixels via the trinket.

The benefit i see is that I can have more control over the neopixels than i have using the lightsaber boards out there.

I never use rumble motors for saber because they tend to affect the sensitivity of the sensors and trigger sounds inadvertently.

How many neopixels can a 5v trinket handle?
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by gucabe on Tue Feb 18, 2014 9:13 am

jcgoodman wrote:
gucabe wrote:I am going to make a lightsaber with a neopixel strip soon :D


A light saber definitely needs a gyro and an audio codec in it. FFZZZT! WOM WOM WORRRR KSSSHT!
http://www.adafruit.com/products/1032
http://www.adafruit.com/products/1381


Thanks for these links... and you got the sound fx spot on LOl...

oh boy i got so may things to do now...
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am

Re: Trinket Vader chest box

by michaelmeissner on Tue Feb 18, 2014 11:51 am

In terms of how many neopixels a 5v trinket can handle, it depends on how much SRAM is used by other parts of the code. In Trinkets, you have 512 bytes of SRAM, and each neopixel led takes 3 bytes. So I would probably think 64 lights would work in general. I've used 32 lights (2 neopixel rings) on a Gemma with no problems.
User avatar
michaelmeissner
 
Posts: 506
Joined: Tue Aug 28, 2012 11:40 pm

Re: Trinket Vader chest box

by gucabe on Tue Feb 18, 2014 2:59 pm

Awesome then, I need at least 60 per trinket, and will be using 2 sets... so the light shines in two directions, they will be synced somehow.

With the 18650 batteries i can get enough juice for a short period of time, about 4 to 5A, its not going to be full brightness but im hoping it will be enough...

Thanks again.
gucabe
 
Posts: 12
Joined: Wed Feb 12, 2014 8:33 am