Search results

  1. J

    [posted] Laser gates for measuring sports ball velocity

    Here is the GitHub repository for my speed reading code for the laser beams. https://github.com/jpswensen/SpeedReadTest/tree/main/src I need to update that public repository with some updates where I cut the number of beams per teensy down to 20, but can now do it on only two of the GPIO...
  2. J

    Teensy 3.2 End Of Life

    Kindof sad. The one thing I had used the LC for was a project that needed DAC output. The 4.x doesn't have that built in.
  3. J

    Useful script for generating objdump results from PlatformIO

    I think I cobbled this together from some other example I had seen for the ESP32. I was trying to optimize some code, so wanted to see the assembly that it was generating. Hopefully this is useful to some others. Steps to use: 1. Put the following python code in a file called post_build.py in...
  4. J

    Fastest pin reading in the west? Any ways to improve

    A bit more digging is showing that ldr is taking a lot more time than I was expecting. With the only the MOV and ADD instructions below, I was getting 25 cycle average with max of 28 With the LDR code includes, that increases to 56 and 84. I would expect to have only seen that increase to just...
  5. J

    Fastest pin reading in the west? Any ways to improve

    That helped a ton. I think I have it working now, but unfortunately learned that the compiler is still better than I am ;) The compiler generated code on average took 65 cycles with a max of 94. Mine is taking 83 cycles with a max of 112. I can see a few other places to tighten things up, but...
  6. J

    Fastest pin reading in the west? Any ways to improve

    I think I am almost there, but seem to be having a problem that my custom assembly is clobbering registers. At first I was using my function as inline to eliminate call overhead. Now I went back to -O0 optimization so that I could see explicitly where the crash was occurring with the CrashReport...
  7. J

    Fastest pin reading in the west? Any ways to improve

    I have a project (which I have posted about here previously) where I am trying to read 34 pins as fast as humanly/Teensy4.1 possible. I think I have come up with a pretty good solution, but am wondering if there are any tricks to make it go even faster. I boiled the approach down into a...
  8. J

    Actual current limitation of Teensy 3.2 and rules of thumb about typical/max current

    These sensors are pretty sweet. They are the Allegro A1454 and only run on 3.3V, unfortunately. One of the awesome things about these chips is that you can either use two external pins with various analog voltages from voltage dividers to get 15 different I2C addresses, or you can program an...
  9. J

    Actual current limitation of Teensy 3.2 and rules of thumb about typical/max current

    I have a design where I need to power about 60 I2C hall effect sensors. Their datasheet says a typical draw of 2mA, but a max draw of 5mA. I called their tech support and they couldn't give a clear answer on when that 5mA happens, though I suspect it is when it is either actively reading or when...
  10. J

    Pretty cool that the Stuff Made Here guy made a Teensy plug in his robot hair cutter

    I suspect that because he ran his robotic hair cutter off of a Teensy, he probably uses it on a bunch of his projects. He explicitly called it out in this video.
  11. J

    Weird electrical problem after installing at client facility

    This is driven by an RPI digital output. It is driving four different Teensy's, each of which is connected over about an 8 foot cable. Yes, there is a common ground bus. Each of the cables connecting the Teensy's back to the main electronics box have a ground wire connected to this ground bus...
  12. J

    Weird electrical problem after installing at client facility

    I don't think that is the issue. The data that gets recorded looks like a long list of: address,time,beam,bitpattern, In a single readout I see that time (which comes straight from the ARM_DWT_CYCCNT register) get reset in the middle of a readout. This virtually guarantees the that problem is...
  13. J

    Weird electrical problem after installing at client facility

    I recently delivered a consulting project I have been working on, but it isn't working as expected in the client facility. I had been testing this for months in my own shop and it was working flawlessly. Background This is in reference to the project I described in the blog submission page...
  14. J

    Making Teensy 4.1 carrier board 5V tolerant

    In a perfect world with infinite resources, I would agree with you. That being said, instructional lab budgets are tight and I feel bad about making students replace parts when a little bit of foresight on my part help prevent such problems. Since this is a Mechatronics course for Mechanical...
  15. J

    [posted] Laser gates for measuring sports ball velocity

    For some contracting work this summer, I built some laser gates for detecting the transit of a baseball/softball at up to 135 miles per hour. The Teensy 4.1 has been an incredible board for getting the timing down. The design is made up of 4 emitter boards (no Teensy) and 4 sensor boards (one...
  16. J

    Making Teensy 4.1 carrier board 5V tolerant

    I have been looking at making a carrier board for the Teensy 4.1 for the Mechatronics course that I teach that has some DC motor drivers, connectors for DC motors and encoder, stepper motors, etc. However, knowing that these are Mechanical Engineering students and often wire things up wrong...
  17. J

    Teensy 4.1: I think I made a mistake on my carrier board

    I think I will probably make the board mod I mentioned above, where I cut the trace from the micro-fit connector to the 3.3V pin, jumper from the micro-fit connector to the VIN pin, and change my microfit cable supply from a 5V supply instead of 3.3V. Just as a follow on question. On the...
  18. J

    Teensy 4.1: I think I made a mistake on my carrier board

    Am I completely misreading the Teensy 4.1 pinout document? I think that upper right pin in my schematic is ground, the lower right pin (without a connection) is the 5V pin, and the lower third-from-the-right pin is the 3.3V pin (which is connected to an external supply via my Molex Micro-fit...
  19. J

    Teensy 4.1: I think I made a mistake on my carrier board

    Well, I think someone answered my question, though it took a bit of searching to find it. https://forum.pjrc.com/threads/58874-Teensy-4-0-Can-t-program-when-using-external-power-supply?p=226095&viewfull=1#post226095 This makes me think that I can connect directly to the 3.3V pin with my...
  20. J

    Teensy 4.1: I think I made a mistake on my carrier board

    I think I was being dumb when designing my circuit board that would be the carrier for the Teensy 4.1. Since all my extra circuitry would be running off 3.3V and I was worried that the 250mA of the onboard voltage regulator wouldn't be enough, I instead was just going to use a 3.3V offboard...
  21. J

    Teensy 4.1: Storing the value of 18 pins' input quickly

    I can do all my timing analysis as a post-processing step, so my plan was to do something like the following (except extending it to read all of GPIO6, GPIO7, GPIO8, and GPIO9 which span my 34 inputs). Maybe polling in this manner will actually be slower than just using an interrupt on change...
  22. J

    Teensy 4.1: Storing the value of 18 pins' input quickly

    You are correct. I was mistakenly looking at the Teensy 4.0 section of that header file when counting :( As an additional question (though I should go home and test this on the scope), any idea how long it takes to poll each GPIOn_GDIR port? Can it be read in a single instruction cycle?
  23. J

    Teensy 4.1: Storing the value of 18 pins' input quickly

    I have been wondering the same question. I have a project where I am trying to get the relative timing of 34 pins going high and low. I haven't decided whether to use an interrupt on change on all of them, or just poll as quickly as possible. For the polling, I think you can just read the...
Back
Top