Go Down

Topic: Arduino Lightsaber for/with LED string blade (Read 47337 times) previous topic - next topic

jonnieZG

Therefore I will stick with the MPU, I'm very satisfied with its performance when it comes to clash and swing detection.
Since you have it as an part of the DIYino Prime, I think it is a great choice, because it gives a user more choices, because one does not have to stick just to lightsabers. You can do a lot of other interesting things with that board.

I just read the manual, and I must pay you greatest compliments on that! There is just one thing that I'd like to suggest, if you don't mind: regarding the simple MOSFET drivers, I would prefer to have a constant-current driver like the one described here (the second one on the page). It requires (per driver) an extra NPN transistor, a resistor, and leads for an external resistor that controls the max current, but it is more efficient than the simple MOSFET switch.

The power saving options will be back soon, I did not yet publish it, but I already built in a DIYino Prime v1.5 ...... WIth the DIYino v1.5 it changed  :) .
I am looking forward to seeing the performance of the lastest version!

JakeSoft

It is actually an MPU6050 and somehow I agree that for a lightsaber project it might be an overkill, however it is a perfect match to my DIYino lightsaber board family, as I found a source I can order them cheaper as the regular price for simpler acc/gyros like the ADXL chips. Therefore I will stick with the MPU, I'm very satisfied with its performance when it comes to clash and swing detection.
I agree. My only problem with the MPU6050 was how much code space was required to use it. Now that the issue is sorted, I don't have any complaints and quite like it.

Protonerd

There is just one thing that I'd like to suggest, if you don't mind: regarding the simple MOSFET drivers, I would prefer to have a constant-current driver like the one described here (the second one on the page). It requires (per driver) an extra NPN transistor, a resistor, and leads for an external resistor that controls the max current, but it is more efficient than the simple MOSFET switch.
I am looking forward to seeing the performance of the lastest version!

Hi jonnie,
I don't mind at all, that is why this and Jake's thread exist here, becasue we want to talk tech. I did not consider your setup as of yet, but if you can explain the pros I could think about such a drive concept in a next generation of DIYino.

The mosfet drivers are good, mostly becasue they can carry a lot of current, they can be controlled by PWM acting as a voltage controlled resistor, and last but most importantly they are tiny and space saving is a selling feature. That is why I did not consider putting a more complicated circuitry.  I'm pretty satisfied with the efficiency if you mean power loss (negligible), where I see a bit of an improvement potential is the linearity: a mosfet is a non-linear device i.e. the current of the load will no tincrease linerly proportional to the PWM voltage, which for our purpose means that the LEDs will not light up evenly with increasing PWM. There is an optimum range somewhere along the lower half and above that the extra gain is minimal. If this could be overcome then it would warrant a reconsideration.

jonnieZG

#648
Feb 25, 2017, 10:46 pm Last Edit: Mar 02, 2017, 11:35 am by jonnieZG
where I see a bit of an improvement potential is the linearity: a mosfet is a non-linear device i.e. the current of the load will not increase linerly proportional to the PWM voltage, which for our purpose means that the LEDs will not light up evenly with increasing PWM. There is an optimum range somewhere along the lower half and above that the extra gain is minimal. If this could be overcome then it would warrant a reconsideration.
Yes, it will increase linear dependency between PWM and current. The problem is NOT the MOSFET being non-linear, because we are driving the MOSFET with a square signal that goes to saturation, so the effective current should be linearly proportional to PWM. The problem is the voltage drop on LED being significantly dependent on the current. With the simple MOSFET switch, it results in non-linear LED current, while the current source with the MOSFET and an NPN + emiter resistor is not affected by the voltage variations on the LED.

Here, take a look here: simple MOFET and a current source. Try to change voltage on the LED (the upper of the two power sources) and you will see how it works.

Here are the voltages of my Luxeon Rebel RGB. Voltage increases linearly with the I:

Imin = 100mA, Imax = 1000mA
Vr min = 2.3, max = 4.9
Vg min = 2.5, max = 4.1
Vb min = 2.8 max = 4.1

Here is an Excel sheet that calculates power dissipation on each element. You can change Vcc and Re (that regulates voltage) and see the dissipation on a Luxeon RGB LED star. I will also add support for Cree RGB.

BTW, I am using an IRFL024ZPBF N-MOSFET with low gate switching voltage, that is made especially for 5V gate voltage, and a BCV47 NPN transistor.

jesjhoward

Hey guys! I'm having some trouble setting this up. Everything is working except for the sound. When I hook the DFPlayer up by itself and short the "play-next" pin, the module plays each file on the SD card in order just fine. However when I plug everything in as the github diagram shows, I don't get the proper sounds. It plays something... but it doesn't sound like any of the files on the card. It's kind of a high pitched, but soft type hum. My Neopixels will ignite and the 6050 seems to respond, but the module just won't work. I have three of these modules and every one does the same. Any help? I must have re-done the wiring 700 times, lol. Thanks guys!

jesjhoward

Okay, here's a little update: For some reason the DFPlayer was not happy using pin 8 for Rx and 7 for Tx. After changing these around a bit, I finally found a pair of pins that will reliably work every time. I've changed the code to use pin 7 for Rx and 5 for Tx. I have no idea why this would matter as they're both digital pins. It doesn't seem like it should make a difference, but it does. Just wanted to post this here in case anyone else has this issue. Now to get my batteries and test out the second neopixel string. =]

DJWing79

has anyone considered this?

https://www.adafruit.com/products/2795

I know it's not using the DFPlayer so no amp, but would it be viable?

JakeSoft

has anyone considered this?

https://www.adafruit.com/products/2795

I know it's not using the DFPlayer so no amp, but would it be viable?
You could use it as an MCU, sure. But it's not a sound board, it's just an Arduino with a built in SD card slot for storage.

Protonerd

You could use it as an MCU, sure. But it's not a sound board, it's just an Arduino with a built in SD card slot for storage.
We made a brainstorming with Jake about this MCU at the time I prepared the plans for the DIYino Stardust, and finally decided to keep the 328P. Reason is, the 32u4 comes with 500bytes more SRAM but its bootloader - to accommodate the USB protocol - takes much more program flash space. We calculated that it will be a challange to fit the saber code into that. Looking back it was the right decision, the Stardust uses new QFN packages for both the FTDI and the avr, therefore the added PCB room over the 32u4 is mininal, but this compo is much more flexible in terms of bootloader options.

Vulkan

This may sound weird and all, but could you not use the AMTMEGA2650 chip. It's voltage range is 5-12v where as the banks is 5-7.9. It's much larger being a problem. It's got 4x sram and flash.

I don't know if it could work

Protonerd

I've just made an announcement about my newest saber board creation, the Stardust, if wanna know what it is, go here: Stardust coming

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy