Go Down

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

JakeSoft

@JakeSoft, is there a reason why you used a 3.3V Arduino instead a 5V version, since the WT588D is a 5V device? I am talking about the schematic in post #6. As far as I've learned by now, it is not recommended to mix 3.3V with 5V shields and vice versa... Am I missing something?

This is what I mean: http://jeelabs.org/2010/12/16/voltage-3-3-vs-5/
Hmm. Interesting read. I haven't had any problems so far, so I assume that the manufacturer of the sound board has designed the modules to handle VDD of 5V and 3.3V on VCC. Read back in this thread a bit and see the discussion BillPealer and I had about this exact topic. The summary is that if you are using the WT588D-u (with built-in USB) then you don't need a 3.3V supply in your project. If you use the 16-pin version then you do. I used the 16-pin version. Several people have built spin-off designs with 5V Minis, Nanos, etc. Feel free to use whatever you are conformable with or have on hand.

Canobi

#316
Jan 06, 2016, 12:16 am Last Edit: Jan 06, 2016, 01:20 am by Canobi
Howdy,  nother FNG question:

The WT588D and -WT588DU all seem to come with pre soldered pins.
The WT588D obviously needs the little green cpu clamp style programming box.
Though I see there is a adapter cable module for the WT588D
So I figure the WT588DU does not need to be in the board because of the USB.

But I see that all the modules come with the pins pre soldered in place,  so what do
you do?  De solder the pins so you can then attach the wires?  Or attach the wires to
the pins?

Also should I get a 16M or 32M one.  I want to order but If I have one doubt its a no go.
I've swapped mine out for regular header pins cus those turned pins are effin horrible. As Jakesoft mentioned in an earlier post, they don't fit header sockets very well either.

In this case I've fixed them in long side up so the module will work with a programmer shield I've designed for post mounted WT modules. The fem headers fit nice and snug and mostly cover the solder bumps, though I went light with the solder and used just enough to surround each pin with a slight rise:




As to mem size, 16M should be plenty unless you plan to have multiple profiles with accompanying sound sets.

Canobi

I had a rather interesting idea for an arrangement so made a quick sketch. It's late and I'm tired and need to hit the sack so theres a lot of detail missing, I just aimed to capture the jist for deeper investigation later:


stinky1

#318
Jan 06, 2016, 06:12 am Last Edit: Jan 06, 2016, 06:44 am by stinky1
I'll definetly go with the WT588DU-32.  Cause i want a lot of sounds.

You use the programmer board, but I'm goin the USB I figure.

So then you would use female pin clips with wires on the module to make the connections?
Just like computer clips ahhhh... damn I'm dense.

Or do the boards come un-soldered and are not pictured that way on Yahoo?
Desoldering that long strip would put a lot of heat onto the board.   

The Arduino definitely comes un-soldered.

? For Jakesoft
Also what voltage rating "mosfets do you use on the led's?  I know that the red can't run as much
power as the Blue and Green.  You say you run at 1amp,  but I read they run at like
3 watts Blue and Green,  and like 2.3 for the Red.    So bust out that resistor calculator thing I suppose if I want to use resistors.  I have two 18650's I'm gonna use, for power.  So I'm wondering about the levels that I would want on the RGB 3w LED I'm gonna use.  I'll read other posts as well on CSS forums.  I guess they all use 350 mah, Voltage(Vf): Red:2.0-2.5V Green:3.2-3.6V Blue:3.2-3.86.  So again mosfets, buckpucks, and capacitors. 
Maybe this?
http://www.ebay.com/itm/Water-Proof-Power-Supply-LED-Driver-for-3x3w-10w-20w-30w-50w-100w-SMD-LED-Light-/321813500544?var=&hash=item4aed945280:m:mn8PQXKV_jQqUiSktcQGv7A
As I hit the next part purchase I'm asking whats perplexin me.



Told ya I'm a noob,  If I had to write the above from memory,  good luck lol!

Ok time to order parts.





billpealer

Hmm. Interesting read. I haven't had any problems so far, so I assume that the manufacturer of the sound board has designed the modules to handle VDD of 5V and 3.3V on VCC. Read back in this thread a bit and see the discussion BillPealer and I had about this exact topic. The summary is that if you are using the WT588D-u (with built-in USB) then you don't need a 3.3V supply in your project. If you use the 16-pin version then you do. I used the 16-pin version. Several people have built spin-off designs with 5V Minis, Nanos, etc. Feel free to use whatever you are conformable with or have on hand.
The VDC-in for the WT for both versions is 2.8 -5.5v as reported by the manufacturer, and they have to at the VDD pin22. (although they show 3.3-5v in their wiring diagrams)  I have not heard of anyone saying their WT will NOT work with over 3.3v and less than 5.5v.  I think Mr. Jake said his WT non-usb will NOT work if he did not include the Vcc AND Vdd inputs. Both.  I have a connection from the Arduino Nano 5vpin going to the WT VDD and my WT VCC pin is vacant. As per my sketch.  Have you tried to eliminate the VCC on your WT and just send 5V direct to the WT's VDD via your 5v regulator, and skip a solder point, Jake?

I think it is safe to assume you do not "NEED" 3.3v for the WT at all for either model.  I think volume was the main reason you made your decision to include 5v to the WT, right Jake?  I am not super versed but VCC and VDD supply power in slightly different ways if the manufacture is labeling properly.  VCC powers a bipolar transistor and VDD powers a FET. I do not know how this may effect the WT's operations. But i do know that i don't use the VCC pin on the WT.  I also don't use the non usb version,  so speculation is in play.

billpealer

Because my software is magic! ;-)
Magic?!
oye.  Dude, what do you use the BusyPin for?  it is not being called to do anything in the WTSendCommand.



JakeSoft

Have you tried to eliminate the VCC on your WT and just send 5V direct to the WT's VDD via your 5v regulator, and skip a solder point, Jake?
Yes, I did try it. I didn't work. I first used the WT588D-u and assumed I could wire the 16p the same way; you can't. Please, someone else try this and confirm, but it never works for me unless I put voltage to both the VDD and VCC pins on the 16-pin modules.

Dude, what do you use the BusyPin for?  it is not being called to do anything in the WTSendCommand.
I use it for a few things in my code. The most important is sound calibration. I never show it in my videos, but I have a routine that plays each sound and measures how long it took to play and then stores off that timing data. Notice how my blade ramp-up and ramp-down effects are closely synchronized with the power-up and power-down sounds? Notice how my clash sounds are never interrupted by a swing sound? I know how long each sound takes to play. Those values are not hard-coded, they are dynamically captured. This allows me to change sounds without having to recompile my code.

billpealer



I use it for a few things in my code. The most important is sound calibration. I never show it in my videos, but I have a routine that plays each sound and measures how long it took to play and then stores off that timing data. Notice how my blade ramp-up and ramp-down effects are closely synchronized with the power-up and power-down sounds? Notice how my clash sounds are never interrupted by a swing sound? I know how long each sound takes to play. Those values are not hard-coded, they are dynamically captured. This allows me to change sounds without having to recompile my code.
i thought you used it to get the 3axis to ground.  but i think any pin set to input and LOW in Arduino is ground.

JakeSoft

i thought you used it to get the 3axis to ground.  but i think any pin set to input and LOW in Arduino is ground.
Did you quote the correct post? I was talking about the WT588D sound module but now you seem to be talking about the ADXL335 accelerometer. You are correct however that any pin set LOW then effectively becomes a ground. I did exploit that when I soldered the ADXL335 GND pin to an arduino I/O pin. I just set the I/O pin to ground and it works great.

billpealer

Did you quote the correct post? I was talking about the WT588D sound module but now you seem to be talking about the ADXL335 accelerometer. You are correct however that any pin set LOW then effectively becomes a ground. I did exploit that when I soldered the ADXL335 GND pin to an arduino I/O pin. I just set the I/O pin to ground and it works great.
no missquote,..  but i thought your "magic software" was going to tie in the WT BusyPin to arduino pin13 and then the ground of the 3axis.  from how i understand the busypin,  it is more or less a ground gate.  opening and closing ground when the sound module is actively playing sound.  like how a MOSFET works.  a ground switch.

I have over come my audio triggers by only using 5 sounds, and i know the duration in ms for each.  i do though have my swing sound delays shorter than their actual duration,.  so a Swing can lead to a Clash prior to the swing resolving.  but a clash will always resolve to full decay. then allow for another swing, or clash there after.

in the Hasbro sabers there are 2 swing sounds..  a single and double. 

it would be cool, if you could in the code make it read a clash to lock up, as a clash sensor trigger with no swing trigger,..  meaning a clash followed by NO movement would inherently be a bind or lock up. play lock up sound and loop it till movement,.. ie  a swing or clash.  i have tried with no avail.

Protonerd

I guess it would be quite a challenge to "motion detect" a blade lock-up...even when the blades collide, the opponents try to force they way past the guard of the other and they struggle, i.e. there is still constant motion. That is why usually a 2nd switch is used to trigger a lock-up (I use the same as the one used to trigger blaster block and used to step through the different sound fonts).

JakeSoft

I guess it would be quite a challenge to "motion detect" a blade lock-up...even when the blades collide, the opponents try to force they way past the guard of the other and they struggle, i.e. there is still constant motion. That is why usually a 2nd switch is used to trigger a lock-up (I use the same as the one used to trigger blaster block and used to step through the different sound fonts).
Yeah, I did something similar on mine with a second button. You can see it in action in my Mk. II video. It's equivalent to the the infamous "aux switch" that the commercial sound cards sometimes employ. It does kind of break the illusion of being in a real saber fight because you have to remember to push the button, but it seem to be the standard way to handle it in a way that is reliable and the user can trigger it at appropriate times vs. trusting the software to figure out what's going on in the fight. It is still an interesting idea to try to have it happen automatically, but I'm not sure how you'd do it consistently. Maybe a quick press of the aux or activation switch would prime it such that the next clash impact event would trigger a lockup sound instead of a clash? I like mine the way it is, but that might work if someone wants to try it.

Canobi

How about making a loop out of a length of force sensitive resistor strip to fit inside the rim of the blade seat/emitter neck?

https://www.sparkfun.com/products/9674

ok, so I'm only guessing at this point which means it's probably not quite as simple as I make out but could the coding go something like:  If resistance drops below x threshold for y amount of time, you have a "trigger lockup sound" scenario?

While I'm on that train of thought, could the resistance threshold setting could be made adjustable as well to give different sensitivity levels?

jshaw

How about making a loop out of a length of force sensitive resistor strip to fit inside the rim of the blade seat/emitter neck?

https://www.sparkfun.com/products/9674

ok, so I'm only guessing at this point which means it's probably not quite as simple as I make out but could the coding go something like:  If resistance drops below x threshold for y amount of time, you have a "trigger lockup sound" scenario?

While I'm on that train of thought, could the resistance threshold setting could be made adjustable as well to give different sensitivity levels?
I'm not sure a ring of it would even be necessary. In theory, a lock up would be pressure from the front of the blade, meaning that the base of the blade would be pushing forward. So, if one were to countersink one of these on the front of the blade chassis, then I think one could detect a lockup based on duration of pressure.  Theoretically, of course.

ryang

I'm not sure a ring of it would even be necessary. In theory, a lock up would be pressure from the front of the blade, meaning that the base of the blade would be pushing forward. So, if one were to countersink one of these on the front of the blade chassis, then I think one could detect a lockup based on duration of pressure.  Theoretically, of course.
That sounds like it would work quite well.  You'd have to always have the lightsaber the one way though.  Align it with the switch to your natural hold, would suffice.

Adafruit calls it like it is though - https://www.adafruit.com/products/166
"These sensors are fairly low cost, and easy to use but they're rarely accurate. They also vary some from sensor to sensor perhaps 10%. So basically when you use FSR's you should only expect to get ranges of response."

And it's a log scale as well, so you'd hope the pressure would be sufficiently different to it's "resting" pressure..  Would need investigation!!  :)

Go Up