Go Down

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

JakeSoft

I actually think the scroll up doesn't work. I set stream to 5 seconds for both scroll up and scroll down. Here is a test with the preview function in stream:
https://youtu.be/DHmEznD5iBU
And a test with it saved and disconnected:
https://youtu.be/Fz4_BedHTvM
Thanks for posting that so we can see it. It kind of looks like maybe the frame timing is off or something. Depending on where you got your pixel strip, there is some variance in the timeout required to actually display a frame despite various manufactures claiming compliance with the standard. I suspect the frames are being sent to the blade, but the timeout to wait for the frame to be displayed may too short for your particular strip. It's clearly dropping frames somewhere.

jbkuma

I actually think the scroll up doesn't work. I set stream to 5 seconds for both scroll up and scroll down. Here is a test with the preview function in stream:
https://youtu.be/DHmEznD5iBU
And a test with it saved and disconnected:
https://youtu.be/Fz4_BedHTvM
Assuming everything is hooked up correctly and the battery is capable and fully charged then here are my suggestions:

First make sure there is a resistor 220 to 470 on the strip.  It has to be on the strip.  If it's not on the strip it will not help at all.  The resistor is for signal integrity relating to ringing effects caused by impedance.

Second, if the arduino is connected via usb and the strip is powered by the battery, the difference between the Vin on the strip and the 5v signal from the arduino could cause this issue.  Remove the USB cable and power the Arduino with the battery via the 5V pin.   The signal should be between the Vin on the strip and Vin-0.7 or so.  Results may vary and I have plenty of pixels running fine on a 3v3 signal with 5v supply.   Having a higher signal to Vin is not suggested.

If neither of those work, the fist pixel could be damaged, try soldering to the next pixel in line.

I have a pixel matrix of 1800 pixels and had to wrestle with many of these sorts of issues to get it working properly.  Finally I had to hunt down 2 pixels in middle of the array to get it to work properly.  They where damaged when a buck converter I was using latched at a high voltage.  Luckily it was only those two that needed replacing.

JakeSoft

#1487
Aug 01, 2020, 08:20 pm Last Edit: Aug 01, 2020, 08:23 pm by JakeSoft
JBKuma,
Thanks for those suggestions. You are far more experienced with these addressable LEDs than I am so you're insights are welcome.

gdadourian,
I'm attaching to this post an experimental version of the firmware that has relaxed frame timings. This will guarantee that there is at least a full millisecond between each frame. If your pixel strip is too slow to keep up with the normal timing for some reason, this will at least address that. If it is anything that JBKuma called out then it may do nothing. I have no way of knowing since I can't reproduce your particular issue.

To install this experimental version, just extract the zip file then replace the file in the STREAM distro under the firmware folder with this new one. Then flash the firmware over USB from the GUI as usual. If this firmware fixes the issue, I'll consider making relaxed frame timings a select-able option from the Options screen in the future.

gdadourian

JakeSoft, I used the updated file as instructed, and I met with success for the most part.  It took a bit of fiddling with my wiring connections to get it to work.  At first, the power up sound would play, the pixels would scroll as intended, but before the pixels finished scrolling, the sound would cut out like it was doing before (at least this time the pixels were scrolling).  I tried changing to one of the older batteries, and the scrolling and sound barely did anything.  So I know for sure those batteries are insufficient.  I wired back up the newer samsung (20 Amp continuous draw) battery with better wire contact, and met with success!  The sound played normally, and the scrolling worked.  The aux button is a little finicky, but I think I just need to solder up some stable connections.   I'll report back should I encounter any issues.  In the mean time, thanks so much for the incredible support!

(jbkuma- I did have a 220 Ohm resistor between the data line and D13, I assume that's what you were talking about with your first point?  Regardless, thanks for your input!)

JakeSoft

JakeSoft, I used the updated file as instructed, and I met with success for the most part.  It took a bit of fiddling with my wiring connections to get it to work.  At first, the power up sound would play, the pixels would scroll as intended, but before the pixels finished scrolling, the sound would cut out like it was doing before (at least this time the pixels were scrolling).  I tried changing to one of the older batteries, and the scrolling and sound barely did anything.  So I know for sure those batteries are insufficient.  I wired back up the newer samsung (20 Amp continuous draw) battery with better wire contact, and met with success!  The sound played normally, and the scrolling worked.  The aux button is a little finicky, but I think I just need to solder up some stable connections.   I'll report back should I encounter any issues.  In the mean time, thanks so much for the incredible support!

(jbkuma- I did have a 220 Ohm resistor between the data line and D13, I assume that's what you were talking about with your first point?  Regardless, thanks for your input!)
Fantastic news! And don't wait for problems to check back in, we like to see what you built around here! Every success story could be inspiration for the next person, so pay it forward. :)

jgtucker

#1490
Aug 28, 2020, 03:27 pm Last Edit: Aug 28, 2020, 04:07 pm by jgtucker
This is my first build. I've read this thread from front to back learning from all the experiences that all of you have had. I've encountered a few issues myself that I haven't seen posted here.

HW:
Arduino Nano
MPU6050
DFPlayer

I followed the pixel blade diagram (- wired to GND instead of RST)
I have to use 7.4v wired to VIN with 5v to drive the dfplayer and pixel strip (220 ohm res on data pin)
it works fine, and I'll use this one in a double bladed saber.

one 3.7v 18650 doesn't power on my build. I'd like to have a smaller hardware setup.
my next build will use the Arduino Beetle, but I need to learn what to do in order to drive the saber with a single cell 3.7v batt.

the only difference in my build from the diagram is moving (-) from RST to GND.

has anyone else had this issue? fully charged cells are reading at 4.2v

https://www.youtube.com/watch?v=Nm3xZX-npHo

Also, can anyone point me to the place in the code that would allow me to adjust the ignite speed?

jbkuma

This is my first build. I've read this thread from front to back learning from all the experiences that all of you have had. I've encountered a few issues myself that I haven't seen posted here.

HW:
Arduino Nano
MPU6050
DFPlayer

I followed the pixel blade diagram (- wired to GND instead of RST)
I have to use 7.4v wired to VIN with 5v to drive the dfplayer and pixel strip (220 ohm res on data pin)
it works fine, and I'll use this one in a double bladed saber.

one 3.7v 18650 doesn't power on my build. I'd like to have a smaller hardware setup.
my next build will use the Arduino Beetle, but I need to learn what to do in order to drive the saber with a single cell 3.7v batt.

the only difference in my build from the diagram is moving (-) from RST to GND.

has anyone else had this issue? fully charged cells are reading at 4.2v

https://www.youtube.com/watch?v=Nm3xZX-npHo

Also, can anyone point me to the place in the code that would allow me to adjust the ignite speed?
What diagram are you looking at that connects to the RST pin? If it exists, this is an error.

Your pixels should wired directly to a single lithium cell.  No matter what the spec sheets say, they do not need to be driven at 5v, and really it is better to drive them at around 3.7v anyway.  Only data should be connected to the pixels.  If you are using two different power sources in your testing you will need to common the grounding.  Depending on the color and size of your blade, it will likely draw 3-8A, so you will need a quality battery capable of providing sufficient current.  There are plenty of 10A and 15A batteries available from reputable brands.  I have personally used Orbtronic as my go to, The Custom Saber Shop has quality options, and there are others.

Lithium cells charge up to 4.2v and their protection circuit should keep them from going below 2.5v, however in most cases you will not want to run at less than 3.3v.  All battery ratings are "nominal" and the listing voltage is the average output during their useful range.

Connect your single lithium cell to the 5v pin on the arduino.  It will work fine.  You will also want the df to be powered directly off the battery.

Here is a good reference diagram I made for the FX-SaberOS project:
https://github.com/Protonerd/FX-SaberOS/raw/master/README/homebrew-pixel.png

jgtucker

Thanks. that is the diagram i used (with the exception of the RST pin being used). I did have to connect the Aux switch to Pin D11 per the code though.

So, i should connect battery positive (+) to DFPlayer vcc, Arduino 5v, R3 Batt level and 5V in on the led strip?

gdadourian

https://youtu.be/iN1lCr6tWgs
Couldn't have done it without some hand holding, but hey, this community is just incredible. Shout out to jakesoft and jbkuma for making my dreams come true.

richs1982

Hi

I am new to this forum and just came across this.  I have a few Ultrasabers and my son got a stunt version for his birthday.  He now want to add sound using an arduino.  I have seen some schematics on here of it being done but how are you driving the led modules from Ultrasabers?  They normally use cree or luxeon leds in the module.  I was going to create a led driver using a relay activated but the ardunio nano output

Many thanks

Richard

jbkuma

You can use transistors, usually mosfets, but you can use good as fashioned tip42.  Read further in this thread or check out the schematics on the FX-SaberOS project in GitHub.

richs1982

Thanks, got everything ordered so far. I was wondering if anyone had used the leds below? They see to be tri cree xp-e2 but they are a lot cheaper than normal!


https://www.lumitronix.com/en_gb/cree-xp-e2-rgb-smd-led-68291.html

Many thanks

Richard

Go Up