Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 37 of 37

Thread: Teensy 3.6 controlled motorfader panel

  1. #26
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    155
    Code:
    i just wanna controll 8 midi motorized fader in protools 
    i see in your code that the #define FOLLOW that is the incoming controling value and i wonder if:
    #define FOLLOW 0x7F from the midi out can be work on the fader?
    There's no such thing as 'just controlling faders'. What protocol will be used for the feedback? How do you switch banks? How do you prevent the fader working against you (Protools moves it but you want to move it to)? These are all things you'd have to solve in your code as nothing of this is contained in my two projects.
    If you just want to have control over the channel volume you're much better of getting a (used) midi controller, it will be difficult to build something for less and it is not at all certain that the end result will be what you want it to be.

  2. #27
    Quote Originally Posted by Gerrit View Post
    Code:
    i just wanna controll 8 midi motorized fader in protools 
    i see in your code that the #define FOLLOW that is the incoming controling value and i wonder if:
    #define FOLLOW 0x7F from the midi out can be work on the fader?
    There's no such thing as 'just controlling faders'. What protocol will be used for the feedback? How do you switch banks? How do you prevent the fader working against you (Protools moves it but you want to move it to)? These are all things you'd have to solve in your code as nothing of this is contained in my two projects.
    If you just want to have control over the channel volume you're much better of getting a (used) midi controller, it will be difficult to build something for less and it is not at all certain that the end result will be what you want it to be.
    For now I have seceded to move the fader with midi with the Cody code with some of my changes. The fader not running smoothly but its move's up and down follow the software.
    My next test is to send the midi RX data to the (receive event) in your code.
    I'll uptade soon and upload my ino file if I'll make it working good.
    Last edited by rotabox; 08-29-2018 at 03:54 PM.

  3. #28
    Senior Member
    Join Date
    Apr 2017
    Posts
    126
    Quote Originally Posted by Gerrit View Post
    Using a Teensy 3.6 to control 8 ALPS motorfaders:



    L293B H-bridges are used to drive the motors. The fader wipers and touchtracks are connected directly to the Teensy. Each faders has it's own PID control using 12 bit PWM at 14648.437 Hz. The ResponsiveAnalogRead library is used for the analog inputs, notice how stable the values are. Separate timers are used for the analogRead and touchRead:
    Code:
    elapsedMicros sinceFaderRead;                         // timer for fader check
    unsigned int  faderReadInterval=500;                  // interval in microseconds for checking fader position(update)
    elapsedMicros sinceTouchRead;                         // timer for touch read
    unsigned int  touchReadInterval=5000;                 // interval in microseconds for reading fader touch
    A second Teensy is reading the values from the faders via I2C and shows the raw values on the LED displays using the LedDisplay library.

    Fader panel bottom view:

    Attachment 9884

    The plan is to create a MIDI step & pattern sequencer with presets and this is an important first step. The code will of course be available when finished, in the meantime I'll be happy to provide snippets if somebody is interested.
    A very big Thank You to everybody involved with the Teensy, Arduino and the great libraries that are available!

    Kind regards,

    Gerrit
    My guess is this is supposed to be similar to a Roland MC-808 in the way it uses motorized faders to control and recall parameters such as volume and pan.

  4. #29
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    155
    Quote Originally Posted by vjmuzik View Post
    My guess is this is supposed to be similar to a Roland MC-808 in the way it uses motorized faders to control and recall parameters such as volume and pan.
    No, not volume and pan but the parameters of the individual steps (notes). The test setup supports control of pitch, velocity, length, position and a controller for each individual step. The timing uses midi beat clock as a floating point value, note events in between to midi clocks are handled by timing. The note off event is also sent based on a timer. The length of a note can be varied between 5% and 100% of the step length. The position can be varied between -50% and +50%. Of course this all works while the sequencer is running. The four buttons with the LEDs select the different parameters for editing.

    Here's a design sketch of what I have in mind:

    Click image for larger version. 

Name:	Four-Channel-Sequencer.jpg 
Views:	33 
Size:	50.8 KB 
ID:	14606

    This use case requires that the faders are really fast, switching parameters or patterns for editing should be near instantaneous. The FOLLOW mode of the panel is used for what I call 'Link mode', moving one fader will cause all other faders to follow either relative or absolute.
    Although the current prototype has just 8 steps, one channel and a single pattern it's already great fun to play with because you have real hands on control of expression (velocity, controller) and timing (length, position) while the sequencer is running. Great for some 'Tangerine Dreaming'

  5. #30
    Absolutely love these builds.

    Do you have to use two teensy’s? Why not one for everything?

    I am so curious about the enclosure. Well done!

    I want to see vids of the Mackie control too!

  6. #31
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    155
    Quote Originally Posted by kirkwoodwest View Post
    Absolutely love these builds.

    Do you have to use two teensy’s? Why not one for everything?

    I am so curious about the enclosure. Well done!

    I want to see vids of the Mackie control too!
    Thank you

    The faders use up all the pins on one Teensy (up, down, touch, analog, all times eight) and I don't know how to control the faders using port expanders and because I use PID control the (PID loop) timing has to be stable and having the Teensy doing something else didn't seem like a good idea. As this is intended for use with a sequencer the timing argument also works the other way around, the sequencer timing shouldn't be influenced by the fader control. Motor faders are mostly used in control surfaces and these don't do much computing compared to a sequencer. So far I didn't get any comments on the PID control itself or the way the faders are controlled so I don't know if this is the way to do it. The fader control still needs some tuning with respect to the fine movements but the speed is excellent. Speed is very important because the recall of settings should be very fast, the way the faders move on my old Logic Control would be too slow for quick recall of settings.

    For the panels I used Schaeffer's Front Panel Desinger, not cheap but the results are great and you know exactly what it's going to cost beforehand. The enclosure I made myself using a table saw and other tools.

    Still haven't gotten around to making a video of the midi controller, the reflective screens make it difficult to get a good picture and I'm also working on changing it to an OSC (Open Sound Control) controller. I'm in the process of moving form Logic X to Reaper as I'm not happy with the multi track midi recording in Logic and I don't use the Logic instruments and effects anyway. Reaper has extensive OSC control facilities which go beyond what's possible with the Mackie protocols (MCU or HUI).

  7. #32
    wow very cool. Please keep us posted.

    Quote Originally Posted by Gerrit View Post
    Still haven't gotten around to making a video of the midi controller, the reflective screens make it difficult to get a good picture and I'm also working on changing it to an OSC (Open Sound Control) controller. I'm in the process of moving form Logic X to Reaper as I'm not happy with the multi track midi recording in Logic and I don't use the Logic instruments and effects anyway. Reaper has extensive OSC control facilities which go beyond what's possible with the Mackie protocols (MCU or HUI).
    Powerful. I love the direction this is going.

  8. #33
    Sorry if this is off topic (and double if it was mentioned and I missed it) but can you give some detail on the 4-char displays? Are they just eight 5x7 led displays like Avago sells? How’d you mount them?

  9. #34
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    155
    Quote Originally Posted by bjosephs View Post
    Sorry if this is off topic (and double if it was mentioned and I missed it) but can you give some detail on the 4-char displays? Are they just eight 5x7 led displays like Avago sells? How’d you mount them?
    Yes, these are Avago (now Broadcom) HCMS-2965 4 digit LED displays. They're just mounted on some strip board:

    Click image for larger version. 

Name:	SPS-8-interior.jpg 
Views:	43 
Size:	141.3 KB 
ID:	14848

    They're pretty expensive but the readability is excellent and there's no burn-in like with OLED. I also very much like the look with the transparent red acrylic cover. The LedDisplay library is easy to use but a bit slow for my purposes. Updating the eight displays takes 20ms with the library, I copied parts of the library into my sketch and changed the way the display is updated and now it takes 0.7ms to update all eight displays.

  10. #35
    Very nice. I went the OLED route with my early experiments because I wanted VU meters and pan position without having to support and drive so many LEDs. If I go back to this I’ll make a board with its own atmega chip that just takes in I2C data and outputs SPI to the displays (like a little video card).

    https://youtu.be/CIs-mdPnIRk

  11. #36
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    155

    Next generation panel

    While strip board is nice to develop and test stuff there comes a point when you just have to create proper circuit boards for your project so I took the time to learn how to use KiCad and designed boards for my sequencer project. I’m not an electrical engineer but I tried to design the board as best as I could keeping the high current motor stuff as far away as possible from the fader input. The thermal relief for the four ground pins of the L293B was removed as the copper ground plane is used as a heatsink, same for the high current connections. The copper layers are 35µm.

    This is what the KiCad 3D render looks like:

    Click image for larger version. 

Name:	motorfaderpanel-render.jpg 
Views:	37 
Size:	100.8 KB 
ID:	15434

    And here’s a picture of two boards for a total of 16 motor faders:

    Click image for larger version. 

Name:	FaderPanel_rear_1.jpg 
Views:	66 
Size:	141.4 KB 
ID:	15433


    Here’s the KiCad project: Fader_Motor_KiCad.zip
    The updated sketch for the panel: Zeus_FaderPanel_181227.zip

    Any comments on the board design are welcome. There's at least one issue that needs fixing; the 100µf capacitor on the analog reference should be moved, the USB connector barely fits. Note that he pin numbers in the schematic do not match as I had to move around pin connections to fit everything on the PCB, the sketch contains the correct numbers.

    The new setup has completely separate power supplies for the 5V logic and the 10V motor supply and the faders all have 10nF decoupling caps directly on the input, the result is that the response of the faders is most excellent. The link mode is working flawlessly now, completely stable values while 15 faders follow the one that’s moved. It's really nice to see how 15 faders move like a perfect Roman cohort as they follow the fader that's moved.

  12. #37
    Junior Member
    Join Date
    Jun 2014
    Posts
    3
    Hey Gerrit thanks for sharing! I've been working on a level shifter for a fader board I pulled from my Yamaha 01v. And I've been reading PID w/o a PHD, but your code is fast tracking me. Just wanna say 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
  •