Go Down

Topic: Arduino Lightsaber (Read 408084 times) previous topic - next topic

jshaw

Wow great timing Jakesoft!  i have been reading about putting in resistors and how to figuring out
the Ohms for them.  I understand that now.

But you use the Mosfets to control the RGB LEDs.  So the Mosfet is like the resistor, limiting the voltage,   but allowing the dimming of the LED's through the Arduino coding.

I am planning on using this RGB star:  http://www.ebay.com/itm/1pcs-3W-RGB-LED-3-CHIP-6-Pin-Bead-Lamp-LED-Star-Light-/121149855858?hash=item1c35181872:g:xOgAAOxyYSJR8iHf

With these specs:
Forward Voltage VF (V) :  red (min 1.9, typ 2.2, max 3.1),Green/Blue (min 2.8, typ 3.5, max 4.0)
DC Forward Current (mA) :  red 385 ,Green/Blue 350
Average Forward Current (mA) : red 350, Green/Blue 350

People are using the Luxeon,  and I see them saying 700 to 1,000 mah.  So is that the total mah
combined from the 3 LED's  Or are the Luxeons more powerful? 
http://www.ledsupply.com/leds/luxeon-rebel-endor-star-rgb-high-power-led

           voltage          Min     TYP   MAX
Green LXML-PM01 2.55  2.90 3.51 -2.0 to -4.0 10
Blue LXML-PB01        2.55 3.03 3.51 -2.0 to -4.0 10
Red LXML-PD01        2.31 2.90 3.51 -2.0 to -4.0 12
Red LXM2-PD01 1.80 2.10 2.80 -2.0 to -4.0 8

So I guess they are comparable, and the Mosfets you specified above will work fine?

Sorry for the basic electronic questions,  I understand the coding better as I have
done BASIC programming. 

I have found some nice links today that explained it well for resistors:

http://electronics.stackexchange.com/questions/48522/what-resistor-to-use-with-this-rgb-led

http://forums.thecustomsabershop.com/showthread.php?14081-Tutorial-Calculating-Resistor-Values

Thanks I'm goin to play with the hotlinks on the parts list now  ;-)>

The Luxeons are more high powered than many of the other off-the-shelf brands.  Their website provides tons of information regarding their various LEDs.  For the triple LED setup, check these: http://www.luxeonstar.com/sinkpad-20mm-tristar-leds

stinky1

The Luxeons are more high powered than many of the other off-the-shelf brands.  Their website provides tons of information regarding their various LEDs.  For the triple LED setup, check these: http://www.luxeonstar.com/sinkpad-20mm-tristar-leds
Yikes!!!  Thats out of my price range!!!  I need the 23 dollars for a cheapo ESD solder gun!!

So yeah, mosfets that match the cheapo Star, besides I like the idea the LED's all fit neatly
under the lens.  The open spread apart LED stars need different lens.  Guess i should say I'm goin
low budget as I can.

ryang

Yikes!!!  Thats out of my price range!!!  I need the 23 dollars for a cheapo ESD solder gun!!
Take a look at some of the genuine Cree's - they're super bright and a bit cheaper.  Well, depending on what you want...  I found a local supplier who stuck a single blue to a 25mm star for ~$8, and did a 2x red, 1x white for ~$20.

T_R_O_N

Thanks for the advice JakeSoft.

So far I think I'm going to go for an Arduino nano, a wt588d-u, and an adxl345 accelerometer.

I'm also looking at getting this book: Programing Arduino Getting Started with Sketches

Do I still need to use a vibration sensor to detect clashes, or could I have the adxl345 handle both the clash, and swing detection?


Protonerd

USD?
neither require connectors.  one off the shelf mini usb cable works. I wonder if you could fuse the 2 ports.....
i have the Nano and WT module on a stack  the USBs are right next to each other,  you just pull it out the chassis, plug in the USB for arduino, and if you need to make a change to the WT, stick it in the other hole. It's all SORTS of fun.  pull it out, put it back,..  repeat. :) (that part you laugh at Canobi)  What is the goal with one port?  Are you trying to seal the hilt? Make an un-tinkerable sellable thing-a-maroo? I like my hilt open-able. Swapping batts is better than charging IME.


:) I meant USB port (micro one...) And yeah, that thing with in and out is fun in another context, but wrt electronics it could be done better. I also thought about simply wiring the signals together and let the modules sort out what message is for whom, but never got around to try it.

As to enclosed saber: is there something like that? I mean, all custom saber need access to the inside. What I have in in-hilt charging for most of my sabers, comfortable to charge and the rechargable 3.7V batteries are better in terms of room/capacity as AAA/AA. Still I have to admit that I came to hate the recharge port and now looking for alternatives...

But looking at the most popular saber building sites, in-hilt charging is the preferred way, not battery swap.

@jshaw: wow, that is a good find! I will sure look into that module. I'm curious if the charging curve fits those required by mainstream 3.7V batteries.

Canobi

Looking into one using the MCP73833. The circuit for it is smaller than the cell it charges which opens up many possibilities.

Canobi

That's fine. I can shuffle the pins around somewhat without much effort. There are just a few limitations that have to be adhered to:

1) The 4 LEDs must be on PWM capable pins (they have little white circles around them on the silk screen in the picture I posted)
2) The X, Y, and Z accelerometer inputs must go to analog inputs (A1, A2, etc.).
3) Clash sensor must be in pin 2.

If you make the PCB just ignore the AXDL335 VDD and VCC pins on the arduino, that's fine; my software will still work if it's powered more directly by a 3.3V power rail. If the accelerometer pins are left as is, you could just map the X, Y, and Z inputs to the module and ignore the ones I'm using as power pins, don't give them a trace at all. That way the module could either be piggy-backed on the arduino or use your board's mapping. It also opens the door to  making a shorter, simpler version of your PCB with no mapping for the accelerometer pins at all, assuming it would be piggybacked.

The accent LED is for lighted switches or indicator lights. In my videos, that is the output that is controlling the blinking of the LED in the ring switches that I use. It's an optional indicator light.
Thanks for the heads up on the PWM markings and pin designations, forgot they were fixed position.


I'm always looking for ways to make my boards smaller and Bill's genius stack gave me an idea (thanks Bill :) ). I've had a play with some strip board and various headers to find a workable arrangement. I hate making circuits with strip board but I do use it like lego for working out physical dimentions and arrangements.

Size wise, it would fit hilts with a minimum ID of 28mm if the headers are used in the regular fashion. However, it would be possible to lower the depth by modifying some of the male headers mid assembly and mounting one or two modules flush to the board (the pro mini and WT can both do this as there's no surface mount components on the flip side of them).

As to the layout I'm reworking now, I've used the Spectrum as the template as it supperts upto 6 LEDs. Here's what the pin list looks like:

2= Clash sensor
3= NFET gate1 (FoC LED)
5= NFET gate2
6= NFET gate3
7= PWR button
8= AUX button
9= NFET gate4

10= Accent LED 1
11= Accent LED 2
12= BUSY
13= SCK
A0= X
A1= Y
A2= Z



As it didn't seem likely that anyone would want to change the white LED for a different colour, I've opted to include an SMT resistor on the PCB for 1,2 and 3w setups and resurved output channel 1 (gate 1) exclusively for the FoC function since the LEDs Vf and power ratings will be a fixed point.

The other three LED output channels have been left resistor free however. Regular resistors will need putting in series with the LEDs in the usual fashion but setting it up this way allows the PCB to suppert custom and regular colour swap outs regardless of voltage or watt.

JakeSoft

Thanks for the heads up on the PWM markings and pin designations, forgot they were fixed position.


I'm always looking for ways to make my boards smaller and Bill's genius stack gave me an idea (thanks Bill :) ). I've had a play with some strip board and various headers to find a workable arrangement. I hate making circuits with strip board but I do use it like lego for working out physical dimentions and arrangements.

Size wise, it would fit hilts with a minimum ID of 28mm if the headers are used in the regular fashion. However, it would be possible to lower the depth by modifying some of the male headers mid assembly and mounting one or two modules flush to the board (the pro mini and WT can both do this as there's no surface mount components on the flip side of them).
This sounds interesting. It seems like you've really only got two options to make the system space efficient:
1) Make it long and as flat as possible, so you could possibly mount the circuits on top of a battery
2) Make it short and fat by stacking the modules on top of each other

Do keep in mind though, that you'll want to keep these as accessible as possible for hobbyists if you intend others to assemble them. Many are operating with $20 soldering irons and so-so soldering skills. One reason one might be interested in building their own sound board is that $100+ commercial sound boards are too expensive for them. If they need a $100 soldering station to build the board, then they aren't really ahead of the game unless they plan to build a lot of them. If you intend to sell completed boards, however, go for it and use all the tricks you have at your disposal to make it small as possible.

As to the layout I'm reworking now, I've used the Spectrum as the template as it supperts upto 6 LEDs. Here's what the pin list looks like:

2= Clash sensor
3= NFET gate1 (FoC LED)
5= NFET gate2
6= NFET gate3
7= PWR button
8= AUX button
9= NFET gate4

10= Accent LED 1
11= Accent LED 2
12= BUSY
13= SCK
A0= X
A1= Y
A2= Z

I think I can work with this pin arrangement. I'll experiment on my breadboard when i can get the time. I don't currently have a dedicated FOC LED, just the 3 for R/Gr/B, but I could add one easily enough. I don't have a second accent LED either, but it's OK if that output doesn't do anything for now, right?

As it didn't seem likely that anyone would want to change the white LED for a different colour, I've opted to include an SMT resistor on the PCB for 1,2 and 3w setups and resurved output channel 1 (gate 1) exclusively for the FoC function since the LEDs Vf and power ratings will be a fixed point.
Is that true? What LED are you assuming people will use for FOC? Cree and Luxeon have different specs. What battery source voltage are you assuming? What if somebody wants to use a different color LED for dedicated FOC?

billpealer

#353
Jan 08, 2016, 07:54 pm Last Edit: Jan 08, 2016, 08:12 pm by billpealer
:) I meant USB port (micro one...) And yeah, that thing with in and out is fun in another context, but wrt electronics it could be done better. I also thought about simply wiring the signals together and let the modules sort out what message is for whom, but never got around to try it.

As to enclosed saber: is there something like that? I mean, all custom saber need access to the inside. What I have in in-hilt charging for most of my sabers, comfortable to charge and the rechargable 3.7V batteries are better in terms of room/capacity as AAA/AA. Still I have to admit that I came to hate the recharge port and now looking for alternatives...

But looking at the most popular saber building sites, in-hilt charging is the preferred way, not battery swap.

@jshaw: wow, that is a good find! I will sure look into that module. I'm curious if the charging curve fits those required by mainstream 3.7V batteries.
i would wire the USBs together.  if you have the extra parts, and aptitude and dexterity to do that,..  i would.  i am fairly certain the drivers and software for each thing will sort out the programming.  meaning the WT programmer will not try to shove a bin file to the arduino. and Vice Versa.

i use the nano and wtU.  they both employ usb mini ports.  easy peasy.   just programmed an attiny85 with built in usb. Programming that was a major pain.  from finding the right drivers and technique to program it with out using another arduino as the uploader.  that was 4 evenings i'll never get back. But i am dying to test it as the mcu. it's small. no "input_pullup" function by the way. pin3 has a pullup resistor,..  "input" works in its stead. tested.   tween that and adding pwm to my LEDs. and figuring out a repeatable lock up with out another hilt button.    busy busy.  oh and my method of using the same mosfet to toggle power to the WT and LED will not work if i add PWM.  it was geeking the WT for whatever reason. i think it was resetting it.  anyone have a hypothesis? i'll need 2 mosfets for LED PWM.  one for PWM for the LED, and the other HIGH/LOW for the WT mosfet.  oh well.  2 mosfets.  also,.  my green Cree just arrived.  if i run a 7.4v set up (as my line diagram illustrates), and i am pushing 3.5v and 850ma with the adjustable buck booster that i identified. it is about 30% brighter than my blue star rebel running 3.34v at 750ma. (again that is directly off the battery no resistors- don't forget each 3.7 v lith battery has about 1ohm and 3watts of internal resistance)  so i am thinking running it at 75% power via PWM and then 100% for FoC would be sexy.

i also had to rewire the 14650 twin bat pack because the +/- wires were too perpendicular to the pack. my sled system rocks it, but when you pull the hilt base, the threads were scrubbing on the wires.  now they are clear.

http://www.ebay.com/itm/14650-7-4V-850mAH-Li-ion-Rechargeable-Battery-15C-SM-Plug-For-RC-Helicopter-Part-/291537040118?hash=item43e0f632f6:g:NgkAAOSwT6pVsJ8q

i really like the 14650 form factor.  i may print a custom battery holder that will allow me to use paired singles.  then i don't have to use a 2s ballancer to charge the pack.  i mean.. there would be no pack.

i feel like there are a 100 ways to skin the arduino and audio playback cat. Everyone who has posted code, has triggered their audio in different ways. but there are far less ways to get a good battery system with constant current to your LEDs.  it was a major thing for me when i discovered you don't need anything to power blue or green star rebels if you use a 3.7v lith.  it's the crees that need over 3.4v.  FYI  i tried to use a single 3.7v batt on my new cree.  it worked,..  and was brighter than the blue led, i think green just may be more lumens.   but the voltage was still 3.34 v and 750ma.  same as the blue rebel.  now if i understand resistance,.  if you hooked 2 batts up parallel, it would decrease their internal resistance. by,. what is it half?  or a factor of some sort? so you could get closer to the cree's peak of 3.6v 1000ma.



DJWing79

Has anyone tried to fabricate their own hilts? If so, does anyone know the threading that MHS uses? and lastly...how do you ensure that the "face" of one part always matches the "face" of the other part? I have a 3D printer and am trying to make pieces that line up correctly when screwed together.

jshaw

Has anyone tried to fabricate their own hilts? If so, does anyone know the threading that MHS uses? and lastly...how do you ensure that the "face" of one part always matches the "face" of the other part? I have a 3D printer and am trying to make pieces that line up correctly when screwed together.
The threading that TCSS uses is "proprietary", at least from what I've read on various forums.  I'm sure there's an equation to figure out how many threads will get 2 parts to line up, but I don't know it.

billpealer

Has anyone tried to fabricate their own hilts? If so, does anyone know the threading that MHS uses? and lastly...how do you ensure that the "face" of one part always matches the "face" of the other part? I have a 3D printer and am trying to make pieces that line up correctly when screwed together.
the aluminum TCCS threads will chew right thru your prints.  you'll never be able to tighten it correctly for moderate battle.  for show,..  why even thread?,.  just glue it up. If you are making your own pieces,. use your own threading convention. i would advise against battling with a printed hilt. my gut says it won't hold up.


 i have made extensions and blade holder shrouds that are pretty darn good looking.  i just finished an activation box that is also a blade emitter shroud in one.  came out great.  If anyone is interested, i'll render an image.  just make your ID of the parts 36.85mm  and it will fit snug over the TCSS main extensions bodies, and many of the blade holders.  my hilt extensions that go OVER threaded parts but NOT over the body are,...  35mm ID.

TCSS parts faces do NOT match up.  i have screwed 2 different gear extensions to the same 4" body extension and the gear knob for each was in a different location.  No !@#ting.  That is why i made my extensions with the 3d printer. i can now screw on parts with accurate positions and turn count. maybe get an extra cm. I have been told that extra cm makes a world of difference.  plus i use black filament, no painting required.

cheers

DJWing79

I'm planning to print my own hilts in either carbon or steel PLA. From what I've read, with sufficient fill % they should be very durable. the standard PLA i've printed out in test is pretty tough too, but I haven't stuck my blade inside to test impact (that comes later :) ). What I am wondering is how to guarantee that the faces of my 3d print match up because I want to make some cool designs. I too am frustrated how the TCSS parts can't align either. It ruined my fiance's saber that I made for her because parts didn't match up and those spacing rings they sell are a joke, they too easily get loose when you're tightening and look horrible.

JakeSoft

Do I still need to use a vibration sensor to detect clashes, or could I have the adxl345 handle both the clash, and swing detection?

Technically, no you don't need it, but the code is somewhat tricky to get working right. I'd recommend you stick with using the clash sensor if you are new because it's much easier to code for. You can always rework it later if you get good enough to detect clashes with your adxl345.

Best of luck to you.

billpealer

#359
Jan 09, 2016, 01:59 am Last Edit: Jan 09, 2016, 02:14 am by billpealer
I'm planning to print my own hilts in either carbon or steel PLA. From what I've read, with sufficient fill % they should be very durable. the standard PLA i've printed out in test is pretty tough too, but I haven't stuck my blade inside to test impact (that comes later :) ). What I am wondering is how to guarantee that the faces of my 3d print match up because I want to make some cool designs. I too am frustrated how the TCSS parts can't align either. It ruined my fiance's saber that I made for her because parts didn't match up and those spacing rings they sell are a joke, they too easily get loose when you're tightening and look horrible.
sure about that?

Stainless Steel PLA
Proto-pasta Stainless Steel PLA is a dense material that prints as easily as standard PLA but results in heavy prints that can be finished post-print to achieve amazing results. Perfect for jewelry, costumes, props, figurines, crafting, robots, and more!
What is it made out of?
Proto-pasta Stainless Steel PLA is a compound of Natureworks 4043D PLA and finely ground, powderized stainless steel. In filament form, it is rather brittle, and should be handled with care to avoid breakage.
Is it stronger?
No. Proto-pasta Stainless Steel offers the aesthetic and density of metal, but because the stainless steel is finely powderized and encased in PLA, it is not stronger than standard PLA."

that is from the people that make the stuff. and it is LESS durable than PLA.  brittle.  not what you want when applying lateral leveraging force to an orifice that has to contain the blade.  you could 3d print everything BUT the blade holder.  that would do,..  a bit better.  or mixed media,.  PVC blade holder and hilt with 3d printed,..  accents. and do-dads.

Go Up