Go Down

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

Protonerd

There are still a few issues that I need to solve:

  • Powering. I currently use the DC-DC Adjustable Step-up Module to boost the voltage to 4.7V, but the buck seems to have quite significant power loss. I haven't measured it precisely yet, but its efficiency seems to be around 50% around the current/voltage that I use.

    I am thinking of using 2 x 10440 batteries that would give me 6.5-8V range, but in that case, there would be more than 50% loss in the MOSFET LED driver (or on the resistor if you are using just a resistor), so there's no benefit in that either. But, I also have a step-down buck that I need to test for efficiency, so that might make things better.

    Alternatively, the Kyberos Mk2 will be using Cree instead of Luxeon Rebel LEDs, and these suckers work on lower voltage. Perhaps I'll just try powering the LED drivers directly from a single 18650 battery.

I recall I once planned to use an adjustable 3A rated DC/DC to boost up voltage from 3.7V to 7.2V, but it just broke down and could not even deliver 1A... so I do not believe what ebay DC/DC spec say any more. Anyway, do you power your whole build with the DC/DC? I personally think it's enough to power the logic, the LEDs you can conveniently supply from the 3.7V battery. It's also close to their max Vth, so no power waste occurs.



Quote
  • Voltage drop on the kill-switch varies significantly with the current (from 0V to 0.3V), what messes up the LED driver currents and the readings of the ADXL335. My kill switch currently disconnects the BAT- from the GND, allowing me to connect an external charger adapter, but it causes the voltage drop problem. I am thinking of either moving the kill-switch from BAT- to BAT+ (fixing the floating LED Driver GND issue, but loosing the possibility to use an external charger), and/or making an electronic kill switch that would have a voltage drop independent from the current.


The electronic kill key is an interesting idea, any clue as to how to do it? Apart from using a kill-switch, of course (which I did once on a blaster build for a kid, for them it's way easier to switch off than to grasp the idea of not loosing a kill-key :)   )


Quote
  • Measuring Li-Ion State Of Charge (Battery Level) is a project of its own. There are quite a few whitepapers and doctor theses on the subject. Still working on a reliable implementation


There is an idea I've got from this link: http://www.gammon.com.au/forum/?id=11497
I implemented it into FX-SaberOS, of course it only works if you run your full board off the battery. If a DC/DC is in between, it will obviously not work. I did not put a lot of effort into it, but tried to connect one of the analog pins to the battery while the voltage is pushed up to 5V, but I could  not make any reliable reading so far. It's not very high on my agenda but it's nagging at me.


Quote
  • Light Diffusion Foil is another thing I am working on. The plain wrapping foil does not give even distribution and is not good enough in the daylight, so I am experimenting with some modifications of the wrapping foil that should dramatically improve its efficiency.



Hehe, actually there is no competing with the sun :) But really, these RGB LED modules cannot compete with other illumination types like neopixels or LED strings, neither in homogenity nor in brightness. I personally think that with many saber builders put countless hours to try to improve the blade diffusion frankly I do not think it can be improved any more... but please prove me wrong.

jbkuma

The easiest and most reliable way to read the battery level is a voltage divider.  I've tried almost every other method I could find and this is the only one that actually works.

I use a 100k from ground and 470k from bat+.  You can mine my implementation from my versions of LSOS and FXSOS. https://github.com/jbkuma

jenga67

Hi guys!
Thank you very much for developing the thread and saber building!

I have done my first build on WT588d-u, and now converting to DFPlayer mini and having some issues, so I would really appreciate your advice.
 
The current issue, as I assume, is with powering the whole setup.
I use:
Arduino pro micro 5v/16mhz
2x CR123A 3.7v 1000mah
DFPlayer mini
MPU6050
Red high power LED

How do you think, would it work ok if I power it all with only one CR123A, using a DC-DC stepup to 6v for arduino, stepdown to 2.4v for the LED, stepup to 4.2v for DFPlayer mini and MPU6050 straight with 3.7v from CR123A?

Or should I keep on using 2 CR123A's?

I already consider ordering 3.3v arduino, but I'm afraid it will not reach me until Halloween...

Big thanks guys!

Protonerd

Hi guys!
Thank you very much for developing the thread and saber building!

I have done my first build on WT588d-u, and now converting to DFPlayer mini and having some issues, so I would really appreciate your advice.
 
The current issue, as I assume, is with powering the whole setup.
I use:
Arduino pro micro 5v/16mhz
2x CR123A 3.7v 1000mah
DFPlayer mini
MPU6050
Red high power LED

How do you think, would it work ok if I power it all with only one CR123A, using a DC-DC stepup to 6v for arduino, stepdown to 2.4v for the LED, stepup to 4.2v for DFPlayer mini and MPU6050 straight with 3.7v from CR123A?

Or should I keep on using 2 CR123A's?

I already consider ordering 3.3v arduino, but I'm afraid it will not reach me until Halloween...

Big thanks guys!
One Step-up DC/DC to 6V would suffice, or even 5V if you connect it directly to the 5V pin and not to VIN. I'm not sure about the Micro, but if it has an FTDI chip, that one has an in-built 3.3V LDO (3V3 pin on the Nano). BTW, the DFPlayer mini also has an in-built 3.3V LDO, but alas I'm not sure any more if the signal is available on the breakout. On my Prime and Stardust boards I use either the LDO of the FTDI or of the DFPlayer chipset to supply the MPU.

Alternatively you can power your whole setup from a single 3.7V batttery, I've tried and it works. For the LEDs, do not supply them with a DC/DC, have them hooked up to the battery with resistors.

jenga67

Thanks a lot, Protonerd!

On Pro micro 5v there is one RAW pin for 5-12v input and VCC pin for regulated 5v, and either one can be used as an output of ~4.8v.

I have tried feeding 5v to Arduino and DF from the same DC-DC, but seems like it screws DFPlayer, as it starts with maximum volume (which cannot be controlled) and freezes after the first MPU triggering.
So I assumed that it needs lower voltage, like recommended 4.2v.

But why you would not recommend using step down to 2.4v for LED?


marsthrax

I'm interested in trying to build a bluetooth-enabled system. Before going through this thread, this is what I was leaning towards using:

Bluefruit Feather NRF52: https://www.adafruit.com/product/3406
Sound/SD: https://www.adafruit.com/product/3436
Gyro/Accel: https://www.adafruit.com/product/3463
Neopixel Jewel for LED: https://www.adafruit.com/product/2226
Surface Transducer for speaker: https://www.adafruit.com/product/1785
18650 Battery: http://www.thecustomsabershop.com/Panasonic-Li-Ion-18650-37V-3400mAh-PCB-Protected-Rechargeable-Battery-P853.aspx

It doesn't look like anyone has really used any of those components. I was hoping to get some input on whether this setup actually made sense, or if there are better options. A few specific questions:
1) Does a surface transducer make sense? It seemed like an interesting idea, and I saw somebody ask about it, but never saw a follow-up. Is it better to just go with a tried-and-true speaker for a lightsaber?
2)  I think my main sticking point so far is choice of sound. I'd much prefer a non-SD card option, but would probably 100MB-1GB to allow sufficient space for a few different configurable fonts. I haven't seen any good options for that. I'm also curious whether anyone really notices issues in practice with sound playing one after another, rather than mixing (say, keeping the hum sound always going and mixing in clash/blaster/etc).

I'm more of a software guy, so any input on whether the above setup seems practical (or if there are other things I should look into instead) would be greatly appreciated!

JakeSoft

I'm interested in trying to build a bluetooth-enabled system. Before going through this thread, this is what I was leaning towards using:

Bluefruit Feather NRF52: https://www.adafruit.com/product/3406
Sound/SD: https://www.adafruit.com/product/3436
Gyro/Accel: https://www.adafruit.com/product/3463
Neopixel Jewel for LED: https://www.adafruit.com/product/2226
Surface Transducer for speaker: https://www.adafruit.com/product/1785
18650 Battery: http://www.thecustomsabershop.com/Panasonic-Li-Ion-18650-37V-3400mAh-PCB-Protected-Rechargeable-Battery-P853.aspx

It doesn't look like anyone has really used any of those components. I was hoping to get some input on whether this setup actually made sense, or if there are better options. A few specific questions:
1) Does a surface transducer make sense? It seemed like an interesting idea, and I saw somebody ask about it, but never saw a follow-up. Is it better to just go with a tried-and-true speaker for a lightsaber?
2)  I think my main sticking point so far is choice of sound. I'd much prefer a non-SD card option, but would probably 100MB-1GB to allow sufficient space for a few different configurable fonts. I haven't seen any good options for that. I'm also curious whether anyone really notices issues in practice with sound playing one after another, rather than mixing (say, keeping the hum sound always going and mixing in clash/blaster/etc).

I'm more of a software guy, so any input on whether the above setup seems practical (or if there are other things I should look into instead) would be greatly appreciated!

I don't know anything about the sound board you linked so I can't testify about its performance. I looked at it a little in the link you provided, but couldn't really tell how hard/easy it is to use on the software side since you have to actually download the library to see any example code.

The old standbys around these parts are DFPlayer Mini (Link) and WT588D (just look on Ebay, tons of sellers).

If you want to try this new board out then please be my guest. It looks good on paper as far as supported features, so I don't see any obvious reason why it wouldn't work. Let us all know how it goes. Good luck.

data790

Hi all,

Okay so I have been playing around making a lightsaber from an adafruit pro trinket 5 volt, wt588d-u32 i think it is (usb loader) and an mpu gyro/accelerometer (the package is a little out of reach at the moment). So I have read and read and tried and tried but due to my limited (and when I say limited I mean I have no idea how to program) knoweldge I cannot get the wt588d player to work. I am more familiar with the UNO and I have the LED and trinket working with the button - happy with that - but no idea how to wire up the wt588d or gyro. I would really like some help or someone to chat to about these issues. I have read the GitHub and tried the code but could not get that to work.

I really want to learn programming and move onwards with these ideas for other projects. Unfortunatly I am coming towards the end of a PhD (not electronic-related) and thus time to really get into the subject is hard. I would like to put this project to bed and have everything working. It is much easier to learn as I go along. I understand that this is a hell of a request and probably tiresome to many. But I have tried and read but come to no progress.

I guess I am ranting now but to recap I need guidence really. Again sorry if this request is tiresome.

Thanks in advance

Messiahlad

Hi, I haven't tried this unit yet but I have two of them to make some simple sabers and will begin playing with them soon.

If I have some luck I will post some ideas, otherwise I will be watching to see what the other gurus suggest. Good luck man.

Please post any finding you have as it all really helps others.

data790

Thank you. As and when i get it all working i will definatly post a large file with schematics and code. I am working on two sabers: a nornal one and a jokey kinda thing also. Got the files into the wt588d and the high powered led and button. That's it so far

Messiahlad

I think two things that might help (from memory) is the early example of code from Bill Pealer and his Youtube vid showing it working without a library. Makes it seem very accessible.

Later in the week I'll see what Jake has in his examples of Usaber and test what works.

Personally I have 11 df player minis as I am enjoying the card and two 16mb flash versions on the way as they are smaller.

My wt588d-u32's are going into two torch sabers for a friend with massive hands. Set colours and one sound font in each.

If somewhere in my notes I find some examples I'll post them to see if they help you.

I'm green on coding Arduinos myself but it's a great platform and I hope I can help somewhere.

Messiahlad

Testing the grey matter here but from what I recall the WT references sound slots that get called when needed. Check your sound list in the software and try some simple code that repeats playing each sound every 3000 milliseconds.

Eg calling:
WT588D_Send_Command(1);

If that works then drop what is now your own example into your code, cross fingers and test.

No gate tees but it's the best I can think of until I'm in front of a PC again.

As a hardware tech, coding is something I have to do, not want to do lol. Minimal experience with it.


data790

Just been shown by a wonderful chap at work - our resident bioinformatician and guru of programming - how to import files. No wonder none of the codes i copied and pasted worked. Okay so now i have the codes working but no sounds. I assume this is a user error in that i need to faff about with the wiring. I will post any findings and some pics as and when this part is done

jenga67

Hi guys!

Have anyone ever faced the issue with DFPlayer mini, that it freezes the sound?

If I support Arduino with 5v from USB, sound is good, bootsound is playing fine and button is working as intended, but if I run it with battery, there is no bootsound and sound after button press goes crazy.

I'm pretty sure the issue is in power setup, but I can't figure out what can be wrong with it.

Here is how I wire it (now it is only a DF, arduino and button for sound debugging):


Here is a video of the issue:
https://youtu.be/wL2OVQpleng

Would appreciate any ideas...

Protonerd

If you use a DC/DC or even a single battery (works too, I tried several times), then do not connect the 5V or 3.7V to VIN but to the 5V signal directly. Then it will work!

Go Up