Go Down

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

billpealer

also if anybody would like to try the 3aaa batterie holder i found them on am azon for under 5 bucks and there are 2 colours black or white.
i get mine at the $1 store.

they come in little useless flashlights.  so i get 3 AAA and a holder $1.  and toss the flashlight.

billpealer

The battery conversation is really interesting to me, and I've had a gut feel that cell phone style Li-On batteries are the way to go in sabers since I started reading forums.  I got in my RB/B/CW Tri-Rebel in yesterday and have the two blue LEDs on w/ the white for FoC, and running them from a 3.3V Arduino Pro Mini hooked up to a 3.7V Li-On battery, they are bright! I haven't pulled out the tools to measure their voltage and amperage, but my intuition says they are about where I want them to be.  Now if only my Graflex blade holder would show up...

For people looking for more lightsaber arduino code, these two links have some useful code, although they use different sound modules from what this thread discusses:

https://github.com/alextwin007/LightSaber
http://www.fx-sabers.com/forum/index.php?topic=22838.0
That guy had some good code, but it is only to run the "Joe Jedi" sound card. and uses a TCSS PWM LED driver to do the color mixing..  (What I assume Jake is doin' ")  I literally knew nothing about C, arduino, or Sound Modules before i started.  and this thread and a few kind people, took me all the way to where i am,.. 

I just bought a 3d printer and i am going to make chassis that hold the stacked nano/WT sound module and you can F using PCB boards,..  just wire the pins direct.  I have 3 more sabers in the works,.. 

DJWing79

PWM is simply on or off, just done in very rapid succession. So the MOSFET works the same by opening and closes in tune with the signal from the pin.

JakeSoft

2 phone calls to my best bud electrical engineer and genius,..  YOU DONT NEED AND SHOULDN'T USE A RESISTOR FOR 3W LEDS if the V+ of the BATT IS LESS THAN 10% OVER THE VF of the LED.  There is a 6 page thread on custom saber shop of people who can;t figure out why their 1 ohm 5 watt resistors are only yielding 450m.  so of course the custom saber guys want to sell the buck pucks.

the reason for only 400-500ma when using a resistor,..  The internal resistance of the battery is more than enough to drop the V by 10%.   MY MAN PJ,  WAS RIGHT.

Really?! Reading this got me excited. My setup uses a 3.3V Pro Mini and could operate on a 3.7V power source without the need for a buck boost. I could run my color change setup with a resistor on only the red die if I use a Cree XP-E2 RGB 3-up LED. Forward voltages are 3.7V @ 1000ma, 3.4V @ 1000ma, and 2.65V@ 1000 ma. I could just run the WT588D's VDD pin off direct battery power since it's under the 5.5V max rating, so I could also drop the regulator from the design and save space, money, and complexity! Oh, man, I've gotta try this!

darkside

sorry billpealer its just at home or at work i am use to the joke and yes i was not sure but as i thought about it i started to laugh. i do have a question though... i have a radioshake breadboard that i bought today. would it be possible for me to program the pro mini with it threw the cable i have with the soundboard programmer or do i realy need the ftdi breakout board. also do ya'll know any good c++ books i am in the mood for light reading.

JakeSoft

That guy had some good code, but it is only to run the "Joe Jedi" sound card. and uses a TCSS PWM LED driver to do the color mixing..  (What I assume Jake is doin' ")  I literally knew nothing about C, arduino, or Sound Modules before i started.  and this thread and a few kind people, took me all the way to where i am,.. 
Are you saying I used a TCSS PWM LED driver for the color mixing? No way, man! It's straight-up Arduino to my MOSFETs for direct control of the LEDs! I put the positive sides for all the LEDs though a V regulator so I have predictable voltage even as the battery drains. That keeps the colors true until the battery's under-voltage PCB kicks in and cuts power completely.

I just bought a 3d printer and i am going to make chassis that hold the stacked nano/WT sound module and you can F using PCB boards,..  just wire the pins direct.  I have 3 more sabers in the works,.. 
Did you finish the first saber yet? Let's see it!

darkside

besides the custom saber shop any ideas as to where i can get a clash sensor or 2 they are currently out.

purgedsoul

besides the custom saber shop any ideas as to where i can get a clash sensor or 2 they are currently out.
you can try here:

https://www.adafruit.com/search?q=vibration+sensor&b=1

darkside

you can try here:

https://www.adafruit.com/search?q=vibration+sensor&b=1
thanks purgedsoul... i checked it out and found the same style as what the css has granted a bit more in cost but hey i ordered anyway. now once i get it in i shall go to construct mode. now if coding was as easy.

billpealer

#189
Dec 13, 2015, 04:10 am Last Edit: Dec 13, 2015, 04:18 am by billpealer
Are you saying I used a TCSS PWM LED driver for the color mixing? No way, man! It's straight-up Arduino to my MOSFETs for direct control of the LEDs! I put the positive sides for all the LEDs though a V regulator so I have predictable voltage even as the battery drains. That keeps the colors true until the battery's under-voltage PCB kicks in and cuts power completely.
Did you finish the first saber yet? Let's see it!
now is it a regulator buck boost? or a linear regulator? because as the batts voltage drops... a linear regulator requires a good 2v above the output and your current will drop considerably.  have you ever put an ammeter in line at say 50% batt life?   Can someone explain how PWM will work with a digital MOSFET.  PWM is by my understanding a digital way to control analog devices... like LEDs .

you wanna see it?  let me whip it out.  attached.  maybe a video tonight later.  kids just went to bed.  bah... this won't let you uplaod from your phone!?.  ach..  pics later.

darkside

#190
Dec 13, 2015, 05:51 am Last Edit: Dec 13, 2015, 05:56 am by darkside
you wanna see it?  let me whip it out.  attached.  maybe a video tonight later.  kids just went to bed.  bah... this won't let you uplaod from your phone!?.  ach..  pics later.
frustration leads to the darkside... calm your mind and it will soon come clear. and whipping it out won't salve a thing... at least that is what she said.

JakeSoft

now is it a regulator buck boost? or a linear regulator? because as the batts voltage drops... a linear regulator requires a good 2v above the output and your current will drop considerably.  have you ever put an ammeter in line at say 50% batt life?   Can someone explain how PWM will work with a digital MOSFET.  PWM is by my understanding a digital way to control analog devices... like LEDs .
I just used a simple linear regulator. It's a pretty high quality one with a drop-out voltage of ~0.5 V meaning that as long as I have 5.5V from the battery, I'll get 5V at the output. I used a 7.4V Lithium Ion rechargeable battery as a power source, so the nominal voltage is well above he drop-out of the regulator.

The battery has built-in PCB protection that cuts off the battery power when it gets below a threshold and requires recharging. This seems to happen at well above 5.5V. So, the battery's built-in under-volt protection kicks in long before the drop-out voltage of my regulator matters. I've run it from full charge to empty with no noticeable difference in blade brightness.

There may be more efficient ways, but this way was cheap and easy. 

billpealer

#192
Dec 14, 2015, 04:40 am Last Edit: Dec 14, 2015, 04:47 am by billpealer
i may go to 7.4v with an induction buck boost.  and a white cree with photo gels to get color.  i realized that this would also be the coolest flashlight ever.  and works as such.  the buck will adjust to,  3.7 and 850ma,  that is pretty ok for a cree.

still no explanation as to how PWM will some how get the MOSFET to LOWER the voltage to the LEDs....?

anyone got a good technique to keep the wires from twisting when putting it all together? i have already nipple twisted 2 cables from solder points.  i think i have it good now.  easily a dozen take-aparts and battery pulls with no issue.  i am this close to shaving 1/2 of my threads off. who the hell needs 7+ turns to keep these things in place. 4 tops.

photo attached.
https://www.youtube.com/watch?v=zW-Yeq0l6QM

i also just modified my clash and swing debounce. gave them each a different debounce.  my swings were stepping on my clashes.  and when you think about it, you have to swing to get to a clash,.. so it makes sense that the swings would block out the clash from triggering,..

now that i type it,. maybe i should have just reduced the delay after the swing,..  

i'll try that next.
it works about as reliable as a Hasbro Force Saber.  i'd like it to work better,..   if i can't get it better in 1 hour, i'm leaving it.


thank again for all those that got me to this point. i promise to pay it forward.

darkside

what i have seen done on other projects to keep the wires from twisting like that is that you twist them the opposite way that way when you screw the piece on it will twist back without problems. it is old school but works well.

darkside

just watched your video that is a real good job there.

Go Up