Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 14 FirstFirst 1 2 3 4 12 ... LastLast
Results 26 to 50 of 348

Thread: Teensy APA102 POV Poi / Pixel Poi Build. Tutorial

  1. #26
    Junior Member
    Join Date
    Sep 2015
    Posts
    18
    Quote Originally Posted by Stuntmunky View Post
    Does this mean it has a level converter built in?
    Well I'm not Mr. Meissner, nor do I speak for him, but I'm not sure you'll get anything useful out of a 5v regulator when your board is running at 3.7 volts. I suppose it depends upon the regulator though. But if you're expecting 5v anywhere in this case I don't think it's going to happen without more hardware.

    I assume you're talking about projects such as https://learn.adafruit.com/pov-dotst...f/introduction ?

    Don't expect level conversion from anything based on such lofty ideals as:

    However, many times, you can run a 5V Pro Trinket + accessories off of the ~4V from the LiPoly battery with no problem. (Technically its overclocking but we've never seen that affect the Pro Trinket itself, AVRs are happy to overclock without complaint).
    Not that I care but I wonder what the support guy is going to say if you have a problem and then tell him "well I'm running the board out of spec but it's supposed to work - it must be something else...". Especially if it's a hard to reproduce problem.

    If it was me I'd follow Mr. Meissner's advice and stick with 3.3v parts and power your LEDs directly from the LiPoly battery (my apologies if I've misunderstood the suggestion).

    Regards,

    Brad
    KF7FER

    PS Sorry if that seems a bit harsh... I am an old geezer. But with the 3.3v parts easily available, why use 5v parts?
    Last edited by KF7FER; 10-01-2015 at 01:00 AM. Reason: Language correction, added to PS

  2. #27
    Not harsh at all, plain speaking is good.

    That is exactly what I'm going to do when all the parts turn up. Try it in its simplest form and go from there. Plus I have the teensy boards already and don't fancy ordering from adafruit if I can help it, nothing against them but postage is quite high to where I am.

    Just had a call from my friend and made some progress with the image processing, using the method on the adafruit projects.
    Put Python 2.7 and the PIL on my windows machine and used the convert file from the projects download.
    Not sure if it will work with the fastled library or if I will have to use the adafruit dotstar library.

    Anyhoo feeling a bit more confident in getting this to work now, just waiting on the hardware.

  3. #28
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,859
    Quote Originally Posted by Stuntmunky View Post
    @MichaelMeissner, I had two teensy 3.2's arrive today so I'm looking to make it work with them. I mentioned the adafruit projects more to get an idea of the brightness at 3.7v, which I assumed they were running at, although im not sure if they both are anymore. Both projects use the 5v version, the poi use the 5v trinket and the staffs the 5v trinket pro. Both are powered with a 3.7v battery but the trinket pro has:
    •On-board 5.0V power regulator with 150mA output
    Does this mean it has a level converter built in?



    Gonna take another look at the apa's datasheet.
    Bear in mind I am a software guy, but the regulators on the Trinkets appear to be buck regulators that take voltages up to 16v and drop the voltage to 5v or 3.3v respectively. If you are powering the chip with 3.7v, and it is the 5v version, you are underclocking the part. Now in general AVR's tend to be forgiving on voltages, so running it under spec may work. I would anticipate that running neopixels/ws2812's might be more problematical than dotstars/apa102's, since the neopixel has a very strict timing window, and if you are running the board underclocked, the timing might not be correct. This is just speculation on my part, I have never run any of the boards at voltages under the limit.

    Let me try to be clearer about when you need voltage shifting. Note, I have used neopixels/ws2812's a bit, but I haven't used dotstars/apa102's, but this is from reading the datasheet and my experience with ws2812's:

    If you are running off of a 5v supply (like USB), and you are using a 5v processor, then you don't need a level shifter. You want to connect the power input directly to the lights, and not use the 5v regulated pin on the processor. This assumes the voltage is regulated to 5v like USB power is.

    If you are running off of a 5v supply, and you are using a 3.3v processor, assuming you connect the 5v power to the leds, then you likely need a level shifter going from 3.3v to 5v. You might be able to get away without using a level shifter, but the datasheet says that the data signal must be at least 0.7 times the power signal, which is 3.5v. Maybe it will work, and maybe it won't. Some of my neopixels will work with this setup, some won't (mostly the newer ones when they changed to a new process are stricter about voltage).

    If you are running off of a power supply that is above 5.5v on the trinket, you run the risk of damaging the leds if you run the power straight to the LEDs. If you use the 5v power pin to power the LEDs, you need to make sure that the total power that is used by the LEDs is less than the design limits for the processor you are using.

    Note, if you are running off of a power supply that is more than 5.5v (for Teensy 3.0/3.1/LC) or 6v (for Teensy 3.2), you likely just fried your Teensy (and your LEDs if you connected the power to them).

    If you are running off of a 3.7v power supply to a 3.3v processor, you don't need a level shifter, assuming the LEDs can run at 3.7v. The current generation of neopixels' datasheet says that the LEDs will work at 3.5-5.5v. The APA102 datasheet says 5.5v is the max, but it does not list a minimum. So whether APA102's will work at 3.7v, might be an issue. The LEDs will likely be lower intensity at 3.7v than at 5v.

    If you only have a 3.7v battery, and you are running 5v processor, you may need an external boost circuit to bring the power up to 5v. If you are running a lot of lights, you need to figure out whether the battery and the boost circuit can handle the load. Note, a lot of boost circuits can get very hot.

    Basically, according to the datasheet, APA102's are happiest when fed 5v power, and the data signal is 3.5v-5v.

    I have burned out a Digispark (similar to a plain 5v Trinket, but the regulator is a lot less robust) by using the 5v regulated power pin, and not the USB input power pin.
    Last edited by MichaelMeissner; 10-01-2015 at 05:03 AM.

  4. #29
    Thank you Michael, That does make things allot clearer.

    I'm going to order a breadboard and some other bits and pieces to have a play with the coding side of things while I wait for the Led's to arrive.
    Thinking to solder leads to the teensy so that I don't have to de-solder pins later.

  5. #30
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    @stuntmunky - keep it simple for now, battery to Teensy Vin and gnd, and to led strip vin and gnd. add a switch as described in the original post, see if it works for your needs. If you don't need to complicate things with additional circuitry, all the better.

    I will try to put a code converter / generator online in a week or two to convert image data to array values, but time is a bit short right now. this will be aimed at outputting an array to copy paste into ino sketch.

    Also, stick with the FastLED library all the way. its a great piece of solid work.
    Last edited by mortonkopf; 10-01-2015 at 12:23 PM.

  6. #31
    That would be great if you put a code converter up but no worries regarding time, It will be at least two weeks before the apa's turn up and the probably a while longer to get everything set up.

    Thanks again folks for all the help and advise.

  7. #32
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    Image pixel array utility: i have made a simple image utility for the APA102 24bit image arrays to use them in graphic poi / pixel poi. You can find it here:
    http://www.orchardelica.com/poisonic/poi_page.html
    it is written in html and is very basic, and works best with very low res images, otherwise there are some odd colour pixels (probably because I have not used any aliasing. let me know if it works for you, and i will improve it as required.

  8. #33
    Wow, that's fantastic. It seems to work perfectly for the image I just tested and a lot easier than the python method ( which I'm not sure worked well because the code was to four places not six)

    I'm still going for the simple route but having researched a bit over the last couple of days I'm a lot less intimidated by the idea of making my own boards now If it comes to that.

  9. #34
    Thanks You @mortonkopf for the converter seems to work great.

  10. #35
    Junior Member
    Join Date
    Oct 2015
    Location
    Atlanta, Fort Lauderdale
    Posts
    12
    Teensy drives the APA-102C ("Dotstar") just fine without a level shifter, when both are powered from a 3.7V LiPo battery. The LEDs are very bright at that voltage. Up to at least six strands of LEDs in parallel (all the +, -, clock and data connected together) works OK.

    At longer strand lengths (70+) and fast update speeds, the last several LEDs get glitchy; a workaround is to reduce the SPI clock speed to 2MHz. It helps to tell the FastLED library that you have one more LED than there actually is.

    To convert any image to a C array, use the open-source graphics program called GIMP, export an image as a .c or a .h file, see the output file itself for format details, it's mostly self-explanatory to a C programmer, let me know if you need help getting your code to read it.

  11. #36
    Thanks yanekm, I already have GIMP but I didn't know it could do that.

  12. #37
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    Or just use the simple image utility for the APA102 24bit image arrays to use them in graphic poi / pixel poi. You can find it here:
    http://www.orchardelica.com/poisonic/poi_page.html

  13. #38
    Yes, have been using your one so far mortonkopf, it works very well but I can see where an offline version might come in handy too.
    I have one poi pretty much done although its been a struggle, the tube I ordered was thinner than stated making things tricky.
    The battery and teensy only just fit in together with no room for a battery holder so I think I'm going to have to glue a wider tube onto the end, this will mean I'll be able to an 18650 in there though so its not all bad. I think I can still make it pretty but I'll post pics when I'm done and you can see for yourself.

    Managed to get teensy, flash extension and an ir receiver into the tube but I've only been using the code you wrote so far, which is working well.
    Got the poi to an ugly but swingable state so I can play with the timings to get it to display correctly and to find what images work best.

    Thanks for the help so far

  14. #39
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    Save the webpage for offline use from your browser? Which flash extension did you go with, one horse? None of the code on the converter should be server side, so it should work if you save a local copy.
    Last edited by mortonkopf; 10-16-2015 at 05:07 PM. Reason: added info on page save

  15. #40
    Doh, didn't think of that, yup that would work too.

    Yes, got the one horse one. Hoping to have routines of images I can select with the IR, halloween, christmas etc.

    These are plenty bright enough even in daylight, something some of my shopbought glow kit struggles with.

    I use a program for my show that starts the music and lighting routine from a foot pedal. I have in mind a future project to create a stand for these poi which will give them a signal at the start of the piece so they are in sync with each other and the music.

  16. #41
    Junior Member
    Join Date
    Oct 2015
    Location
    Atlanta, Fort Lauderdale
    Posts
    12
    For a threaded fitting to epoxy to the end to house a battery larger than would otherwise fit, take a look at "pvc compression coupling" -- Home Depot has them, among other places. https://www.google.com/search?q=pvc+...pling&tbm=shop

  17. #42
    That's not a bad idea, I was thinking to use aluminium mainly because I can get it in the right size and it will polish up nice.

    I had originally planned a unscrewable battery compartment using the end cap from a couple of broken maglights, but my polymorph fu wasn't up to it. I had resigned myself to having to open up the whole poi each time. This could work well, I'm gonna go see whats available from the local stores tommorow.

    I think ultimately, I'll probably go to the local makers club and get some help with a 3d printed solution.

  18. #43
    Found a solution!! I realized that I had some of the bottle preforms described in the adafruit genesis tutorial. I've had them for years, got them because they looked useful for something just wasn't sure what until now. I'm pretty happy with the result, its a little bit longer than your design mortonkopf but I got the changeable battery I wanted and I think I can make it watertight which would be a bonus in our climate for outside gigs.

    Just need to work out the code for the flash and the IR now


    Click image for larger version. 

Name:	poi1.jpg 
Views:	1059 
Size:	48.0 KB 
ID:	5309

  19. #44
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    that looks good. I guess you have to remove the battery to be able to upload new performance code? or will you only use the IR and have a set of performances that don't get updated very often? Ho are you dealing with an on-off button, I have a small micro switch on the shaft of the baton on the opposite site to the teensy, so that it fits in the space behind the lipo charger. Having said that, how are you accessing the usb port for lipo charging, withdrawing the battery - or it this part of the battery swap idea, so no lipo charger is used?

  20. #45
    Yes that is correct, Hoping to use the IR to select different routines and not have to update all that often, only for personalized logos/messages.
    The whole assembly slides out easily though so I can access the usb simply enough. I'm using an external charger I already have for my e-cigarettes.

    Currently there is no on/off mainly because I had difficulty in finding a switch small enough with a high enough rating. The battery holder has long enough leads to be withdrawn independently and is connected to a piece of stripboard reinforced with hot glue to protect connections.

    I plan to use the IR to put them into sleep mode before the show and use it to turn them on when needed, I appreciate this will use a little bit of power but not much. If it becomes a problem there is still a little space on the top of the battery holder where a switch could be placed but I think things will be fine with the way I plan to use them.

  21. #46
    Junior Member
    Join Date
    Dec 2015
    Posts
    5
    Hello,

    This is my first post on this forum. I have only little experience with electronics and I would be glad for any constructive criticism.

    I was inspired by the mortonkopf's LED poi project and I want to give it a try. I planned to extend the project for IR control just like Stuntmunky did. This are parts I want to use:
    - Teensy 3.2
    - APA 102, 144/m programmable leds LED
    - Lipo battery charger add on for Teensy, Designed by Pesky Products https://www.tindie.com/products/oneh...for-teensy-31/
    - SPI Flash Memory Add-ons for Teensy 3.X, 128MB, Designed by Pesky Products https://www.tindie.com/products/oneh...for-teensy-3x/
    - IR Receiver
    - Li-Ion Battery 3.7V

    Because I ordered APA102 recently I have to wait around a month from now, so I decided to carefully plan the steps how I want to make the whole thing. So here is the simplified circuit sketch (any mistakes?):
    Click image for larger version. 

Name:	teensy3.jpg 
Views:	1160 
Size:	215.9 KB 
ID:	5624
    I’m quite confident with soldering and crafting a tube case. Also programming I think I can handle with a little help of my friends, however I have some questions considering “hardwere-software” topic. Sorry if this are trivial questions, however it’s hard to find answers to them, because electronics is so huge subject:
    1. First thing is this SPI pins. According to specification of APA102, it uses SPI pins, however this are not obligatory according to this article https://github.com/FastLED/FastLED/w...or-Bit-banging . So what is the benefit of using SPI pins over any other digital non-SPI pins? As I understand correctly, Pesky’s SPI Flash Memory Add-ons for Teensy uses all available SPI-pins on the board.
    2. I am not sure how to use this additional SPI Flash Memory with Teensy? The designer of this shield proposes to use this library for communication: https://github.com/PaulStoffregen/SerialFlash I imagine to write something in the chip I need to create a program for Teensy, which creates a new file in the chip and then writes the file with the pattern in a code form. And for each new pattern I need to repeat the process, am I correct? And to read it I hope it’s just reading the proper file.

    I’m certain this are simple question, but not for civil engineer, me I think I will have still some more questions when the LEDs arrive, but I hope some of them I will solve by my own or with a help of programming friends.
    I am open for any comments and suggestions. Thank you.

    Fr1day

  22. #47
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    The Pesky flash add-on is by forum user OneHorse (try to PM), and I am sure he will answer questions about hooking up the flash. My query would be about how this SPI flash memory add-on will play with the SPI leds, and whether there might not be issues between them. FastLED allows soft SPI as well as the hardware SPI, i think that I read hardware spi on the teensy 3 is 24mbps and software is 4-6mbps, but hopefully someone will chip in with at the correct numbers. I have not used two spi devices together, as had trouble getting it working, so unfortunately can't offer any advice on using spi flash.

  23. #48
    Member
    Join Date
    Oct 2015
    Location
    Skopje Macedonia
    Posts
    26
    Hi
    Following #mortonkopf project i build (not finished) pov poi.
    I have 80-90% of the picture but i like to be full and in all circle.
    Changing in delayMicroseconds from 40-500 i have best result
    Maybe this video can explain wat i like to say.
    https://www.youtube.com/watch?v=fuRlwdvQ2hQ
    Thanks

  24. #49
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    876
    @dzuljo, I am not sure I understand what you are after. the pattern should just repeat, and so naturally fill the full circle. do you have gaps, or large delays between the pattern / image being called?

  25. #50
    Member
    Join Date
    Oct 2015
    Location
    Skopje Macedonia
    Posts
    26
    @mortonkopf
    I use your sketch and include only one array generated by your Pixel Poi image converter.Also change different image,result is similar.
    In the end of the sketch have x2 delayMicroseconds second is for next image (if its presented) or for different purpose?
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •