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

Thread: Teensy 3.2 Motorized Fader Controller

  1. #1

    Teensy 3.2 Motorized Fader Controller

    Hello. I'd like to create a usb MIDI based motorized fader controller, using the Motofader 64 as a starting point. This unit is meant to be a controller for a EQ Station 8, and doesn't work on its own or output any MIDI in its current state. It communicates solely with the EQ 8 unit via DB9 serial cable.

    The Motofader 64 features 29 motorized ALPS faders, controlled by 15 A3966 motor controllers. The fader levels are read by 4 MCP3008 A/D converters which communicate via SPI.

    The unit has a large 7v DC power supply and does it's own I/O using 2 FPGA chips over an encrypted serial protocol.

    Clearly, the easiest way to achieve my goal would be to hook into the serial port of the unit then translate the serial commands that move the faders into MIDI, but TC Electronics is not willing to provide me with a communication protocol guide, and the unit is in a 'disabled' state until it receives some encrypted handshake from the mother EQ unit. (I've tried hooking a logic analyzer up to see if anything was sent when I moved a fader, and there's nothing).

    So, i'd like to hack a Teensy 3.2 onto the board, cut the connection to the FPGA chips and just utilize the rest of the board and components.

    I'm not very familiar with motor control or SPI, and would love some help.

    A few specific questions:

    1. The A3966 (datasheet at this link) each control 2 motors. Does this mean I would need to dedicate two analog output pins on the teensy for each A3966?

    2. While I could potentially figure out how to communicate with one of the MCP3008's (datasheet), I don't really know how to go about communication with all 4 at once. Since the
    board is pre-made and I don't have a schematic, how do I find out which is the master and which are the slaves? I've read the PJRC guide on SPI, but I'm still kind of confused.

    3. I don't really understand the A3966 datasheet. My best guess is that I hook up analog out pins from the teesny to pins 4/5 for motor 1 and 12/13 for motor 2, then leave the rest of the connections on the existing circuit board intact.

    4. The open frame 7vdc power supply that powers this unit is kind of massive, and if possible, I'd like to replace it with something smaller. How can I go about measuring how much amperage the unit is drawing and if there's anything else I need to know before replacing the open frame supply with a small wall wart?

    5. If I do need two analog outs per PWM, that puts me at 29 PWM outs, whereas the Teensy 3.2 only has 12. How can I reconcile this? Is there a multiplexer or something of the sort that would solve this problem?Click image for larger version. 

Name:	20211125_110218_HDR (1).jpg 
Views:	19 
Size:	93.0 KB 
ID:	26684

    I've attached a photo of the PCB. Thanks in advance for your advice!

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,372
    Quote Originally Posted by vince.cimo View Post
    A few specific questions:

    1. The A3966 (datasheet at this link) each control 2 motors. Does this mean I would need to dedicate two analog output pins on the teensy for each A3966?
    Do you mean PWM pins?
    Each H-bridge on the chip takes a direction (which they misleadingly call phase) and enable digital logic signals. You would
    typically PWM only one of those pins, depending on the mode you want (PWM direction for a servo-motor/position control,
    PWM enable for one-directional speed control)

    2. While I could potentially figure out how to communicate with one of the MCP3008's (datasheet), I don't really know how to go about communication with all 4 at once. Since the
    board is pre-made and I don't have a schematic, how do I find out which is the master and which are the slaves? I've read the PJRC guide on SPI, but I'm still kind of confused.
    I guess you assume one is master the rest are slaves and drive the SPI bus appropriately (the datasheet should
    explain how chaining works for the chip - figuring out which channel is which is experimentation by moving
    the faders and seeing which channel responds.

    3. I don't really understand the A3966 datasheet. My best guess is that I hook up analog out pins from the teesny to pins 4/5 for motor 1 and 12/13 for motor 2, then leave the rest of the connections on the existing circuit board intact.
    Pins 2&3 for 1, pins 15&14 for 2.
    see previous answer - if you don't know what an H-bridge is, or various H-bridge modes, now is probably
    the time to learn
    4. The open frame 7vdc power supply that powers this unit is kind of massive, and if possible, I'd like to replace it with something smaller. How can I go about measuring how much amperage the unit is drawing and if there's anything else I need to know before replacing the open frame supply with a small wall wart?
    29 motors takes _lots_ of current, perhaps 15A to 30A peak in total, so no I doubt you can do anything about this. Even small motors
    can pull 1 to 2A when suddenly reversing. If the supply can't take this all the motor drivers will drop out at once. People always seem
    to underestimate the peak current requirements of even small motors (which consist of a metre or two of copper wire directly
    between their terminals - the DC resistance is usually an ohm or two at most). Motors are very current/power hungry and a small
    wall wart is completely out of the question.

    However if you decide you can get away with not driving all the faders simultaneously (which is usually a hard requirement
    for a auto-reconfiguring mixer desk BTW), you could maybe reduce the current requirement by some factor. The current pulled
    by motors is likely to be very bursty in nature so it does seem wasteful to have to size the supply for the peak, but that's
    what you need to have reliable operation, _unless_ you add a battery to the system. This is one way to provide high peak
    current without needing such a large supply - in effect your battery (likely a 2S LiPo (7.4V) pack or 2S LiFePO4 (6.4V))
    provides the current for the motors and a charging circuit replenishes it in the background. Its more complicated though,
    and batteries don't last forever, and they need adequate protection circuits.

    5. If I do need two analog outs per PWM, that puts me at 29 PWM outs, whereas the Teensy 3.2 only has 12. How can I reconcile this? Is there a multiplexer or something of the sort that would solve this problem.
    As I said you'd normally PWM one of the two pins only once you've decided on the operating mode (fast decay v. synchronous rect.),
    so 29 PWM pins and 29 standard GPIO (I/O extender chips for both PWM and simple GPIO are available).

    I'd suggest getting a small gear-motor with reduction of 100 or so, a pot, and a simple H-bridge motor driver (L293D perhaps), and
    experiment building one PID loop control system for that - you could even get a spare ALPS fader of the type in the unit for
    close match in behaviour.

    Conceptually its simple, you put setpoint and pot reading into the PID loop inputs, and convert the output into
    a PWM value (zero maps to 50%), and PWM the direction pin with the output. The PWM needs to be high enough for
    the inductance of the motor, try about 20kHz in the first instance (ultrasonic so shouldn't produce whining in the motor)

  3. #3
    I'd like to extend a huge thank you! You've given me a wonderful starting point. I'll keep you posted on the progress.

  4. #4
    Hello again! So I've made some progress on this, but have gotten a bit stumped.

    I'm able to individually address the MCP3008's, but if I connect the MISO pins together, the circuit no longer seems to work. I can only address a single a/d at a time, and only if they're not physically connected to the same MISO pin. Any idea why this may be or how to start diagnosing this?

    The MOSI, CLK, and power pins are all connected together with no issue, it's only the MISO pin for some reason.

  5. #5
    Senior Member
    Join Date
    Feb 2020
    Posts
    105
    Quote Originally Posted by vince.cimo View Post
    Hello again! So I've made some progress on this, but have gotten a bit stumped.

    I'm able to individually address the MCP3008's, but if I connect the MISO pins together, the circuit no longer seems to work. I can only address a single a/d at a time, and only if they're not physically connected to the same MISO pin. Any idea why this may be or how to start diagnosing this?

    The MOSI, CLK, and power pins are all connected together with no issue, it's only the MISO pin for some reason.
    Schematic?

    For SPI, each slave device needs a unique chip select, see CS/SHDN on the MCP3008. Is it wired that way?

Posting Permissions

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