SNVAA20 July   2021 DRV8833 , DRV8833 , LMR33630 , LMR33630

 

  1.   Trademarks
  2. 1Introduction
  3. 2Motorized Resistive Load Architecture
    1. 2.1 Controller Board
    2. 2.2 Resistor Plate
  4. 3Motorized Resistive Load Design
    1. 3.1 Controller Board Design
      1. 3.1.1 Power Management
      2. 3.1.2 Power Converter Selection
      3. 3.1.3 Interface and ADC Selection
    2. 3.2 Resistor Plate Design
      1. 3.2.1 Motor and Motor Driver Selection
      2. 3.2.2 Resistor Track
      3. 3.2.3 Mechanical Arm Assembly
      4. 3.2.4 Feedback Control
  5. 4Thermal Considerations
  6. 5Performance and Results
  7. 6Summary
  8. 7Appendix
    1. 7.1 Controller Board Main Schematic
    2. 7.2 Controller Board Sub-Schematics
    3. 7.3 Resistor Plate Schematics
    4. 7.4 Python Code

Interface and ADC Selection

To interface with the motorized resistive load, the user must turn a knob that controls the target resistance, and press a tactile button to confirm the target resistance and initiate the command. The knob is a potentiometer with the center tap connected to an ADC, and the remaining two taps are connected to the quiet 3.3-V rail, and GND respectively. As the knob is turned, the center tap voltage changes, and its value can be used as a reference to set the target resistance. To signal the Raspberry Pi that the button has been pressed, a GPIO pin is configured to be an active-low input pin and an internal pullup resistor is connected to the pin. This causes that pin to be pulled up to 3 V by default and when this pin is pulled down to 0 V, the Raspberry Pi is signaled to take action. The circuit for the interface is shown in Figure 3-2.

Figure 3-2 User Input Interface Circuit

The selected button for this design includes an embedded blue LED. Blue LEDs have a relatively high forward voltage drop and so the 5-V rail that powers the Raspberry Pi also biases the anode of this LED. The cathode connects to one side of the switch, that also connects to a GPIO pin. To protect the 3-V pin from the 5-V source, a diode and current-limiting resistor are placed in series with the GPIO pin and the switch node connected to the LED. The other end of the switch is connected to GND. When the button is pressed, the GPIO pin is pulled to 0 V through the switch. During this time current also flows from the 5-V rail through the LED, lighting the LED up and indicating to the user that the pin has been pulled low. When the button is not pressed, the protection diode is reverse biased with 5 V on the cathode and 3 V on the anode, protecting the GPIO pin. In this state, the LED will not be lit. The 3-V GPIO pin is connected to GND via a high impedance resistor to prevent it from floating during power up.

Raspberry Pi models are typically equipped with GPIO pins only. These pins are digital and current Raspberry Pi models do not have analog input/output pins. This makes the selection of an external ADC necessary to convert user inputs into valid signals. To make a functional knob, a potentiometer can be used with 3.3 V applied on one terminal, an external ADC input on the center tap (variable terminal), and GND on the last terminal. This allows the ADC input signal to vary from 3.3 V to 0 V. The ADC reading can be mapped to a resistance and used as the target value. Limiting the resistor range by using the same resistors on the resistor track allows for a simpler mapping of the potentiometer voltage to resistance. To match the target resistance to the actual resistance, the potentiometer voltage is first mapped to a target resistance. Then the motor is commanded to rotate in single step increments, with the ADC taking a single measurement between each step, until the measured voltage on the second ADC matches the expected voltage, within a suitable threshold. The load range and resistor values will affect the threshold value.

The ADC121C021 is an I2C-Compatible, 12-bit analog-to-digital converter that can communicate with the Raspberry Pi via I2C and has enough resolution to ensure accurate voltage measurements:

Equation 5. A D C V o l t a g e _ R e s o l u t i o n = V A D C _ R e f 2 n _ b i t s A D C V o l t a g e _ R e s o l u t i o n = 3 . 3 2 12 0 . 8  m V

The other ADC121C021 is used to read in the current load resistance value and its input terminal can be connected to an external port to facilitate its connection to the resistor plate PCB.