Go Down

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

billpealer

#195
Dec 14, 2015, 07:00 am Last Edit: Dec 14, 2015, 07:44 am by billpealer
just watched your video that is a real good job there.
thanks Darkside. i have been counter spinning the wires.  it works ok,.  but,..  if i can figure out how to do what i have done so far,.. i can out think this.  the protrusion of the button is what is the real set back,..

maybe i will have to bite the bullet and put in a switch box so the button clears the hilt.

i'll figure something out.  i refuse to make a 12"+ long light saber.  anything longer than 11.9 inches is unacceptable. though i was a major nerd for 33-36" long blades,  but the flex and reverb is really annoying. i may revert to 29-30"  it will look brighter too.   do they make a cylindrical 7.4v lipo?

oh,..
new code.  better respsonse.  different (additonal) debounce and delay times.
https://youtu.be/8x7UmLdfMDA


darkside

it looks like you have it... i am still drawing out the wiring diagram for mine... well i was till i figured out the last piece and how it SHOULD go. now its wait for the rest of my stuff to come in the mail and hope that i have the proper gauge wire. the gauge is 22 i am thinking maybe smaller like a 24 gauge or so. what do you think. 

JakeSoft

it looks like you have it... i am still drawing out the wiring diagram for mine... well i was till i figured out the last piece and how it SHOULD go. now its wait for the rest of my stuff to come in the mail and hope that i have the proper gauge wire. the gauge is 22 i am thinking maybe smaller like a 24 gauge or so. what do you think. 
I use 26 gauge most of the time. You want everything as small and flexible as possible inside that hilt. It tough to get things to fit.

darthgallion

Hey guys, completely new to saberbuilding and arduino...could anybody direct me to a complete parts list? Thanks :)

darkside

Hey guys, completely new to saberbuilding and arduino...could anybody direct me to a complete parts list? Thanks :)
if you read this thread from the start you will have all the info you need to build you one. that is how i did it. good luck. one more thing click on the links to help you as you go. i found them rather helpful.

darkside

I use 26 gauge most of the time. You want everything as small and flexible as possible inside that hilt. It tough to get things to fit.
thanks jakesoft i will keep that in mind for future builds. might as well use up the 22 i have now.

billpealer

thanks jakesoft i will keep that in mind for future builds. might as well use up the 22 i have now.
I have 22awg for LEDs and from the batts to the buck, so not to add resistance or limit current.  24 for all else.  the insulation on my stock of 26 was shite.  when I used alligators from my helping hands.. it chewed thru it whilst tinning.  do'h.

anyone want to buy an arduino pro mini 3.3v?  I don't have a USB programmer and I like the Nanos.  $3.00 shipped. PayPal me and it's yours.  headers included. not soldered. just included.

billpealer

#202
Dec 15, 2015, 04:10 am Last Edit: Dec 15, 2015, 04:27 am by billpealer
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!
try it! you'll like it.  though for the cree it may drop below 3.7v pretty quick.  my 3.7v cr123a is 4.2 fully charged. on my blue luxeon measures 3.4v 800m . after 5 min was 3.3v and 700ma.  I do think the 2300mah on the batt is a lie. maybe 1200mah tops.  I may switch to a 18650. or look for some sort of round lipo.

darkside

it sounds like good advise from you both... billpealer i may try your combo as well since i have the 22awg already on my 3x aaa batterie holder. i am also reading C++ for dummies so i can better understand it so far my brain hurts from digesting it. i know it is simple for most but for me it takes time. i may wind up reading it several times. i have also been coming up with more saber designs as well along with a saber holster for my first one i made which is what i plan to put the fx in.

Canobi

#204
Dec 15, 2015, 10:51 am Last Edit: Dec 15, 2015, 12:27 pm by Canobi
still no explanation as to how PWM will some how get the MOSFET to LOWER the voltage to the LEDs....?
PWM manipulates voltage as a time constant, it can't adjust the current flow up or down in any way, 5v will always be 5v, it's either just on or off.

Took me a little while for it to click but the the key to how it works is in the name.

Pulse: denotes the way in which the voltage is delivered, in this case, as good as instantaneous, no ramping up or down.

Width: denotes the duration of time that current is allowed to flow.

Modulation: denotes the two functional states, on and off.

In terms of an LED, what's actually being described is blinking. Interestingly, if you speed up the frequency to around 50~60Hz, our brains can't keep up and we perceive the blinking as a steady light due to an effect called Persistance Of Vision.

Keep speeding up the frequency and the LED will start to dim and eventually appear to be off, even though it's still technically functioning.


I'm designing a set of easy to assemble saber PCBs based on different skill sets and other setup desirables with DJWing79. The entry level board  uses a single high power LED and the plan is to use PWM to drive the led at around 80~85%, and then ramp it up to 100% for the FoC effect as a budget friendly alternative to using RGBW or tri star LEDs, aimed at the novice fabricator, or for use in young padawan sabers.


Talking of which, I would love to see a pic of your module stack setup if possible. I've been commissioned to make a small custom hilt based on Yoda's stubbie for a 6yr old padawan's christmas present and can't see any other viable option for adding sound, even my boards would be too big for this diddy thing as it's actually to scale. I've rigged it so it lights up but a mute saber just aint the same:

(I put it next to my WIP as a size comparison)

Protonerd

Here is a good explanation of PWM:
https://en.wikipedia.org/wiki/Pulse-width_modulation

Actually in this context it is used to digitally generate analog voltages between GND and the supply rail. I.e. arbitrary voltages between 0V and 5V. If you look at the waveform with a constant duty cyclfrom the perspective of the load (in this case LED, but PWM is used mostly to drive motors), it looks to be a constant voltage, due to the "inertia" of the load integrating the pulses. With PWM you can also generate any analog signal (sine wave, rectange etc.) digitally, therefore it's widespread use.

For Arduino it means: some output pins are PWM-capable. They can be used to generate different voltages between 0V and 5V. If you want 4V across your LED, set the PWM to ( round(255*4/5)).

Hope it helps :)

billpealer

Quote
In terms of an LED, what's actually being described is blinking. Interestingly, if you speed up the frequency to around 50~60Hz, our brains can't keep up and we perceive the blinking as a steady light due to an effect called Persistance Of Vision.
i understand this. I am a producer.  50hz PAL.  60hz NTSC.

i did not know that increased flicker dims an led.  120hz HDTVs are not dim.  i will just have to play with a mosfet and led.  and regardless of how i conceptualize what's happening, at least just accept the findings. 

the stacked wt and nano is,.. here
https://www.youtube.com/watch?v=yKps0fm1Wo0  around 2:37

jonnieZG

Hi, guys! Thanks for this awesome thread, it is really inspiring!  :)  Now I am still collecting information to figure out what components to order, so after having it all read out, I have a couple of questions to ask:

  • How much memory do I need in the WT588D for a decent soundboard? Humming (idle, swing), clashes (preferably a few different samples), switch-on and switch-off sounds, beeps/perhaps voice prompts for setup...
  • Are the sounds MP3 or PCM?
  • What is the conclusion about the batteries - what form factor and technology are the best choice? I am aiming for the endurance, because I don't want the thing go dead on me in the middle of a party. ;)

Thanks!

jonnieZG

Oh, just another thing! Has anyone tried to approximate the LED string effect by graduatelly turning the LED on and off? Of course, that is not the same as the actual LED string, but I believe it would look better than the immediate ON/OFF.

billpealer

Hi, guys! Thanks for this awesome thread, it is really inspiring!  :)  Now I am still collecting information to figure out what components to order, so after having it all read out, I have a couple of questions to ask:

  • How much memory do I need in the WT588D for a decent soundboard? Humming (idle, swing), clashes (preferably a few different samples), switch-on and switch-off sounds, beeps/perhaps voice prompts for setup...
  • Are the sounds MP3 or PCM?
  • What is the conclusion about the batteries - what form factor and technology are the best choice? I am aiming for the endurance, because I don't want the thing go dead on me in the middle of a party. ;)

Thanks!
1. my WT has 6 sounds.  the 10 second hum is the largest single file. total mem was less than 5mb. i have a the 16mb version

2. mine are all .wav files.

3. i am quite confident the jury's out.  the best long term battery usage is a driver that uses an induction coil based constant current system. Like a buck boost.  the problem with bucking is you need 1.5V+ over your max Vf to the LED.  that means you need at least 2 cells.  i am looking for a 7.4v lipo right now that is at least 1200mah that can fit the 1.125".. (28mm) diameter hilt.  i have got great results from a single 3.7v lithium.  It lasts less than 30 minutes of run time at 3.3v.  and after 30 minutes,.. really struggles.  the upside is i found a bitchin cr123A battery holder, that would look sick sci-fi-ish on a utility belt.  han or jedi style.  takes less than 60 seconds to batt swap.  it is pretty simple math if you are running your batts directly from the single cell.  ohm's law.  a 2000mah battery will run an LED at 750ma for just over 2 hours of operation with your other devices sucking at it as well.  give or take 10% - 20% margin of error, because of loss for heat and increases resistance due to the heat. accent LEDs etc.

maybe someone else can chime in on your 4th question.  I am not a huge fan of the "growing blade effect"  after watching starwars so many times, i am under the notion that there is no given blade emission rate. In ESB Luke seems to get his blade to fully emit in less than 3 frames of video. (100ms).  that is a bilnk.  then ObiWan in StarWars has the slowest blade emission of any scene i can think of as he faces off against darth.  over 30 frames of video.  more than 1000ms.  i do agree the slow to grow looks badass.  it's not my style tho. As I am not one to pick a fight, I will prefer to keep my blade at bay, and only engaged when threatened.  :) :p.

Go Up