Go Down

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

JakeSoft

Found out what the issue was.

The sound files I was trying to convert were mono so I switched to a set of stereo files and it worked a treat.
That's still strange. All of the files I have used are mono. There must have been something else that it didn't like. But, as long as you are able to move forward, I guess just go with it.

Canobi

Oh? that is a bit weird then.

Quick question regarding the hum. I know some have layered it onto the clash/swing sounds.

The hum I have is nearly 30 seconds long so it'll need trimming down but not sure what the optimum duration for the trick to work is (if there is one), or if length is just down to memory size.

JakeSoft

#797
Apr 03, 2016, 05:09 pm Last Edit: Apr 03, 2016, 05:13 pm by JakeSoft
Oh? that is a bit weird then.

Quick question regarding the hum. I know some have layered it onto the clash/swing sounds.

The hum I have is nearly 30 seconds long so it'll need trimming down but not sure what the optimum duration for the trick to work is (if there is one), or if length is just down to memory size.
There is no set length as long as you aren't running out of flash memory. However how the sounds blend together is impacted by what part of the hum you choose to layer into the other sounds (swing, clash, etc.). Assuming your hum loops seamlessly if played back-to-back, copy a portion of the hum from the end and merge it with your other sounds so that when the sound is done playing, it will transition smoothly into the idle hum sound.

Hum....[clash event]Clash+End_Of_Hum...Hum...Hum...Hum...

billpealer

I would not suggest those, the highest 18650 capacity is 3400mah from phillip NCR cells that are pretty expensive. Those are probably some 14500 cells inside a 18650 body with a usb lipo charger, probably a 900mah actuall capacity.
concur.

Protonerd

concur.
Thanks splinter and bill for the feedback. The form and charging with USB sure makes it interesting, but what you write makes sense, probably they cannot squeeze the same capacity in and still include an USB connector. Everything comes with a price. I was just happy to happen upon this ad due to the conversation we had about USB charging of the battery cell.

splinter182

Thanks splinter and bill for the feedback. The form and charging with USB sure makes it interesting, but what you write makes sense, probably they cannot squeeze the same capacity in and still include an USB connector. Everything comes with a price. I was just happy to happen upon this ad due to the conversation we had about USB charging of the battery cell.
No problem! Didnt want you to try it and be disaapointed in the end.

My preferred set up is an 18650 cell in a battery holder wired to a recharge port and kill key. That way you never have to take a apart the saber to charge the battery but you can still replace the battery if you need to. There are many ways to charge it too, a usb single cell lipo charger are really cheap or if you want faster charge times you can buy a charger from one of the saber makers like saberforge or ultrasabers that already have the 2.1mm plug for the recharge port.

destructables

So I'm making progress finally. One line with the WT, working on merging the MPU 6050 code into the design.. but I have what's probably a dumb question:

How the heck do you make a menu work for this? like?? I've been racking my brain.. and I just can't seem to get it.

splinter182

So I'm making progress finally. One line with the WT, working on merging the MPU 6050 code into the design.. but I have what's probably a dumb question:

How the heck do you make a menu work for this? like?? I've been racking my brain.. and I just can't seem to get it.
A menu would require a few things.

1. A way to load and save your configuration (EEPROM)
2. A way to enter config mode. ex. long press aux button or remove kill key with a button held down, etc, etc.
3. A way to navigate the menu once in config mode. This can be done with a counter variable and a switch statement, using main and aux button as navigation buttons and long press for confirm.

if( configMode ) //check to see if we are in config mode.
{
   int buttonResult = CheckButtons(); //checks your buttons to see if you up, down or confirm was pressed.
   switch( menuItem )
   {
      case 1: //handle the button press.
   }
}

just a very simple example, could be done countless of ways.

destructables

#803
Apr 19, 2016, 04:34 pm Last Edit: Apr 19, 2016, 06:10 pm by destructables
I think I might have bought the wrong MOSFETs? Or I'm an idiot and I've wired it completely wrong.

https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=10001&langId=-1&productId=812236&storeId=10001&krypto=vFgRhKXJZKuM8sLfuPRmxv3tw%2BNp1UpMnGU4ddvL3I4WFZKPJQdG6Q%3D%3D&ddkey=https:StoreCatalogDrillDownView

I plug them in and run JakeSoft's sample uSaber code, and it will dim the LED slightly, but it won't turn off. I made sure it's on a PWM pin and everything. (Mild frustration)


EDIT: I'm an idiot. Had it backwards as a mo'suckrah.

JakeSoft

I think I might have bought the wrong MOSFETs? Or I'm an idiot and I've wired it completely wrong.

https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=10001&langId=-1&productId=812236&storeId=10001&krypto=vFgRhKXJZKuM8sLfuPRmxv3tw%2BNp1UpMnGU4ddvL3I4WFZKPJQdG6Q%3D%3D&ddkey=https:StoreCatalogDrillDownView

I plug them in and run JakeSoft's sample uSaber code, and it will dim the LED slightly, but it won't turn off. I made sure it's on a PWM pin and everything. (Mild frustration)


EDIT: I'm an idiot. Had it backwards as a mo'suckrah.
Glad you got it sorted. Also glad to hear somebody making good use of the USaber library.

destructables

Glad you got it sorted. Also glad to hear somebody making good use of the USaber library.
I won't lie, I'd be up a major creek still without it. It's helped me so much. (Plus when I get frustrated, I plug in my spare arduino with the LED sample code and resistors, and just let it run for a little while. It's very helpful to refresh my dedication by watching that led do its thing. haha!)

destructables

I've got a question. I need to step down my 7.2v 1200mah cells to power the wt588d and the LEDs (still with appropriate resistors). I bought a 5v 1a regulator when I bought my mosfets. But I'm a little scared to wire it in because I don't want to blow the regulator. I know I need capacitors (to take out noise?) to go with the regulator... But can I even use that regulator with this? I'd rather blow the regulator than the LED chip or the wt588d, but if I can avoid it all together I'd like to.

Reason I'm not using a single 3.6v cell is that the wt588d and the pro micro I'm using are both 5v. Hoping I haven't sabotaged myself with these cells.

(Actually, thinking about it... Has anyone ever used a separate standalone battery to power just the LEDs?)

JakeSoft

#807
Apr 20, 2016, 04:12 am Last Edit: Apr 20, 2016, 04:12 am by JakeSoft
I've got a question. I need to step down my 7.2v 1200mah cells to power the wt588d and the LEDs (still with appropriate resistors). I bought a 5v 1a regulator when I bought my mosfets. But I'm a little scared to wire it in because I don't want to blow the regulator. I know I need capacitors (to take out noise?) to go with the regulator... But can I even use that regulator with this? I'd rather blow the regulator than the LED chip or the wt588d, but if I can avoid it all together I'd like to.

Reason I'm not using a single 3.6v cell is that the wt588d and the pro micro I'm using are both 5v. Hoping I haven't sabotaged myself with these cells.

(Actually, thinking about it... Has anyone ever used a separate standalone battery to power just the LEDs?)
Unless your hilt is huge, you'll want to avoid trying to add a second power supply. Fitting one battery pack is hard enough.

If you are using a WT588D-U (the big one with the USB built in) then you can just power your WT588D off the 5V regulator at the VDD pin. 1A should be plenty. Everything else can get direct battery power, I think. The Pro micro has an on-board regulator, so just power it via the RAW pin by hooking your battery directly up to it. Check your specs, but I'm pretty sure it can take the 8.4V your fully charged pack will have. Use an appropriate resistor for your LED and you can power that directly off the battery as well. That should avoid blowing anything up.

destructables

Unless your hilt is huge, you'll want to avoid trying to add a second power supply. Fitting one battery pack is hard enough.

If you are using a WT588D-U (the big one with the USB built in) then you can just power your WT588D off the 5V regulator at the VDD pin. 1A should be plenty. Everything else can get direct battery power, I think. The Pro micro has an on-board regulator, so just power it via the RAW pin by hooking your battery directly up to it. Check your specs, but I'm pretty sure it can take the 8.4V your fully charged pack will have. Use an appropriate resistor for your LED and you can power that directly off the battery as well. That should avoid blowing anything up.
JakeSoft... You're a godsend. I keep overthinking it. That makes much more sense. I'll play around with it.

JakeSoft

JakeSoft... You're a godsend. I keep overthinking it. That makes much more sense. I'll play around with it.
No problem. Good luck.

Side note: I've been reading the spec sheet for the WT588D 16-pin version again. I can't seem to find where it specified that VCC had to be 3.3 volts. I thought I saw it in an application diagram somewhere, but now I don't see it. I wonder if the VCC input is 5 volt tolerant just like all of the other pins. If so, then it might be possible to power the 16-pin version with either pure 5 volt or pure 3.3V configurations instead of needing both levels for maximum loudness.

Has anyone tried putting 5V to both the VCC and VDD pins on the sound module? That would make things a lot nicer not needing a separate 3.3V supply anywhere in the system.

Go Up