RGB lightsaber

What are you developing?
Post Reply
racemaniac
Posts: 618
Joined: Sat Nov 07, 2015 9:09 am

RGB lightsaber

Post by racemaniac » Fri Dec 18, 2015 11:19 pm

Here is my first project with a maple mini: an rgb lightsaber :)
https://www.youtube.com/watch?v=l2rgkSTRw_s

a maple mini controlling it all (and loving it for the extra flash memory that allowed me to store the 8 bit sound samples on it :D)
it uses ws2812b ledstrips for the lights (and i diffused them with some white foil, so irl you see the leds a bit, but it still looks very well)
and put a tda2003 amp and an 8bit dac in there to get some sound :).
Glad i got it working well enough as the 7th movie is released :).

on my todolist:
-replace the tda2003 with a small class D amp, will save me a lot of room, and it's not as if i've got room to spare (the heat is okay, it's only putting out about 2W, and has got a small heatsink on it, but still, in that small place...). and also put a better dac on it, 12 or 16 bit, i'll see what i can find that looks good enough :).
-add a motion sensor, and program it to detect swings & clashes :) (and maybe also a button so you can decide to play reflecting weapon fire sounds).
-see if i can add an sd card for the sound samples, 120k really isn't much space to play around with :). certainly not if i want to add swing & clash sounds :).

simonf
Posts: 180
Joined: Sun Jul 26, 2015 4:03 pm

Re: RGB lightsaber

Post by simonf » Sat Dec 19, 2015 1:54 am

maybe if you wanted to cheat you could use one of these.http://www.aliexpress.com/item/1PCS-Min ... eb201560_3

It will act as a small amp and play the stored sounds. I don't know how fast you can switch between sounds but it seems a cheep thing to use.

zmemw16
Posts: 1484
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RGB lightsaber

Post by zmemw16 » Sat Dec 19, 2015 2:07 am

maybe if you left an opening all the way from pommel to tip for ventialtion?
maybe add nrf24's and mini somethings, send settings from wrist unit or do it with micro and buttons inside the grip?

on small spaces and heat

decades back i had honda cd175 with 6v battery
well it got modified with a halogen 12v headlight running off an inverter, diode bridge block was chunky
and as it rattled about a bit, a bit of rag got chucked in the space with it.

70mls down the M6 whilst in the outside lane, i had a rather spectacular 12" square plume of smoke pouring out the side panel.
now in order to get to that space requires removal of the seat, held by 2 severely rounded 13mm head bolts,
removal of tank as in petrol and i had to take all my luggage off to start.
then i just grabbed the flames and heaved; ruined my gloves.

it ended with the bike 3/4 in and the rest hanging out the boot of a very big booted car, driving round Birmingham looking for a complete wiring harness. (there used to be a large industry supplying all sorts of 'patent' bits for motorcycles, name?????)

stephen

racemaniac
Posts: 618
Joined: Sat Nov 07, 2015 9:09 am

Re: RGB lightsaber

Post by racemaniac » Sat Dec 19, 2015 7:21 am

simonf wrote:maybe if you wanted to cheat you could use one of these.http://www.aliexpress.com/item/1PCS-Min ... eb201560_3

It will act as a small amp and play the stored sounds. I don't know how fast you can switch between sounds but it seems a cheep thing to use.
Looks nice :). but i like figuring out the things myself :). I'm a pretty decent programmer (better than i'm at electronics :p, and a lot better then i'm at working the metal handle >_<. the poor handle has some nice scars to show for it XD), so i like the challenge of figuring if i can store wavs on the sd card, and get them in memory fast enough when i want them. For the current saber i also had basic compression code ready (huffman coding, nothing fancy like mp3 :)) in case i didn't have enough memory for what i was doing now, so i could use the memory even more efficiently :).
And mp3 & microcontrollers aren't the best mix >_<, i'm looping the sounds (which is also usually fails to be seamless with mp3's), and the samplerate doesn't have to be that high to be decent (atm it's 16khz for the light up/down sounds, 8khz for the idle hum which is very low). Not sure where exactly i'll end up, but i'll figure something out :).
zmemw16 wrote:maybe if you left an opening all the way from pommel to tip for ventialtion?
maybe add nrf24's and mini somethings, send settings from wrist unit or do it with micro and buttons inside the grip?

on small spaces and heat

decades back i had honda cd175 with 6v battery
well it got modified with a halogen 12v headlight running off an inverter, diode bridge block was chunky
and as it rattled about a bit, a bit of rag got chucked in the space with it.

70mls down the M6 whilst in the outside lane, i had a rather spectacular 12" square plume of smoke pouring out the side panel.
now in order to get to that space requires removal of the seat, held by 2 severely rounded 13mm head bolts,
removal of tank as in petrol and i had to take all my luggage off to start.
then i just grabbed the flames and heaved; ruined my gloves.

it ended with the bike 3/4 in and the rest hanging out the boot of a very big booted car, driving round Birmingham looking for a complete wiring harness. (there used to be a large industry supplying all sorts of 'patent' bits for motorcycles, name?????)

stephen
I think with a class D amp, heat will be less of a problem (even the TDA2003 usually behaves pretty well :). i think the only moments i have heat problems is when there is something wrong with my speaker. i think it sometimes makes a near short circuit somewhere, i have to isolate its wires better, and then ofcourse the amp gets hot (and the sound pretty silent >_<). When i made that movie, the saber was on for 5 minutes with a lot of going on and off (which are the loud noises), and it was just a bit lukewarm :). ) But i'm going to replace it anyway, with all the capacitors & other stuff i need around it for it to work, it's really too big for such a project >_< (but loved learning how to use it. I used it with a very simple DAC that's basically an R2R ladder, and its signal was too weak, so i had to add an lm386 in between as a preamp XD.).
Now ordered a tiny board with a PAM8403 on it. For my TDA2003 i had to add a seperate 9V battery to drive it, the PAM8403 can just run of the voltage of my lithium battery that also drives the leds. so that will make everything a LOT easier :).

And love your wireless comunciation idea :). I actually have some nrf24's on the way to me from china do to some testing with. what i am wondering is where i'd have to put it, the handle is metal, so i'm wondering if that wouldn't just block its signals. I'm also going to experiment a bit NFC tags soon, and maybe having tags that would determine its color would be fun :) (but probably same issue with the metal :p. and the board i currently ordered is too big to fit inside the saber).

And loved your small places & heat story XD. To be sure of what i made so far, i already did some heat testing of the parts i was afraid of :). The blade itself is basically 2 ledstrips wrapped in foil/cloth to diffuse them, so also a thermal nightmare XD. but i did a test running them full white for 15 minutes at the highest voltage my lithium battery would be able to give (4.2V), and then it got pretty warm :). So since i usually make colors (and thus use a lot less power), it's good enough as it is :). if you'd use it for a long time at once, you might get issues, but i could always put a small thermal sensor near the ledstrips, and add some safety :).
And the sound usually is okay, but my crappy speaker assembly (also done to save some room, i had to remove the original attaching points for the wires) sometimes (nearly?) shorts out, and then of course the amplifier gets hot XD.

racemaniac
Posts: 618
Joined: Sat Nov 07, 2015 9:09 am

Re: RGB lightsaber

Post by racemaniac » Sat Dec 19, 2015 11:10 am

simonf wrote:maybe if you wanted to cheat you could use one of these.http://www.aliexpress.com/item/1PCS-Min ... eb201560_3

It will act as a small amp and play the stored sounds. I don't know how fast you can switch between sounds but it seems a cheep thing to use.
and one more response to this: i saw someone on arduinoforum who used a WT588d board in combination with an arduino for sound for his lightsaber, they are also sold on aliexpress, and it looks like a great sound module :).

simonf
Posts: 180
Joined: Sun Jul 26, 2015 4:03 pm

Re: RGB lightsaber

Post by simonf » Sat Dec 19, 2015 1:48 pm

Technically you only need one buzz sound for the light sabre and the collision sounds because of the Doppler effect you can just increase the playback rate if its accelerating and reduce it if decelerating. You could increase the volume if the sabre was tilted up in the air and down if toward the ground.

racemaniac
Posts: 618
Joined: Sat Nov 07, 2015 9:09 am

Re: RGB lightsaber

Post by racemaniac » Sat Dec 19, 2015 1:53 pm

simonf wrote:Technically you only need one buzz sound for the light sabre and the collision sounds because of the Doppler effect you can just increase the playback rate if its accelerating and reduce it if decelerating. You could increase the volume if the sabre was tilted up in the air and down if toward the ground.
hmm, didn't think of that :). I'l definitely give that a try too :). didn't expect to get that many fund suggestions when i posted this XD
i'll never be completely done building this thing >_<

zmemw16
Posts: 1484
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RGB lightsaber

Post by zmemw16 » Sat Dec 19, 2015 3:38 pm

waving it about is all well and good, what about against another blade?
srp

racemaniac
Posts: 618
Joined: Sat Nov 07, 2015 9:09 am

Re: RGB lightsaber

Post by racemaniac » Sat Dec 19, 2015 4:04 pm

zmemw16 wrote:waving it about is all well and good, what about against another blade?
srp
i haven't done any really intense tests yet, but it's a polycarbonate blade, and it's securily mounted to the handle with a strong screw (and a bit of extra support of a pvc tube around it to make up for the difference in diameter between handle & blade). I've given some good whacks against my chairs, and it doesn't mind :). I'm atm more concerned about the electronics inside which aren't of such high quality yet (but they ofcourse move less). One of my goals was to have it battle worthy, and i should already be pretty close (if not there already).

zmemw16
Posts: 1484
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RGB lightsaber

Post by zmemw16 » Sat Dec 19, 2015 5:12 pm

apols, sloppy phrasing, i was thinking of the required noises!
srp

Post Reply