Go Down

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

stinky1

try PWM with mosfet with a buck booster?  or just direct off hot DC with resistors or a linear regulator?

from what i understand from buck step/up down,. they push power at a frequency.  they talk about ripple, and what not in their cut sheets. i am now savoy in PWM and arduino and LEDs..  yet if I put a mosfet tween the buck and the LED,..  no dice.  i can use the mosfet tween the v+ and the buck to turn it on and off.  i can use the mosfet with pwm direct to the 3.7v batt with effect.  But not with the buck step down.  grrrrr.  

anyone have a story on that?
Well don't quote me as Im really newb,  but from what I read the buckboosters are for single color LED's.
At least that is what I have read in my researching of all this,  when I found out I didn't need one i was like
phew cause they aint cheap. I was thinking one for each LED,   3 of them,  OW dollas!  :smiley-money:

billpealer

So then the voltage is controlled through the PWM pins, and the voltage controls in the Arduino programming? With the Mosfets. I'm guessing.    
If you test the LEDs controlled with pwm, they will read a varied voltage based on the PWM,.  but in essence the PWM is NOT controlling V or A.  just,..  modulating the signal.  like,..  a wave function. and modulating it via whatever the arduino is shoving out the pin..  like 4.8v and 50ma.  sound right people?
and a mosfet,.  is more or less a switch or relay.  send it a signal and it links the ground. take away the signal, and it breaks the ground.  mosfet.  i didn't know about any of this 3 months ago.  i did know that PWM could drive an led or laser.  my DL44 mauser blaster laser and LED piggy backs off the sound module,..  so it modulates based on the sounds.  kind cool.  RIP.. wife broke it this past halloween. :(  i seriously had a funeral.

billpealer

#392
Jan 11, 2016, 05:14 am Last Edit: Jan 11, 2016, 03:21 pm by billpealer
Well don't quote me as Im really newb,  but from what I read the buckboosters are for single color LED's.
At least that is what I have read in my researching of all this,  when I found out I didn't need one i was like
phew cause they aint cheap. I was thinking one for each LED,   3 of them,  OW dollas!  :smiley-money:
sorry, i should have been more specific.
i was asking jake.  he is like the godfather of this stuff, and 4 years of tinkering on this topic.

i am using single LEDs.  and i think a buck will power a tri.

purgedsoul

Awesome. Did you have to use DAC on the WT, or were you able to use the differential PWM outputs?
I had to use the DAC on the WT.

billpealer


Canobi

Someone say cake?



Shame the routing is off but at least I know they come out ok.

Protonerd

I put the 10k gate resistors on as a precaution but if they're not essential then I'll ditch those as well it'll help to simplify hand soldering.
I would definitely implement that precaution. Arduino PWM capable drivers only have pull-ups, but for low-sides we use n-MOS. If the resistors are not there, as soon as you do not explicitly program L/H (or PWM) levels, the gates start to float. Why it's bad? For one I do not know how the Arduino works when updating the code. Say you program your drivers for low level no keep the MOSFETs calm. Then you start uploading your new code (happens quite often when debugging), and you see the dancing lights on your saber. Same when applying a reset, not to mention that if you want to upload a different code (for whatever reason), your safeguards in the code are not there.
I use 100k, but alas for a LED string saber I have 6 MOSFETs in parallel for practical purposes. Matter of taste, usually in IC's they go not higher than 200k.

billpealer

Someone say cake?



Shame the routing is off but at least I know they come out ok.
tasty.

i had a happy accident last night. 2x CR123A in series.. I epoxied 2 batt holders together, and realized.. For TCSS (not 1"pvc.  maybe 1 1/4" pvc tho)  i can rest the nano and WT on the back side of it. add some 3d printed fins (tie fighter) with and extension platform to hold the Mosfets, and sensors to keep it central, and then epoxy the Speaker holder to the other side,..

3d render coming.

actually, Canobi the board making jedi,..  the batt holders have pcb pins.  you could mount your little board doohicky to the back of the batt holders. i think 7.4v is Jake approved if you are hoping to clone his setup. if you need a compact batt system. it may be the one!

Canobi, can you send, or post me a high-con (high contrast black and white image) of your PCB board and its dimensions.  I'd like to make a 3D model of it, and then create a visualization of how it could be applied directly to a battery system. i think i can make a Hi-Con,.  if you could tell me the lxwxh, that would be sufficient.

image attached.  the white paper would be the cake.

stinky1


JakeSoft

I would definitely implement that precaution. Arduino PWM capable drivers only have pull-ups, but for low-sides we use n-MOS. If the resistors are not there, as soon as you do not explicitly program L/H (or PWM) levels, the gates start to float.
Yeah, I'd still go with what I said before. Leave the traces in but it's not a big deal if you don't put the resistors there. My code is tight about ensuring outputs are low when they are supposed to be, but having the resistors there allows you to be more sloppy with your code. I'm a software guy, so I'm always going to look for the software solution. Others my have different inclinations.

Why it's bad? For one I do not know how the Arduino works when updating the code. Say you program your drivers for low level no keep the MOSFETs calm. Then you start uploading your new code (happens quite often when debugging), and you see the dancing lights on your saber.
I'm pretty sure that at least on the Pro-mini, the outputs all go low during programming. At least, I notice that all of my LEDs I have wired to outputs will turn off during SW upload when working on my breadboard. I never see the "dancing lights" because I put my kill key in when doing in-hilt uploads to my MCU anyway.

T_R_O_N

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.
Thanks I'll definitely use the vibration sensor for clash detection, how difficult is it to detect only swings with the adxl345? Could I use the accelerometer for swing detection then?


Protonerd

Yeah, I'd still go with what I said before. Leave the traces in but it's not a big deal if you don't put the resistors there. My code is tight about ensuring outputs are low when they are supposed to be, but having the resistors there allows you to be more sloppy with your code. I'm a software guy, so I'm always going to look for the software solution. Others my have different inclinations.
I'm pretty sure that at least on the Pro-mini, the outputs all go low during programming. At least, I notice that all of my LEDs I have wired to outputs will turn off during SW upload when working on my breadboard. I never see the "dancing lights" because I put my kill key in when doing in-hilt uploads to my MCU anyway.

Point taken and I agree. If no smd resistors are used, they can take up a lot of space for what they are good for and every inch of space is precious in a saber. Well, I'm no software wizard like you JakeSoft, so I need the precaution. Yeah, I think sloppy might be the right term for the code I write in C, but I keep improving :) but I really enjoy the hardware challenge!

ryang

Not to worry, the board stands at 24.42mm which accommodates many different routing options so there's actually no need to make it any wider.
Just wondering about this...  How high is the board ending up after mounting components?  If it's too high, it won't fit in a 1" ID.  Leaving ~1mm clearance doesn't seem like enough.

What are the dimensions of the Arduino being used?

billpealer

Just wondering about this...  How high is the board ending up after mounting components?  If it's too high, it won't fit in a 1" ID.  Leaving ~1mm clearance doesn't seem like enough.

What are the dimensions of the Arduino being used?
absolutely,  plus every mm or so up, you loose a mm in width, as is the nature of a dome or 1/2 cylindrical enclosure.  i had to abandon a buck boost module due to the chunkyness of its caps and induction coil.. all mounted at the board's edge.  now i use a smaller,..  flatter model.  i have gotten better at soldering since,. i suppose i could relocate those bits.

The dimensions of the Pro Mini PCB are approximately 0.7" x 1.3" and maybe an .125" thick. more with headers.

jshaw

#404
Jan 12, 2016, 04:32 am Last Edit: Jan 12, 2016, 04:38 am by jshaw Reason: image added
I finally received my WT588D-U-32M and wow is it big!  I might need to order the one that requires the USB programmer in order to save some space in my hilt.   But I'm happy that it finally arrived.  Now to try and get it to play some sounds!

Go Up