Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: luni

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Im currently on a vacation bicycle trip. Hard to...

    Im currently on a vacation bicycle trip. Hard to explain on the mobile. Basically you record the time for different number of loops. Draw a loops Vs time graph in any spread sheet app or manually....
  2. I can confirm that. Since they are so cheap I...

    I can confirm that. Since they are so cheap I sometimes mount them together with a small hub in the device enclosure and connect them to a few debug pins. Very convenient during development...
  3. I added a DigitalWrite(3, HIGH) at the beginning...

    I added a DigitalWrite(3, HIGH) at the beginning of the ISR and a DigitalWrite(3, LOW) at the end and used a cheap LA to measure the duration of the resulting peak on pin 3 for various iteration...
  4. I did a quick measurement and got some 50ns for a...

    I did a quick measurement and got some 50ns for a constant DigitalWriteFast and some 80ns with variable pin number.
    Instead of using DigitalReadFast with variable pins from an array you can also...
  5. Just an untested idea: can it be that reading the...

    Just an untested idea: can it be that reading the 16 lines with variable pin numbers simply takes too long, so that the interrupt will be called again immediately after it finishes? (It is much...
  6. Yes that looks OK. Remark: When you are...

    Yes that looks OK.

    Remark: When you are unsure it is always good to add the units to the calculation. You can then easily spot errors.


    (11000 stp/sec) / (2.5 stp/mm) = 4400 mm/sec
    (4400...
  7. I can recommend Octopart (a meta search machine)....

    I can recommend Octopart (a meta search machine). It has a very good search engine and you can easily select distributors. Personally, I often buy at TME. The link below shows TME and Farnell as an...
  8. This should do what you want: #include...

    This should do what you want:



    #include "TeensyStep.h"

    // since you know how to transform from mm to steps we can as well
    // assume that 1 step = 1mm

    int s = 6000; // total...
  9. I can give you a more detailed answer later today...

    I can give you a more detailed answer later today but I think all you need to do is calculate the acceleration you need for your movement.

    Standard kinematic formulas are (out of my head without...
  10. Try adding a pull down resistor, say 4k7 to the...

    Try adding a pull down resistor, say 4k7 to the pin. During the upload the Teensy pin will float which might generate the observed effect.
  11. Thanks again for finding all those bugs! Very...

    Thanks again for finding all those bugs! Very helpful indeed.
    It might be easier to continue this discussion on GitHub. I opened an issue here: https://github.com/luni64/TeensyStep/issues/47
  12. I tried this but it seems to work as it should....

    I tried this but it seems to work as it should. Here the LA output. (The peaks shown in the third trace are generated directly after the stop commands)

    16619


    This is already fixed in the...
  13. Replies
    3
    Views
    82

    Yes it does. To be precise each controller...

    Yes it does. To be precise each controller requires its own timer. But as Theremingenieur pointed out, there are 4 of them. So if you use less than 4 TeensyStep controllers you'll have spare interval...
  14. Replies
    5
    Views
    153

    Just installed the May update (0.23.0) of the...

    Just installed the May update (0.23.0) of the c/c++ extension which seems to fix a lot of the intellisense issues. At least for me it now reliably finds the headers. However, I'm not using...
  15. I did some experiments on your problem and came...

    I did some experiments on your problem and came up with a quite simple and obvious solution. The only reason why the number of controllers was limited to a total number of 4 was that each controller...
  16. index() is defined as a function in string.h....

    index() is defined as a function in string.h. This function seems to be deprecated but it looks like the ARM compiler used for Teensy 3 still implements it. I assume that the AVR compiler for...
  17. Replies
    8
    Views
    161

    For a quick check you can also use the compiler...

    For a quick check you can also use the compiler explorer:

    https://godbolt.org/z/gmpL_J

    I like how the compiler implements bad() :-)
  18. This is fixed now! The problem only occurred when...

    This is fixed now! The problem only occurred when using default speed settings and not calling setMaxSpeed. Now it should work correctly for default values as well. Thanks for spotting that one.

    ...
  19. Technically this is trivial, just declare the...

    Technically this is trivial, just declare the pointer to the controller in global space. But beware, this can very quickly lead to a complete mess. Usually you try not to pass responsibility for...
  20. Yes, but you should never directly call a...

    Yes, but you should never directly call a destructor. (https://isocpp.org/wiki/faq/dtors#dont-call-dtor-on-local).
    Basically, you have two options.


    Dynamically create the object on the heap...
  21. Sorry, that can't work. You generated the...

    Sorry, that can't work. You generated the controller objects on the stack of Setup(). Thus, they automatically will be (and need to be) destructed before Setup is left and the allocated stack on...
  22. Thanks again! I fixed this and uploaded. Looks...

    Thanks again! I fixed this and uploaded. Looks like it got lost during one of the merges. Should work now.
  23. Replies
    76
    Views
    7,648

    I just released version 2 of TeensyStep on GitHub...

    I just released version 2 of TeensyStep on GitHub

    New features:

    Improved rotational mode
    Possibility to override speed and acceleration of a group of motors on the fly (rotational mode...
  24. Thanks a lot for testing, I think it finally is...

    Thanks a lot for testing, I think it finally is time to merge the development branch into master.
  25. That should be fixed now, can you give it a try?

    That should be fixed now, can you give it a try?
  26. The bug is in the development branch right? I did...

    The bug is in the development branch right? I did a lot of work on the new RotateController recently, looks like the new StepController needs some attention as well. I'll have a look tomorrow.
  27. That's really cool! If you need somebody to...

    That's really cool! If you need somebody to outsource series production to, let me know :-)

    I'll add that to the application page if you don't mind.
  28. I meanwhile summarized this development as an...

    I meanwhile summarized this development as an application on the TeensyStep Hompage https://luni64.github.io/TeensyStep/applications/winder/
    @jpk: I'm not a violin string winder at all. I hope I...
  29. The sequence of overriding acceleration and speed...

    The sequence of overriding acceleration and speed should be irrelevant (at least this was the intention) I tried your change but I didn't observe any change.

    Anyway, I see what you want. The...
  30. Yes, you are absolutely right. This eliminates...

    Yes, you are absolutely right. This eliminates the ugly acceleration asymmetry in the feeder speed profile. I implemented a first try and pushed it to GitHub...
  31. Here the relevant code: void...

    Here the relevant code:



    void Winder::setSpindleSpeed(float rpm)
    {
    targetSpindleSpeed = rpm / 60.0f * spindleStpPerRev;
    }

    void Winder::setPitch(float pitch)
  32. I tried to reproduce your problem with changing...

    I tried to reproduce your problem with changing the pitch quickly on the fly. I first cleaned up everything and wrote a winder class which encapsulates all the code required to move your steppers. ...
  33. Your winder looks great, you definitely made huge...

    Your winder looks great, you definitely made huge progress compared to your first wooden model. Looks very professional now.


    Reading your explanation I think you have contradictory...
  34. Your code is a bit difficult to understand. When...

    Your code is a bit difficult to understand. When I did the example for you a few posts above I also started similar to your approach (calculating with the speed of both motors). After looking at the...
  35. I don't quite understand what you want to achieve...

    I don't quite understand what you want to achieve but I'd say it does what you requested. I added printout of motor speeds to your code. The result is shown below.

    16434

    You request motor1...
  36. Looks like you deleted stuff in #32? Anyway, I...

    Looks like you deleted stuff in #32? Anyway, I had a look at the issue with directly starting a move after an estop (the remaining code block in #32) This seems to be some timing issue. For a...
  37. Tested your code. Here is the output: 16425 ...

    Tested your code. Here is the output:

    16425

    Looks like it does exactly what it is supposed to?


    No, this was never possible, it is limited by the 4 PIT timers of the Teensies. However, you...
  38. Fixed a bug in the eStop routine on the...

    Fixed a bug in the eStop routine on the development branch. Can you give it a try?
  39. ... and here an example showing how to move your...

    ... and here an example showing how to move your winder a little bit to the right without changing the overall pitch. I.e., the red motor increases speed only for a small period and then goes back...
  40. Ratio Adjustment using 2 controllers

    Originally I didn't recommend using two controllers for your problem since the acceleration algorithm is integer based. To fix the issue you found (small accelerations rounded down to zero) I needed...
  41. Sorry, my question was unclear. I was interested...

    Sorry, my question was unclear. I was interested in some code showing this:






    For technical reasons I split up the old controller into two: StepControl and RotateControl. StepControl is...
  42. I'm currently traveling and can only answer...

    I'm currently traveling and can only answer briefly from my mobile.
    Yes, I fixed the acceleration bug and added an override acceleration feature. Both are only implemented for the rotation...
  43. I would say your observed effect is simply an...

    I would say your observed effect is simply an effect of discrete mathematics:
    Assume that the second motor runs at say 1/3 of the speed of the first motor. I.e, after 3 steps of the first motor the...
  44. Thanks for the explanation and the video. The...

    Thanks for the explanation and the video. The speed and precision of the winding is quite impressive. I think I understand now what you want to achieve.

    To see what is possible I did a quick...
  45. They look good! So, you finally used a ECAD...

    They look good! So, you finally used a ECAD instead of Frizing? Looks like KiCad? One question: why do you have the T3.6 on the breakout and then the breakout on the board? Couldn't you design the...
  46. Have a look at VisualTeensy...

    Have a look at VisualTeensy https://github.com/luni64/VisualTeensy. It generates purely makefile based Teensy projects for VisualCode (Win10). For a quick start you can point it at your standard...
  47. Nice coincident, I just came back from a Schumann...

    Nice coincident, I just came back from a Schumann /Schubert concert were I was wondering if they are already playing with your Teensyfied strings :-)


    Sorry, the new version is still on the...
  48. Replies
    7
    Views
    230

    Thanks defragster, with that obvious push in the...

    Thanks defragster, with that obvious push in the right direction it was easy to google:



    So, seems to be save to connect a self powered device to the USB Host. So, I'll give it a try and see...
  49. Replies
    7
    Views
    230

    That might be true indeed. For some reason I...

    That might be true indeed. For some reason I thought that a self-powered device will put 5V on the USB like a USB host does... On the other hand: why did Paul add those Host/Device pads on the...
  50. Replies
    7
    Views
    230

    Nobody with experience using bus powered and...

    Nobody with experience using bus powered and selfpowered USB devices with the T3.6 USB-Host?
Results 1 to 50 of 429
Page 1 of 9 1 2 3 4