Go Down

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

DJWing79

the carbon said it was really tough...the PLA i already printed (with 20% infill) is already really strong

JakeSoft

Not saying that's how it is, just how it looks. As I haven't recieved my order yet I can't confirm either way but will find out once I have them.


I just looked into these today and holy cow, they are cheap! And easy to find! I can find them on eBay, a lot of 10 for under $5 shipped?! If these work then it's a no-brainer to add one if if you want more loud in your saber. Looks like it expects line level input, though. Will probably have to use DAC output on the WT588D.

Has anyone had a chance to try out these modules yet?

stinky1

#362
Jan 09, 2016, 02:27 am Last Edit: Jan 09, 2016, 02:53 am by stinky1 Reason: Found sumpthin new!!
ooh looky what I found!

LESSON 13: Controlling an RGB LED with Arduino

https://www.youtube.com/watch?v=gqAHOoqo3OI
http://www.toptechboy.com/arduino/lesson-13-controlling-rgb-led-with-arduino/

https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds

Figuring out the ratings to the mosfets is beyond me though. Figured out resistors. Guess that will be the next search.

WOWSERS!  Looks like this fixes all,  or at least will help speed up making the circuit for schmucks like me!



https://solarbotics.com/product/60160/

DJWing79

@billpealer,

if the blade holder isn't strong enough with 3d printed material, then i'd have to use a standard blade holder, and unfortunately I guess TCSS won't give out the thread specs

DJWing79

oh and I forgot to say, my hilts are 1.65 in in diameter with the inner diameter at 1.26 in. So almost .4 in thickness, am hoping it's thick enough to withstand abuse, especially with the carbon...have to wait on my stainless steel extruder

jshaw

ooh looky what I found!

LESSON 13: Controlling an RGB LED with Arduino

https://www.youtube.com/watch?v=gqAHOoqo3OI
http://www.toptechboy.com/arduino/lesson-13-controlling-rgb-led-with-arduino/

https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds

Figuring out the ratings to the mosfets is beyond me though. Figured out resistors. Guess that will be the next search.

WOWSERS!  Looks like this fixes all,  or at least will help speed up making the circuit for schmucks like me!



https://solarbotics.com/product/60160/
Yeah, I'm still working through what mosfets I'll need for mine... 

As for that solarbotics LED, that would be ideal for some of us, but at 1.9", it's probably too large for most hilts.  I know my Graflex ID is ~1 3/8", so certainly too small for that LED cluster.

JakeSoft

#366
Jan 09, 2016, 04:54 am Last Edit: Jan 15, 2016, 03:46 am by JakeSoft Reason: Updating X/Y/Z pins per later post from Canobi.
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
OK, I adjusted my I/O pin assignments to comply with this and got it working on my breadboard. I'm including the code for the header file that defines the pins in case anyone else wants to make software compliant with Canobi's PCB.

@Canobi: Check this out and confirm it looks right to you.

Code: [Select]

/*
 * Pins_Canobi.h : Defines pinout for Canobi's 3-channel PCB.
 *
 *  Created on: Jan 8, 2016
 *      Author: JakeSoft
 */

#ifndef PINS_CANOBI_H_
#define PINS_CANOBI_H_

//General I/O Pins
#define CLASH_PIN 2 //Clash sensor interrupt pin
#define LED_RED_PIN 3 //PWM output for RED LED
#define LED_GREEN_PIN 5 //PWM output for GREEN LED
#define LED_BLUE_PIN 6 //PWM output for BLUE LED
#define ACTIVATE_PIN 7 //Activation switch
#define AUX_PIN 8 //Aux switch
#define LED_FOC_PIN 9 //Flash-on-clash LED (not implemented by JakeSoft SW)
#define ACCENT1_PIN 10 //Accent LED
#define ACCENT2_PIN 11 //Secondary Accent LED (not implemented by JakeSoft SW)

//Serial pins for WT588d Sound board
#define WT588D_BUSY 12 //Module pin "LED/BUSY"
#define WT588D_SDA 13 //Module pin for DATA

//Accelerometer Pins
#define AXDL335_Z_PIN A0 //Z axis
#define AXDL335_Y_PIN A1 //Y axis
#define AXDL335_X_PIN A2 //X axis
#define AXDL335_VCC_PIN A3 //Accel power (not used by Canobi's PCB)
#define AXDL335_GND_PIN A4 //Accel ground (not used by Canobi's PCB)

#endif /* PINS_CANOBI_H_ */




purgedsoul

I just looked into these today and holy cow, they are cheap! And easy to find! I can find them on eBay, a lot of 10 for under $5 shipped?! If these work then it's a no-brainer to add one if if you want more loud in your saber. Looks like it expects line level input, though. Will probably have to use DAC output on the WT588D.

Has anyone had a chance to try out these modules yet?
Loud, like really loud. I had to lower the WT volume.

JakeSoft

Loud, like really loud. I had to lower the WT volume.
Awesome. Did you have to use DAC on the WT, or were you able to use the differential PWM outputs?

billpealer

#369
Jan 09, 2016, 04:51 pm Last Edit: Jan 09, 2016, 07:02 pm by billpealer
oh and I forgot to say, my hilts are 1.65 in in diameter with the inner diameter at 1.26 in. So almost .4 in thickness, am hoping it's thick enough to withstand abuse, especially with the carbon...have to wait on my stainless steel extruder
.4" IS thick.  post a video maybe of some combat, illustrating the results.

DJWing79

I plan to, will not have electronics in it (for obvious reasons if it fails). I have to finish printing out all the parts, but I think I might have solved the alignment issue. I am printing a part that has the threads all the way through (1.43in x 12) and another piece that threads into it but has threads only halfway down and the other half isn't threaded...what I will do is thread it down until the notch on both pieces aligns and then I will mark it, and then I should know the depth for each piece. I sure hope it works.

amine2

very cool (y) :D .
though  , you could make those sound effects with some math and the PWM outputs , or if you want some specific sounds you can use interrups , an 8bit DAC and an SD card (lower quality but it will work well) .
that way you would not need a chip . though as it is the project is really cool (y)
it's all about the melons .

Canobi

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
That was pretty much the scenario until hilt diameters were discussed. I always thought saber hilts were approx 1.25" OD but that appears to be smaller than some of the IDs mentioned so will need to reassess my build strategy and materials. Gives a lot more room in terms of PCB space though so I may not have to keep trying to make them as small as I originally thought.

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  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.
My aim has always been to make the PCBs as simple and easy to work with as possible and not just for the unskilled either as I happen to be one of those people that use a cheap £20 iron. I even fabricate my boards using home contructed equipment.

My pride and joy is a mini PCB drill press I built from scrap A/C inverter drive heatsinks and other reclaimed parts I got from work:






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?
Cool :)

The second accent LED is only really a suggestion. I broke out the unused pin in case someone writing their own code for the board had a reason to use it as it could also be used for other PWM type shenanigans.

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?
My apologies, my asperger's can sometimes make my thinking a little black and white and does indeed fill the gaps with all sorts of assumptions so I've amended the layout. All four channels are now resistor free.

Here's a smaller lower res pic of the board:



Dropbox link to high res image (it's quite big though):

https://www.dropbox.com/s/0uoptk965n55yl0/WrenagadeTech%E2%97%8F%C2%B0_%20Saber%20fx%20PCB%20%28ADXL%20varient%29.jpg?dl=0


@Canobi: Check this out and confirm it looks right to you.

Code: [Select]

/*
 * Pins_Canobi.h : Defines pinout for Canobi's 3-channel PCB.
 *
 *  Created on: Jan 8, 2016
 *      Author: JakeSoft
 */

#ifndef PINS_CANOBI_H_
#define PINS_CANOBI_H_

//General I/O Pins
#define CLASH_PIN 2 //Clash sensor interrupt pin
#define LED_RED_PIN 3 //PWM output for RED LED
#define LED_GREEN_PIN 5 //PWM output for GREEN LED
#define LED_BLUE_PIN 6 //PWM output for BLUE LED
#define ACTIVATE_PIN 7 //Activation switch
#define AUX_PIN 8 //Aux switch
#define LED_FOC_PIN 9 //Flash-on-clash LED (not implemented by JakeSoft SW)
#define ACCENT1_PIN 10 //Accent LED
#define ACCENT2_PIN 11 //Secondary Accent LED (not implemented by JakeSoft SW)

//Serial pins for WT588d Sound board
#define WT588D_BUSY 12 //Module pin "LED/BUSY"
#define WT588D_SDA 13 //Module pin for DATA

//Accelerometer Pins
#define AXDL335_X_PIN A0 //X axis
#define AXDL335_Y_PIN A1 //Y axis
#define AXDL335_Z_PIN A2 //Z axis
#define AXDL335_VCC_PIN A3 //Accel power (not used by Canobi's PCB)
#define AXDL335_GND_PIN A4 //Accel ground (not used by Canobi's PCB)

#endif /* PINS_CANOBI_H_ */

Looks a OK :)

I still need to finish updating the identifier silk to reflect the new changes, so ignore the labals in the pic(s) for the LED output array as they will change (as will one or two other minor details no doubt).

Canobi

On second thought, perhaps the only change I'd make would be to rename "second accent led" to "PWM output" as it's more generic.

JakeSoft

That was pretty much the scenario until hilt diameters were discussed. I always thought saber hilts were approx 1.25" OD but that appears to be smaller than some of the IDs mentioned so will need to reassess my build strategy and materials. Gives a lot more room in terms of PCB space though so I may not have to keep trying to make them as small as I originally thought.
I think a good design target is to not make the board any wider than 1". That way it'll fit inside PVC that is commonly used to make lightsabers. The 1" PVC electrical conduit is also commonly used to make sleds and chassis for lightsabers, so fitting inside those would be a boon. 1" will easily fit inside MHS parts which typically have in ID of 1.25".

My pride and joy is a mini PCB drill press I built from scrap A/C inverter drive heatsinks and other reclaimed parts I got from work:
Cool setup. You're quite handy! I can drill and tap holes and cut things with a rotary tool. That's about the extent of my metal-working skills. (I told you I hate fabricating!)

My apologies, my asperger's can sometimes make my thinking a little black and white and does indeed fill the gaps with all sorts of assumptions so I've amended the layout. All four channels are now resistor free.
No worries. That's the advantage of working collaboratively, many ideas make for better product.

Here's a smaller lower res pic of the board:


This looks pretty good. If you are still including the LP2992 LDO as an SMD component? If so, I'd suggest just routing power from that to the VCC on the arduino for the 3.3V version if you can. The drop out voltage on that part is going to be better than anything you'll get from the on-board regulator on the Arduino, especially some of the clones. In fact, I've had some bad experiences with Arduino Pro Mini 3.3V clones using sub-spec onboard regulators that cut out at 5 volts! That won't fly when you're running a 3.7V battery.

I have taken a hard look at the drawing you posted. I have a few comments and suggestions. Do with them what you will. There is really only one error that I noticed, the rest are just ideas for improvement.

1) The mappings for the Busy and VCC (3.3V) pins on the WT588D are each off by one pin. The Busy pin is right next to the VDD pin and the VCC pin is right after that. (VDD, BUSY, VCC, with no skipped pins).
2) You may not need to leave room for the clash sensor. They work best when placed as close to the blade as possible, but people often mount their soundboards close to the pommel. This means that folks will likely run wires from the board up the hilt toward the blade anyway for their clash sensor. It's OK to leave it as is, I'm just pointing out that the space may not be used often. It's an opportunity to make the board smaller, maybe.
3) If you still plan to include the LP2992 LDO, just run power from that to the VCC pin on the arduino (at least for the 3.3V version) and the VCC pin of the WT588D as well. It makes the entire part a 3.3V device with the option to add an LDO or buck to boost power to the VDD on the WT588D for more performance if desired. Otherwise, just bridge the WT588D's VDD to 3.3v as well and call it a day.
4) Why not route pins 2, 3, 5, 6, and 9 toward the inside of the board and take pins 7 (Activation Switch) and 8 (Aux Switch) out to the edge of the board? That way nobody has to solder wires for their switches to the middle of the board. I can see that becoming a big pain, especially if there is a PRO-Mini sitting on the other side and you can't thread the wire through to solder it in through-hole fashion after the MCU is mounted. The signals from the other pins never leave the board, so they don't need that premium edge real estate.

That's all for my notes. Don't take that laundry list to mean I'm not impressed; I really am. I'm excited and look forward to working out a way to combine your board with my software.



Go Up