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

Thread: Teensy 3.6 controlled motorfader panel

  1. #51
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Quote Originally Posted by vjmuzik View Post
    Alright I finally got one channel breadboarded and tuned the PID with what I had available on hand and itís pretty good (quick and accurate). Itís quite a bit of components per channel, but I personally feel itís smoother than PWM.

    Hereís what the breadboard looks like:
    Attachment 20417

    Quick video of it action, there is no motor noise just noise from the bushings being worn out in this fader:


    It can still be a tiny bit faster, I only have a 20v power supply on my test bench, this is also without having the correct op amp since this one can't produce close to its rails so moving the fader up is ever so slightly slower than going down right now. To interface this analog circuitry with a Teensy you would have to use a DAC in place of the rotary pot which I plan on using 2 AD5592R DAC/ADCs per 8 channels for a theoretical 12 bit resolution. This uses very little pins so if you wanted to you can control a lot of faders and other peripherals with just one Teensy.

    I'll make a schematic of this likely tomorrow, this breadboard doesn't currently have the circuits for the low pass filters and buffers connected that would be on this in a final product.
    Very interesting development! It does really seem to run smoother than the pwm drive. Two questions:
    What would be required to create a setup for 16 or even 32 faders ?
    How do you tune the PID parameters for the faders?

  2. #52
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    To create a setup for more faders you just have to repeat the circuit for however many faders you want, then interface it to the Teensy however best makes sense. Like I said for me personally I'm going to be trying it with AD5592R chips for 12 bit resolution. You need 1 ADC and 1 DAC per fader, the ADC part can be directly connected to the Teensy already and you could use PWM to emulate a DAC.

    As for tuning the PID it is tuned by changing out 2 capacitor values and 2 zener diodes(or 1 resistor), P is the diodes and ID are a capacitor each. The extra capacitors and diodes you see in the video were parts I was using to test different tunings, it can be tweaked really easily you just have to swap them out and see what works best for you.

    I'm working on the schematic right now so I'll label the relevant parts to change depending on your setup.

  3. #53
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    Here is the schematic of my current breadboard, I'm using a TL084 right now for the bottom 2 op amps, but any should work.
    Click image for larger version. 

Name:	Screen Shot 2020-06-04 at 6.05.39 AM.png 
Views:	44 
Size:	48.6 KB 
ID:	20488
    Attached is also the KiCad project file.
    Edit: Also if anyone else builds this and it doesn't seem to be working right then you have to swap your motor wires around
    Attached Files Attached Files

  4. #54
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Quote Originally Posted by vjmuzik View Post
    Here is the schematic of my current breadboard, I'm using a TL084 right now for the bottom 2 op amps, but any should work.
    Click image for larger version. 

Name:	Screen Shot 2020-06-04 at 6.05.39 AM.png 
Views:	44 
Size:	48.6 KB 
ID:	20488
    Attached is also the KiCad project file.
    Edit: Also if anyone else builds this and it doesn't seem to be working right then you have to swap your motor wires around
    Thanks for providing the schematic. I'll stick to my pwm approach for now, maybe in the future when I want build another device with motor faders I'll use this approach. It would interest me what the 'big boys' like SSL are using for motor control.
    When I revisit the code I plan on creating some kind of automatic PID tuning per fader to compensate for differences in friction between the faders. I think the way the faders move can be improved but as I said before for my purpose (preset recall) it works fine now. If the main purpose is slow volume fading than it makes sense to use the analog PID control, especially if the fader also carries analog signal as pwm would interfere with those signals.

  5. #55
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    Your other option is to just use the Motor Control part of the circuit and handle the PID and offset in the processor. The Uptown System 2000 did it this way, but each fader also had its own processor so it had enough cycles to handle the load. Of course that was decades ago so the Teensy definitely has enough processing power to handle more than one channel.

    I haven’t had a look at SSL consoles, but I can tell you the Digidesign/Avid Pro Control, Control|24, and Artist Mix all use PWM control. It can easily be distinguished by the horrible performance when you group the faders and they can’t all line up correctly and in a timely fashion. Considering API bought Uptown Automation they are likely using a similar setup in their new consoles today.

  6. #56
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Quote Originally Posted by vjmuzik View Post
    Your other option is to just use the Motor Control part of the circuit and handle the PID and offset in the processor. The Uptown System 2000 did it this way, but each fader also had its own processor so it had enough cycles to handle the load. Of course that was decades ago so the Teensy definitely has enough processing power to handle more than one channel.

    I havenít had a look at SSL consoles, but I can tell you the Digidesign/Avid Pro Control, Control|24, and Artist Mix all use PWM control. It can easily be distinguished by the horrible performance when you group the faders and they canít all line up correctly and in a timely fashion. Considering API bought Uptown Automation they are likely using a similar setup in their new consoles today.
    I kind of like the idea of making the PID control analog as it get's rid of any loop timing problems. How do you intend to implement this physically, groups of 8? It would seem to me that using an ADC and DAC for controlling 8 faders would make a nice module with SPI interface which enables high speed communication so controlling multiple modules will not be an issue.
    What kind of faders are you using? Any thoughts on what are good faders (precise control) and where to get them.

  7. #57
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    Depending on the application I plan on doing groups of 8 or 16, but I imagine it can easily handle more than that. I will probably make a daughter board that handles 4 channels each since my faders are pretty spread out I canít just feasibly make one board 16 faders long.

    I have Penny & Giles PGFM3000s: https://www.cw-industrialgroup.com/g...m3000_brochure
    They donít make this specific style anymore, but I imagine the new PGFM3200s are just as good if not better than these.
    Iím happy with their performance considering mine were manufactured in the early 90s and they still work flawlessly today.

    I havenít made a schematic of the touch sense board yet, but itís a little board attached to each of the faders that handles it with analog circuitry as well. Itís much more accurate than using the touch pins on a Teensy, the best part is you donít even have to be touching ground and itíll still be able to register skin contact correctly.

  8. #58
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Quote Originally Posted by vjmuzik View Post
    Depending on the application I plan on doing groups of 8 or 16, but I imagine it can easily handle more than that. I will probably make a daughter board that handles 4 channels each since my faders are pretty spread out I canít just feasibly make one board 16 faders long.

    I have Penny & Giles PGFM3000s: https://www.cw-industrialgroup.com/g...m3000_brochure
    They donít make this specific style anymore, but I imagine the new PGFM3200s are just as good if not better than these.
    Iím happy with their performance considering mine were manufactured in the early 90s and they still work flawlessly today.

    I havenít made a schematic of the touch sense board yet, but itís a little board attached to each of the faders that handles it with analog circuitry as well. Itís much more accurate than using the touch pins on a Teensy, the best part is you donít even have to be touching ground and itíll still be able to register skin contact correctly.
    If I'm not mistaken Penny & Giles is the gold standard when it comes to (motor driven) faders They're probably more expensive than the N series ALPS I used but it could be worth it if one can achieve perfectly synchronous (slow) movement of multiple faders.

    Glad you mentioned the touch sensing, I was wondering about that. Good to hear you already have a good solution.

    Keep us posted on any developments!

  9. #59
    What I don't fully understand is why you are using PID control in the first place. My experience with these motor faders (alps type) is that they have so much static and dynamic friction that inertia plays a very unimportant role. That might be different with Penny & Giles.
    A very fast bang-bang control loop plus some deadband should work better?

  10. #60
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    In my case the PID control adds more acceleration with no dead-banding, without it the acceleration is just linear which can be slow in certain cases. It also has a little deadbanding without it because once it’s close to the set value there just isn’t enough current for the last fine movements. It’s already super smooth without PID it just helps me squeeze a little bit more accuracy and speed out of it. There’s also no need for even a fast control loop with the all analog approach, for simplicities sake I’ve just been testing it with a Teensy LC and even on that it has plenty of operating power. Considering the original 8 channel circuit was using a 16Mhz 8 bit IC from 30 years ago it’s definitely a step up.

  11. #61
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Quote Originally Posted by cinhcet View Post
    What I don't fully understand is why you are using PID control in the first place. My experience with these motor faders (alps type) is that they have so much static and dynamic friction that inertia plays a very unimportant role. That might be different with Penny & Giles.
    A very fast bang-bang control loop plus some deadband should work better?
    Maybe if you limit the power / voltage and are ok with slower response. On the web there're some examples where people use a battery to power the fader, this will limit the current drawn. I found that with full power the faders will overshoot and oscillation will occur. For the use case of preset recall I wanted the fasted response possible so I opted for full PID control.

  12. #62
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    Alright I worked out the touch sense boards since I will have to redo them and make more so I can add more faders, it's quite interesting how they work and I know that the Digidesign Pro Control employs a similar method for detecting touch though it isn't all analog there.

    Here is the resulting schematic minus any ESD protection on the Touch_In line:
    Click image for larger version. 

Name:	Screen Shot 2020-06-18 at 7.32.23 AM.png 
Views:	25 
Size:	47.3 KB 
ID:	20637
    Not all values have to be exact, but it's best to have a scope if you decide to change them to see what's happening.

    If anyone wants to know how this works here goes, the first comparator starts by creating a square wave at about 60Khz:
    Click image for larger version. 

Name:	Screen Shot 2020-06-18 at 7.23.36 AM.png 
Views:	7 
Size:	12.0 KB 
ID:	20638

    When you introduce skin contact you create interference in this square wave, slowing it down:
    Name:  Screen Shot 2020-06-18 at 7.24.06 AM.png
Views: 104
Size:  8.9 KB

    From the output of the first comparator you have a simple high pass filter to filter out the 60Khz, here it is untouched:
    Name:  Screen Shot 2020-06-18 at 7.25.10 AM.png
Views: 107
Size:  9.7 KB Touched: Name:  Screen Shot 2020-06-18 at 7.25.34 AM.png
Views: 91
Size:  9.6 KB

    From that you compare it to a threshold voltage in the second comparator, that gives you a square wave only when it's touched:
    Name:  Screen Shot 2020-06-18 at 7.27.16 AM.png
Views: 107
Size:  9.4 KB

    When that square wave goes through the diode only the positive side conducts, the other side of the diode is weakly pulled down to ground with an added capacitor to further slow down voltage changes, the square wave thus becomes this:
    Click image for larger version. 

Name:	Screen Shot 2020-06-18 at 7.28.42 AM.png 
Views:	5 
Size:	11.7 KB 
ID:	20643

    All that's left for the last comparator to do is another threshold test and you get a nice smooth output of logic low when it's touched:
    Click image for larger version. 

Name:	Screen Shot 2020-06-18 at 7.29.31 AM.png 
Views:	6 
Size:	8.3 KB 
ID:	20644

  13. #63
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Is it your intention to have these boards assembled somewhere or do you want to solder them yourself? It seems to me that to keep the board small one would use SMD. Are there any issues combining the touch circuit and the analog PID control on the same board, i.e. any special layout considerations?

  14. #64
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    There should be no issues, the Uptown System 2000 had it all on one board, likely 4 layers with a ground and power plane like the System 990. Just about the only special layout that I can see from my System 990 board is the power plane is split in half so underneath all the analog chips sits the analog reference voltage and the logic voltage is on the other half, there isn’t a separate analog ground plane though. The 24v power for the op amps just snakes between the top and bottom layers so there isn’t much consideration there, the touch sense of course just uses your normal logic supply so 3v3 for most Teensies.

    I definitely plan to have them manufactured somewhere, I can do SMD soldering at least up to a tssop, but with the amount of boards I’m going to need it’s not worth doing it myself nor would it be fun. I’m still debating if I want to combine everything or not, if I do then I can just use a Teensy LC per channel to simplify things for other I/O purposes. Since it would already have a 12 bit DAC I wouldn’t need a separate chip so it is starting to sound more appealing to me. Decisions, decisions.

  15. #65
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    569
    Quick followup on this while it's on my mind, while looking through the service manual for a recently acquired Lexicon 960L I got curious about the schematic for the LARC2 controller since it has motorized faders. The touch sensing part of the faders is nice and compact while probably functioning as good as the Uptown faders since it has a similar theory of operation, but instead of altering the frequency of a square wave with your bodies capacitance you are altering a low pass filter instead.

    You can find the service manual here: http://www.synfo.nl/servicemanuals/L...ICE_MANUAL.pdf
    The touch sense schematic is located on page 209 or 9-61

    For my own sanity check I quickly made a board using the smallest SMD parts that JLPCB had in stock for their assembly service to see how small it could end up being and here's the result.
    Click image for larger version. 

Name:	Pasted Graphic.png 
Views:	4 
Size:	176.9 KB 
ID:	21212
    The three parts marked shared are common for all eight channels so they wouldn't be repeated for subsequent channels and they are there for ESD protection.
    For more than one channel, as shown here, you could use dual or quad channel ICs and save even more space.

    As for the motor control circuit I would ignore that part because it just uses PWM and it looks horrible, it works for preset recall but not for automation in any sense of the word.

  16. #66
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    178
    Congratulations on your acquisition! That's some seriously nice kit :-)

    The board certainly is small. If you plan on having a batch made, let me know as I would like to participate.

Posting Permissions

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