Go Down

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

jonnieZG

Mixing two channels playing different rythm and pitch makes sense, but when both are some kind of noise - is an overkill...

Canobi

#286
Dec 29, 2015, 11:36 am Last Edit: Dec 29, 2015, 09:38 pm by Canobi
FYI  -  here is one based on the same chip with a dual speaker set up.

http://www.ebay.com/itm/2x-PAM8403-2-x-3W-Mini-Stereo-Class-D-Audio-Amplifier-Board-5V-Amp-Module-/301834046185?hash=item4646b60ae9:g:GfAAAOSwEetWBDws

i have to say,.  stereo in,..  but it looks like mixed mono out.  um,..  BOOOOOO!!!

at least the one in the link about has the mono and stereo wiring illustrated. dual speakers with 2 WTs is a neat idea Jake.  it's not true mixing,..  but rather..  a concert!
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.

<edit> is your "um,..  BOOOOOO!!!" comment aimed at my electronics knowledge, the suggestion of a mixed mono output, both or something I'm not getting? Sorry, I'm asperges and not sure how to properly respond to that comment so will do my usual and cover that disadvantage up by presenting facts as I see them. In this case by scaling the two chips and making a diagram for the mono amp to compare them:


ryang

#287
Dec 30, 2015, 03:29 am Last Edit: Dec 30, 2015, 03:35 am by ryang
Been following this post for a while - conveniently timed with my own foray into an Arduino saber!  Great work by all involved! :)

I'm personally using kit from DFRobot, with a couple of changes - specifically the MP3 player & 6DOF gyro.
http://www.dfrobot.com/wiki/index.php?title=Beetle_SKU:DFR0282
http://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299
http://www.dfrobot.com/wiki/index.php/6_DOF_Sensor-MPU6050_(SKU:SEN0142)

Proved incredibly simple to setup and use.  Numbered the MP3s, with some text afterwards for my own use, initialised and was outputting sound in seconds!

I ended up removing the header pins on the final product to cut down on space.  Stuck it opposite the Beetle and ended up with a tiny little unit!

Now, the gyro is the tricky part - as mentioned.  I'm still tweaking the code, but it's pretty damned good so far - modest I know!

It's only pulling in the accel values and calculating direction and velocity - anything over a certain value is consider a "swing" and plays the according sound.  If direction changes and velocity is acceptable again, play another swing..

I haven't had a good crack at clash detection yet (too busy prepping another saber!!), but it should be relatively straight forward. if(swinging && deceleration > whatever) CLASH!!  Knowing my luck it won't be that easy though! LOL


Edit: And then I notice Protonerd's post...

Protonerd

@ryang: as far as programming the MPU6050 chip is concerned you seem to be further ahead as I'm. I still use the raw acceleration values with different thresholds for swing and clash, but your idea with calculating the velocity got me thinking. I like it!

But first I want to make that damn interrupt triggering to work. It seems that just before Xmas on my bench I made some progress (i.e. somehow the MPU6050 did send interrupts if certain preset acceleration values were exceeded), but I could not try it with my saber because it had got a short somewhere (preatty difficult to maintain a development saber...)
If I can make it work, I will post the code (for a little background, I made a research in the net, so far it seems that no one could conjure out any interrupt from said chip, some even went so far as to state that this feature is buggy...I still cannot say for sure, but I got some kind of response)

stinky1

#289
Dec 31, 2015, 01:19 am Last Edit: Dec 31, 2015, 10:55 pm by stinky1
Looking for some advice for parts purchase :


MINI USB Nano V3.0 ATmega328P CH340G 5V 16M-has usb-5v
probably use this.

High-quality WT588D-16p- needs module programmer board-  or can you program pins?

voice WT588D-U-32M voice module 5V Mini USB interface- has usb- port 5v
probably use

ADXL335 3-5v op voltage-probably use


3W cree RGB-probably use
5W cree RGB

Panasonic 18650=unprotected 1x or 2x? definie use

Protection Circuit Module PCB PCM for 7.4V 7.2V 2S Li-ion Li-polymer battery
   do you put in a resistor to limit the voltage to 5v on the boards?
   Put in Protection Circuit Module PCB PCM in charging circuit, or
            just get a two cell charger if don't want to recharge in saber.
UPDATE: OK RE-READING THE BOARD AND FOUND THAT THE ARDUINO HAS
5V VOLTAGE REGULATION.  STILL WONDERING ABOUT THE rgb BELOW.

I have read that generally a single LED runs fine on 3 v unregulated battery,
but I'm guessing color change RGB will need 2x 18650's.  I don't think it will
run 12-15 watts on a 5w cree RGB running 3 lights on etc in color mixing.

Anyways if someone could cull up a parts list for this build it would be appreciated.
Next I have to think switches. Like the lit circle one.

Oh and will 2x side by side battery box work in 1" drainpipe hilt,  or two single holders in a line,  or
just solder 2 together and heat shrunk with connector?  I think I saw some single cases with solder tabs.

Oh and a breadbox is a must I suppose...  god sorry it's been 30 years since i done anything like this.
Parts are scarce at the Custom Saber Shop,  so I figured I'd iron out the guts before assembling saber.

Canobi

Just finished fabricating the first of a new set of arduino saber system PCBs I've been working on with DJWing 79. Loads of changes and improvement over the last ones and way simpler to make at home:



I'll make the artwork PDFs available once we've had a chance to test them properly.

jshaw

That pcb is intriguing!

So, working on my wiring, using a 3.7 V 1200 mah li-ion battery and a 3.3 V arduino connected to a Tri-Rebel Luxeon (wired independently), and I'm not convinced it's bright enough to light a 30"+ blade without some tweaking.

What do you folks think? Should I drop a buck puck in, or should I use the adjustable outputs to use a value other than HIGH?

Canobi

That pcb is intriguing!

So, working on my wiring, using a 3.7 V 1200 mah li-ion battery and a 3.3 V arduino connected to a Tri-Rebel Luxeon (wired independently), and I'm not convinced it's bright enough to light a 30"+ blade without some tweaking.

What do you folks think? Should I drop a buck puck in, or should I use the adjustable outputs to use a value other than HIGH?
Thanks :)

The boards work with 3v and 5v pro mini, though the input voltage can be higher. Also, the WT's audio outputs (DAC and PWM) have been broken out for easy access. The only real difference between them is that they support an increased number of high power LEDs (1~4).


As to the tri-rebel brightness, have you tried lighting up 30"+ with it, you may be suprised, I use 1w LEDs all the time with great results:



For 1w, how even it looks depend on the blades mod cons, usually cobinations of light tube, diffusion and tip mirror which I employ most of the time.

JakeSoft

Just finished fabricating the first of a new set of arduino saber system PCBs I've been working on with DJWing 79. Loads of changes and improvement over the last ones and way simpler to make at home:



I'll make the artwork PDFs available once we've had a chance to test them properly.

Oh, cool. I wish I were better at fabricating, but the whole process is more than I want to get into.

CrossRoads

#294
Jan 02, 2016, 05:07 am Last Edit: Jan 02, 2016, 05:10 am by CrossRoads
Seems pretty popular - why not get a set of 10 or 20 boards made at iteadstudio and make them available for a couple bucks each plus mailing cost?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jshaw

#295
Jan 02, 2016, 05:16 am Last Edit: Jan 02, 2016, 05:23 am by jshaw
Thanks :)

The boards work with 3v and 5v pro mini, though the input voltage can be higher. Also, the WT's audio outputs (DAC and PWM) have been broken out for easy access. The only real difference between them is that they support an increased number of high power LEDs (1~4).


As to the tri-rebel brightness, have you tried lighting up 30"+ with it, you may be suprised, I use 1w LEDs all the time with great results:



For 1w, how even it looks depend on the blades mod cons, usually cobinations of light tube, diffusion and tip mirror which I employ most of the time.
I'm waiting on my blade and blade holder to arrive, so no, I've yet to actually try it out w/ a blade and diffuser.  I tried just putting it against my blade cap, and it didn't seem too bright, but I guess I'll wait for my blade to arrive and then have a better idea. 

Seems pretty popular - why not get a set of 10 or 20 boards made at iteadstudio and make them available for a couple bucks each plus mailing cost?
I'd be into buying one of these if you were to make them.
Thanks for the pics and encouraging words, Canobi.   

Canobi

Oh, cool. I wish I were better at fabricating, but the whole process is more than I want to get into.
That is exacly how I feel about coding lol. Though I will have to tackle it properly one day as in my case, it doesn't make sense not to.

Drop me a PM, maybe we can work something out ;)

Seems pretty popular - why not get a set of 10 or 20 boards made at iteadstudio and make them available for a couple bucks each plus mailing cost?
I'd love to but unfortunately I can't outsource the work as there are no gerber files for them (yet) and haven't found a fab house that will take PDFs.


I'm waiting on my blade and blade holder to arrive, so no, I've yet to actually try it out w/ a blade and diffuser.  I tried just putting it against my blade cap, and it didn't seem too bright, but I guess I'll wait for my blade to arrive and then have a better idea. 

I'd be into buying one of these if you were to make them.
Thanks for the pics and encouraging words, Canobi.
Not a problem, just PIF from all the help ive had on my saber smithing journey.  In fact, I was going to offer to make them exclusively for folks here anyway. I can't afford to price them as cheap as a fab house would but they won't be anywhere near as outrageous as a biscott or other saber board of that ilk, why I did them in the first place.

I like to encourage self sufficiency and enjoy the DIY aspect of this project so I will also work to any budgets as well and offer bare bones PCBs to populate yourself to fully assembled and ready to go units and anything in between as a way to suit as many skill levels as I can.

Talking of which, the SMT components have also been kept to a minimum since the possibility of hand soldering is rather quite high. This was taken into account early on and have deliberately left a touch more space between clusters of componants than would actually be necessary, though a fine tipped iron is still recommended as I've used SOT-23 and 0805 components which are quite small (barring the FoC resistor that is).

Here's a quick look at the artwork for all four boards:



And a mock up showing what they would look like with the modules mounted (the cap is just a placeholder to show where the impact switch sits as I didn't have one on hand when I took the pic) :




I should mention that these boards are routed for one line comms, though I also have three line versions as well if reqired.

JakeSoft

That is exacly how I feel about coding lol. Though I will have to tackle it properly one day as in my case, it doesn't make sense not to.

Drop me a PM, maybe we can work something out ;)

I like to encourage self sufficiency and enjoy the DIY aspect of this project so I will also work to any budgets as well and offer bare bones PCBs to populate yourself to fully assembled and ready to go units and anything in between as a way to suit as many skill levels as I can.

Talking of which, the SMT components have also been kept to a minimum since the possibility of hand soldering is rather quite high. This was taken into account early on and have deliberately left a touch more space between clusters of componants than would actually be necessary, though a fine tipped iron is still recommended as I've used SOT-23 and 0805 components which are quite small (barring the FoC resistor that is).

Here's a quick look at the artwork for all four boards:



And a mock up showing what they would look like with the modules mounted (the cap is just a placeholder to show where the impact switch sits as I didn't have one on hand when I took the pic) :




I should mention that these boards are routed for one line comms, though I also have three line versions as well if reqired.
Have you considered piggy-backing your accelerometer on top of the Pro Mini? This would make the 3V version shorter. I did this with my Mk IV prototype and an ADXL335. (See video here: Arduino Mk IV Hardware ).

Also, what is the small board under the Pro Mini's programming pin headers?

I've really enjoyed participating in this thread from the beginning. It's great to see all of the ideas and skills people are bringing to the table. What I've watched people struggle with the most is the coding side of it. I'm wondering if I should entertain the idea of selling pre-programmed Pro Mini boards. That way people who don't want to learn C++ (which is no small feat if you've never programmed anything before) don't have to, but could still play with the hardware side.

Canobi

Have you considered piggy-backing your accelerometer on top of the Pro Mini? This would make the 3V version shorter. I did this with my Mk IV prototype and an ADXL335. (See video here: Arduino Mk IV Hardware ).
I like it but how is it with the sensitivity being at the pommel end?



Quote from: JakeSoft
Also, what is the small board under the Pro Mini's programming pin headers?
That is the smallest 3w amplifier module I've ever found:



I'm not sure what the status is with these boards now though. I went back to get more and found the sellers online shop completely empty :( Weirdly though, links to buy new ones are attached to my original order so not sure what the manufacturer's trading status actually is.



Quote from: JakeSoft
I've really enjoyed participating in this thread from the beginning. It's great to see all of the ideas and skills people are bringing to the table. What I've watched people struggle with the most is the coding side of it. I'm wondering if I should entertain the idea of selling pre-programmed Pro Mini boards. That way people who don't want to learn C++ (which is no small feat if you've never programmed anything before) don't have to, but could still play with the hardware side.
Now your talking, that would compliment my hardware offerings ;)

If I send you a pin list and function rundown, could you work the code around the new board designs?

I've also got another small offering to aid with changing sample sets on the board (well any board or setup actually). I've designed a small programmer shield for post mounted WT modules, though it does require a header pin swop out to use it but is simplicity itself once done:



Basically, the WT pins are removed and replaced with regular ones, only this time they're soldered long side up giving enough length afterward to make a decent connection with header sockets (it's not a WT but you get the idea) :



The shield is then attached to the module via the shield's header sockets and the male pins on other side go in the programmer.

JakeSoft

I like it but how is it with the sensitivity being at the pommel end?
I'm not sure, but I don't think it'll be a problem. My software allows for user adjustment of swing sensitivity anyway, so it should work anywhere.

That is the smallest 3w amplifier module I've ever found:

I'm not sure what the status is with these boards now though. I went back to get more and found the sellers online shop completely empty :( Weirdly though, links to buy new ones are attached to my original order so not sure what the manufacturer's trading status actually is.
That's too bad it can't be found now. It seems darn near perfect, no bulky capacitors taking up a ton of room like I find on others.


Now your talking, that would compliment my hardware offerings ;)

If I send you a pin list and function rundown, could you work the code around the new board designs?
Probably. I defined all of my pins in a header file, so it should be just changing a few #define lines of code to move pins around as I please. Although, my code is developed to work with an AXDL335 analog accelerometer, not whatever you have pictured which seems to be some kind of serial interface judging from the silk screen. Because of this, the analog input pins must be mapped to the AXDL335 or it won't work.

Basically, the WT pins are removed and replaced with regular ones, only this time they're soldered long side up giving enough length afterward to make a decent connection with header sockets (it's not a WT but you get the idea) :



The shield is then attached to the module via the shield's header sockets and the male pins on other side go in the programmer.
Yeah, I hate those flimsy pins that the WT modules come with. Does anyone know what kind of socket or female header is supposed to mate with them? I tried several types but nothing seems to fit right. I've taken to just cutting a 16-pin DIP socket in half and spacing it out so the pins line up. The only other way that's reliable is to just solder directly to the pins.

Go Up