Go Down

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

JakeSoft

JShaw...
WT28p set up.  with a nano,  and BTW this schematic DOES NOT CONTROL the BuckBoost with PWM LED fading. but it will turn on the buck boost, and turn it off,   meaning- no FOC and no blade up or down. effect.  just on/off LED
i can't get PWM to work with a mosfet if i move it to the LED Vout side of the Buck Step down.


i have since moved my arduino Pin that goes to the mosfet to Pin 11 for PWM, tho i haven't gotten fading to work with a Buck, and the 2 sensors to non PWM pins. it's arbitrary.  you can do what you want.   also some people put a 1kohm resistor from pin 1 to pin 3 of the MOSFET to crash the PWM signal to 0 (Ground)  for Digital (HIGH/LOW) mosfet switching, you do not need it.
You know, it occurs to me that your fading of the LED might work better if you supplied constant power to your Buck converter and moved your transistor to be between the LED and the converter.

Protonerd

If i send 8.2v and unrestricted current to my LED it will fry it.

PWM does not limit current. it really doesn't limit voltage either,  but when you go from 0 volts to 8.2v 250 times a second,..  it starts to average to lower voltages.  I COULD put 1 ohm / 2-3 watt resistors to my LEDs,..  what is what a lot of (maybe even most) people do here to protect their lights.  That could be wasting 40% of the batt power to heat loss. Bucks waste maybe 10% or less of power in the conversion process. and they can drive other components.

good review of LED control.  I read it for the first time just now,  but have been tossed most of these crumbs via the folks here and old roommates from college who are versed on the topic of Computer Science, Control Systems, and Electrical Engineering.
http://www.digikey.com/en/articles/techzone/2010/apr/how-to-dim-an-led

Buck up/downs-  or what my smarter electrical engineer pals tell me are called, constant current induction devices- limit current and convert voltage to the desired Max levels,  thru either custom set up, or the ones i use have mini potentiometers for adjustment.

Jake-----
I can't find half of this stuff anywhere ELSE but Ebay. If i do, it is often 10X the cost.  and yeah,..  it is hit or miss with 75% of it. i am tired of getting devices with ratings and specs that after testing prove otherwise.  This is a great question.  i hope someone comes forward with another provider.
Sorry, my mistake, I did not pay attention to your supply. But, what about the following: you only use 1x3.7V supply (instead of 2) and use a boost to give 5V to your Arduino. Then connect your single LED to the 3.7V with PWM. Additional advantage: less space eaten up by batteries (they are big or have limited capacity) and a smaller boost, because the "logic" does not eat so much compared to the HP-LED's.

billpealer

You know, it occurs to me that your fading of the LED might work better if you supplied constant power to your Buck converter and moved your transistor to be between the LED and the converter.
yeah,. good eye.
this diagram is for NO PWM fading,. as the mosfet arduino pin isn't even PWM.  i have rearranged things as a told jshaw for pwm.

i do have a new set up with an additional fet tween the vout of the buck and the led. still no good. i orered a new buck. maybe this one is bad.

Sorry, my mistake, I did not pay attention to your supply. But, what about the following: you only use 1x3.7V supply (instead of 2) and use a boost to give 5V to your Arduino. Then connect your single LED to the 3.7V with PWM. Additional advantage: less space eaten up by batteries (they are big or have limited capacity) and a smaller boost, because the "logic" does not eat so much compared to the HP-LED's.
yup. you are correct sir.
i DO that exactly with the saber i posted as my first build with Sw-200 sensors, back in Dec. 5v buck up, and 3.7v DIRECT to the LED, no resistors as i said,.  if you have a 3.3-3.4v LED that can take an Amp,. you don't need resistors at all, due to the internal resistance of the battery. which is about 1 ohm.  I am moving to a higher powered green Cree. so i can do more dramatic FoC. and PWM fading, and only use a buck wth the LED instead of the Arduino. i'll change this diagram to illustrate my new goal, and post a diagram for my working one battery set up.  which by the way,. is easy to make, change batts, and is cheap.

JakeSoft

yeah,. good eye.
this diagram is for NO PWM fading,. as the mosfet arduino pin isn't even PWM.  i have rearranged things as a told jshaw for pwm.

i do have a new set up with an additional fet tween the vout of the buck and the led. still no good. i orered a new buck. maybe this one is bad.
yup. you are correct sir.

Try putting your nFET on the negative side of your LED instead.

billpealer

Try putting your nFET on the negative side of your LED instead.
i have the neg out of the buck,. on the.. uh... source pin. right pin.  i have the neg of the LED on the drain. middle pin.

you think switch that?

JakeSoft

i have the neg out of the buck,. on the.. uh... source pin. right pin.  i have the neg of the LED on the drain. middle pin.

you think switch that?
That sounds right. Not sure why it doesn't work. Sorry, man; I'm stumped too.

billpealer

#516
Jan 21, 2016, 08:27 pm Last Edit: Jan 21, 2016, 09:06 pm by billpealer
That sounds right. Not sure why it doesn't work. Sorry, man; I'm stumped too.
i'm buying a new buck.
my original hypotheses was the buck actually uses a pwm or maybe a ripple freq based output,  so the negative OUT of the buck going to the source pin of the Mosfet was not syncing with the PWM on the gate pin.  so the orchestra of pulses and frequencies were out of tune.

the PWM to the buck wasn't doing "nothing". it just wasn't fading like a raw PWM to LED set up. random behavior.  from working once, to not working again, to just plain random LED intensities..  not shutting fully off.  turning off when Foc was supposed to go down.  very frustrating.

i also want to add, i can't find a single HOW To or forum that has this topic discussed. google search = ghost town. i figure because it is so simple that i am the only dolt having issues,.. or that it may be laymen's knowledge that you CANT use digital PWM and MOSFET tween an LED and Buck

DJWing79

So...one step forward, one step back.

I printed a hilt in three pieces using a 3D printer (standard PLA) and had it at 30% infill with triangular structure. the outer wall is at 1.65in and the inner wall is at 1.35in, so a total thickness of .3in, and now the results....

the physical pieces can take a major thrashing without cracking, breaking or compressing. Had my son hit the bladeholder directly at varying degrees of force and nothing. the inner core where the blade rests had no damage either. the metal screw I used as a retention piece was fine and unscrewed and rescrewed without a hiccup (printed the threads in the design).

you may be asking yourself...how do you know what the inside looks like and that there is no damage? well....that's because the hilt snapped....into three pieces...right on the 3-d printed threads. I was using 1.43inx12 ANSI threads and they couldn't take the force of the vibration from the impact. the rest of the body was fine. I am thinking about making the parts slide inside eachother until they catch and holding them together with a couple of machine screws. unless anyone has a different suggestion?


JakeSoft

So...one step forward, one step back.

I printed a hilt in three pieces using a 3D printer (standard PLA) and had it at 30% infill with triangular structure. the outer wall is at 1.65in and the inner wall is at 1.35in, so a total thickness of .3in, and now the results....

the physical pieces can take a major thrashing without cracking, breaking or compressing. Had my son hit the bladeholder directly at varying degrees of force and nothing. the inner core where the blade rests had no damage either. the metal screw I used as a retention piece was fine and unscrewed and rescrewed without a hiccup (printed the threads in the design).

you may be asking yourself...how do you know what the inside looks like and that there is no damage? well....that's because the hilt snapped....into three pieces...right on the 3-d printed threads. I was using 1.43inx12 ANSI threads and they couldn't take the force of the vibration from the impact. the rest of the body was fine. I am thinking about making the parts slide inside eachother until they catch and holding them together with a couple of machine screws. unless anyone has a different suggestion?
Have you thought about maybe printing your parts as a sleeve over some cheap brass sink tube or solid PVC pipe to reinforce it? That way, your parts are basically an attractive facade over cheap hardware store parts. Nobody will be able to tell the difference.

DJWing79

I thought about that, but I don't have the tools or know-how to cut the pvc pipe

billpealer



a buckpuck is a thing. like a branded product. it has a pwm cable if I recall.  I am not referring to a buckpuck perse . if I did my bad.

thanks for the links stinker

billpealer

#522
Jan 22, 2016, 01:02 am Last Edit: Jan 22, 2016, 01:12 am by billpealer
So...one step forward, one step back.

I printed a hilt in three pieces using a 3D unless anyone has a different suggestion?
print along another axis .  instead of cylindrical.  hemispheres. snap clam shells. your print striation will be perpendicular to the impact of combat. strong like bull.

or model your parts then cast them in polyresin.  Jake is prolly got it nailed. mixed media is where it's at. but if you want 100% pla ,  you will have to be crafty with various jacketed parts and sleeves to connect protect and look cool. maybe some epoxy is in your future. :) or 2 part weld putty

but dude.  throw up some pics.. we have no idea how you modeled or printed? what's your modeling software?  I'm totally guessing that you made cylinder based parts

I had to rotate my TIE sleds 90 degrees on the platter. the flex was snapping the fins.  now it flexes like a bow. like it should.

DJWing79

I am using Fusion 360 to model and Simplify3D to slice and print. I am printing it cylindrically, that's true, so do you think if I printed it on it's side it'd be stronger? I was printing it straight up and down.

billpealer

#524
Jan 22, 2016, 02:09 am Last Edit: Jan 22, 2016, 02:10 am by billpealer
I am using Fusion 360 to model and Simplify3D to slice and print. I am printing it cylindrically, that's true, so do you think if I printed it on it's side it'd be stronger? I was printing it straight up and down.
ok. i'll have to check those apps out.

no,..  not just length wise,.  but split.
this is what i mean. attached. disregard the other parts.


split it in halves.  clam shell. print flat side down. dome UP. No supports, there should be enough to grab on the arc.  you'll need threading and what not.  actually i have heard twist lock is very successful for printing,.  then over parts for added support.

Go Up