Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: General Questions about custom teensy build

  1. #1

    General Questions about custom teensy build

    This is my first post, please be kind. ( But let me know if there is something I could do better)

    I am using a teensy 3.6 with APA102 LEDs to build a prototype persistence of vision flow toy. I am still in the design phase and haven't fully committed to parts. This is where I need help.

    Help me decide between the Following:
    1) build a custom teensy board that is essentially the teensy 4.0 with a few exceptions:
    -fewer pins (estimating 8-12) [I will be using 2 9DOF IMU, reading that and computing pixel instructions. I think I can power the teensy with a small button cell battery, and will send the output (3-6 pins) through a level shifter (maybe just an op-amp/undecided)]
    -The pins would be directed to the left and right sides of the board aleviating the need for the long row of pins (top and bottom on current builds.

    *I would like to utilize the teensy inside a 5/8" (~15-16mm) tube. I would be willing to design and build the board in eagle, I can cut a solder mask at school, and I would be willing to layout components by hand with a reflow station. I realize this is probably understating the difficulty and maybe out of reach to hand assembly but I've gotten away with this process on many occasions and I'm willing to take a stab.

    2) Alternatively and MUCH EASIER would be slicing the board along the row of pins. Possibly just enough to reduce the top-bottom dimension to a maximum of 0.625". Something like:
    __________
    |000000000 -> |uuuuuuuuu

    |000000000 -> |nnnnnnnnn

    I don't love this but it would certainly get me through proof of concept.

    3) There is actually a much simpler process, like using a tiny teensy that I don't know about or havent considered and somebody blows my mind with a brilliant comment?

    Thank you for reading!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,535
    Note, Paul hasn't released the bootloader chips for the Teensy 4.0 yet. He has released it for the earlier processors:


    So you could design something using the processor in the 3.6, 3.5, or 3.2. Paul has said the support for Teensy 4.0 is comping, it just isn't available now.

    If you wanted a proof of concept in a smaller package, and didn't need the processor speed of the Teensy 4.0, consider using the Adafruit Trinket M0. It is 27mm x 15.3mm x 2.75mm / 1.07" x 0.6" x 0.1". It has 5 pins (so 2 pins for i2c, 2 pins for APA102, and the leftover pin can do analog output if you wanted to add some sounds).

  3. #3
    Quote Originally Posted by MichaelMeissner View Post
    So you could design something using the processor in the 3.6, 3.5, or 3.2.
    Ahhh!! This is excellent feedback. I wasn't particularly sure or aware about this portion of the project. I don't think that this project requires nearly as much processing as the 4.0 can do. I will consider waiting or designing around another chip. Thank you!

    Quote Originally Posted by MichaelMeissner View Post
    If you wanted a proof of concept in a smaller package, and didn't need the processor speed of the Teensy 4.0, consider using the Adafruit Trinket M0. It is 27mm x 15.3mm x 2.75mm / 1.07" x 0.6" x 0.1". It has 5 pins (so 2 pins for i2c, 2 pins for APA102, and the leftover pin can do analog output if you wanted to add some sounds).
    Again this very helpful. I even have a trinket lying around I can use. Thank you.

    RE: _Processing Requirements._

    I originally selected the 3.6 as being ample in the processor department. This was with a team and over a year ago. Now that I have time to work on it again, I'm unsure about this calculus. If anyone is familiar with the LSM9DS1, please feel free to chip in. Using round numbers, here is what I'm thinking:

    -The LEDs have a 20khz refresh rate, meaning I can potential send them each a 32 bit instruction 20,000 times per second.
    -There are currently 75 LEDs (AND could be 300 LEDs)
    -I think that means I want to send at least 75*32*20000 = 48,000,000 bits per second! (BUT I remember there being some tricky reason why this is not true, like the first addressable LED was somehow able to send instructions to the next LED so the actual data stream was MUCH smaller) Is this true/has anyone played with APA102's?
    -I think the LSM9DS1 outputs 9 data points which together can be used to compute absolute position, but I think any computing must be done processor-side.*

    *Is this computationally expensive? Does anyone whose used an IMU think it can be done in real time (AKA Can I compute the position of the LED well enough to send LED instructions in the 1/20000 of a second the LED is actually occupying that place?) Or is this just naive?

    Thanks for reading!

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,535
    Quote Originally Posted by Monkey_Bones View Post
    Again this very helpful. I even have a trinket lying around I can use. Thank you.
    Be sure you have a Trinket M0 that uses an ARM M0 processor (equivalent to the processor in the Teensy LC), and not the older ATtiny85 based Trinket v1 or v2. The ATtiny85 projects have extremely limited memory. In addition, Adafruit now has a warning that some of the USB stacks for the PC/Mac/Linux are no longer compatible with the ATiny85's due to the ATiny85's using a bit-banging approach for doing USB.

    The Trinket M0 was introduced in September 2017. At the moment, Adafruit is sold out of the Trinket M0's, but digikey.com has quite a few on hand.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Quote Originally Posted by Monkey_Bones View Post
    but I think any computing must be done processor-side.*
    For number crunching, the Cortex M4 & M7 processors are vastly more capable than Cortex M0. You might think a Teensy 3.2 at 96 MHz would be about twice as fast as Teensy LC at 48 MHz. For many simple tasks, it is only about 2X to 3X the speed. But when it comes to numerically intensive work, often it's 5X or more faster. M4 has many more instructions and buses to memory, which makes a huge difference for that sort of more complex work.

    Of course, if you use floating point (commonly done for motion sensor data), the chips with FPUs (Teensy 3.5, 3.6, 4.0) will be much faster. Without the FPU, all floating point math is done via software which is about 30X slower than the FPU.

  6. #6
    Quote Originally Posted by PaulStoffregen View Post
    Of course, if you use floating point (commonly done for motion sensor data), the chips with FPUs (Teensy 3.5, 3.6, 4.0) will be much faster.
    This is the kind of hint that makes a big difference, thank you!

  7. #7
    I just realized I do NOT have a trinket anymore.

    Quote Originally Posted by MichaelMeissner View Post
    At the moment, Adafruit is sold out of the Trinket M0's, but digikey.com has quite a few on hand.
    Thanks Ordered!

  8. #8
    Update: Ok I've ordered the Trinket (M0) and will be using this in first layout. I don't expect it to work entirely but I think I will learn more by doing something I feel like the M4/M7 are likely to be a necessity but I don't understand this project enough yet.

    I expect many parts will trickle in and I may not make any progress for a couple weeks. I will make a post after I complete prototype! Stay tuned

Posting Permissions

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