fiduciary

Author Topic: Profezzorn's first build (graflex 2.0, teensy, prop shield, neopixel led string)  (Read 43903 times)

0 Members and 2 Guests are viewing this topic.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Time for an updated circuit diagram:



There has been a few changes since last time:
There is a single li-ion battery instead of 4 batteries in serial.
The LEDs runs directly off the battery, they use resistors as current limiters and FETs for control.
Blade ID and WS2811 control now share a pin in the blade connector.
Three powered channels makes it very easy to hook up RGB stars.
RGBW stars are possible, but requires a FET/PEX in the blade adapter.
Charging is done though a special blade plug. The special blade plug will have a 2.1mm jack at the end and one (or a few) neopixels in it to indicate charge status.
Battery level only needs one resistor, because the pull-down resistor in the teensy can be used as the other half of the voltage divider.


Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
I think I shall name the three FETs in my design.
How about Cassus, Jango and Boba FET?

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Replaced the faulty PL9823 in my string blade today, now it works all the way down to 1.7 volts!
(Although, at that voltage, only the red LEDs light up at all.) At 2.7, the all colors work well, but not nearly as bright as they could be.


Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Electronics is all put together, except for the buttons:



Quite the ratsnest, hopefully it will actually fit. :)

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Ok, I'm officially confused.
It seems I hooked everything up right, but two things don't quite work the way I intended.

1) If I hook up a bench supply instead of a battery, the power booster draws nearly two amps of power and gets really  hot. (I'm using the lipower booster from sparkfun.) Not sure what's up with that, and it could be a problem when charging the battery. If I plug in a battery, everything seems to work fine, and the booster does not heat up. Weird!

2) When I pull the FET gates low, the FETs still seem to conduct some power. I read about 2 volts over the LED string, and unless I make sure the LEDs are off before I disable the FETs, they still glow. I've measured the source-gate voltage on the FETs, and it's only a few millivolts, so I don't know why they would still conduct. Interestingly, they seem to stop conducting when I flash a new program onto the teensy, but I don't know why.

Neither of these are going to stop me from making an awesome lightsaber, but they are definitely mystifying. If anybody has any ideas, let me know.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Mystery (2) solved: I skipped the 50-100ohm resistor that hooks up to the data-in on the first PL9823 in the string. Aparently the PL9823 could source enough current from that one pin to make a whole bunch of LEDs glow.

I think I'll just add code to stop driving that pin when the power is off, and then I won't have to add the resistor back in. :)

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Seems the battery I bought isn't very good. Unless the battery is completely full, the protection circuit cuts in when I turn the blade on, especially if I turn the blade "white". The battery is supposed to be good for 10A, but I think maybe it undervolts when I turn the blade on, causing the protection circuit to cut it off. I tried adding a big capacitor, but that seems to have made it worse somehow.

I've ordered some alternatives from liion wholesale, some of which are unprotected and can tolerate spikes up to 100A.

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Mystery (2) solved: I skipped the 50-100ohm resistor that hooks up to the data-in on the first PL9823 in the string. Aparently the PL9823 could source enough current from that one pin to make a whole bunch of LEDs glow.

I think I'll just add code to stop driving that pin when the power is off, and then I won't have to add the resistor back in. :)

It's funny, I had the exact same problem with Arduino. It also took me some time to figure out the reason. Actually it happened in both directions.
1. I removed the 5V/battery from the stripe, but left the USB connected to the Arduino. The digital line used for programming the strings had enough current capability to back-supply the stripe from the USB.
2. Later when I introduced a similar technique as you to disconnect this time the GND of the stripes, I again had the faint glow on the first LED of the stripe. It turned out, that the digital pin again if it is left in logical LOW/0 state, will reconnect through itself the GND to the stripes I just disconnected using the FETs. So I had to constrain the I/O to HIGH/1 in order to avoid it.

Good point though, I will take this latter point up in the DIYino User Manual.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Well, today was pretty much an unmitigated disaster.
I was trying to figure out mystery (1), so I hooked replaced the battery with a few leads to the breadboard, hooked up an amp meter and started trying stuff. First I tried the bench supply, and the booster started heating up.
Then I tried the battery, and the same thing happened.  At this time I thought maybe the booster is broken, so I removed it and found that the teensy was also eating power like crazy. I thought perhaps I had a busted amp, so I took everything apart, which was a pain in the behind. I tried it again, and still it was eating power like crazy.

At this point I just about gave up and assumed everything was just toast, but then I noticed that I had the polarity backwards! I reversed the polarity, and everything started working just fine again. Gah!

Anyways, I'm taking the opportunity to clean up the ratsnest a bit by using ribbon cables, so the whole thing will be a little neater. But, and I cannot emphasize this enough: Gah!

Anyways, back to your regular scheduled programming, nothing to see here folks.
Oh, and when your stuff doesn't work: Check the polarity people!

Offline Sethski

  • Master Force User
  • *****
  • Posts: 1202
Phew! I thought you'd fried some of your kit when I read 'unmitigated disaster'  :shocked:

Glad that wasn't the case  :wink:

Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
Take it as a hand of fate. A while back I did the same to a MR Darth Vader saber (the more expensive Hasbros) and reversing the polarity instantly fried the board. I was furious and frustrated. But I had to replace the board. Long story I do not want to tell, but it got me on the path to build my own board for string sabers. I'm now glad that I fried that board :)

In your case it ended good, nothing fried, although it's a miracle...

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
I actually think it's really important to talk about the failures as well as the successes. Not only might it be helpful to someone who encounters a similar problem, but it also makes people not feel like idiots when their projects fail spectacularly. It's going to happen, it happens to everybody, get used to it and make sure to buy extra of all your components.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
The cram-fu is strong in this one...



I had to take off the connector on the voltage booster and replace several cables with shorter versions to make everything small enough to (hopefully) fit, with enough space left over for an 18650 battery. I don't think I have to worry about securing anything really, because there won't be any space for anything to move anyways....





Offline Obi_1

  • Mining Colony Members
  • Experienced Force User
  • *
  • Posts: 476
  • Creator of DIYino - first open source FX-board
I wholeheartedly agree to your comment about failures. Yes, we and all the other can learn the best from these examples. Making failures means you work and you experience. Better a few mistakes than no work done...

And if these mistakes and the lessons learned are shared, they become valuable to the community as well.

I do not believe any one of us managed to make a saber without any hick-ups. If someone would tell me that, I would outright laugh at him/her.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Been mostly working on the software for the last few days. I've re-written the WAV player, so now I have: gapless playback, support for 11, 22 and 44kHz, multiple simultaneous sounds, dynamic compression and rudimentary support for both monophonic and polyphonic sound fonts.  Also, I can play background music at the same time.

Also, I got some new 18650 batteries to play with. I'm particularly fond of the Samsung 25R INR battery. Lasts a long time and provides plenty of current. (Rated for 25A)  Of course, if I ever short it, I'm likely to set something on fire since it's unprotected, but dangerous toys are more fun, right?

 

retrousse