Hello

Welcome lekule blog

Hi, I`m Sostenes, Electrical Technician and PLC`S Programmer.
Everyday I`m exploring the world of Electrical to find better solution for Automation.
together in the world. #lekule86
Join us on

C-BISCUIT: Schematic Design for the RCB—Microcontroller, Motor Controller

Refresher and Intro

In the previous C-BISCUIT article (Robot System Architecture), I discussed the updated and refined system architecture for the robot that will be used to test and demonstrate the C-BISCUIT platform. One of the essential components in this architecture is the Robot Control Board (RCB), which is a custom-designed PCB that must be able to do the following:
  • transmit data to and receive data from the Wandboard
  • generate drive signals for the two brushed DC motors that move the Tri-Track robot chassis
  • provide a regulated 5 V supply for the Wandboard and a regulated 3.3 V supply for logic-level circuitry on the RCB
  • monitor the battery-pack voltage and take action to prevent excessive discharge
The central component on the RCB is an EFM8UB2 microcontroller from Silicon Labs. This 48-pin device is compact and affordable yet very capable; it is responsible for initiating, performing, or supervising almost everything that happens on the board. The following diagram conveys the architecture of the RCB:



This is consistent with the general approach that I use with just about any board that I design: Commands come in through a serial communication link and are executed by a microcontroller that governs all of the board’s functionality. The same serial link can be used to transmit operational feedback or relevant data that has been collected. In the case of the RCB, the microcontroller can communicate with a standard PC for testing and debugging or with the Wandboard.
Note that the above diagram omits details that we’ll see when we take a closer look at the various sections of the design. The diagram also does not show two stepper-motor driver ICs that are not needed for the current robot system; they were included in the RCB because we might want to incorporate stepper-motor functionality into future versions of this robot or into new projects.

A Microcontroller That Controls Motor Controllers

The following schematic excerpt shows the EFM8 and related circuitry:


Click to enlarge

You may have noticed in the block diagram that the EFM8 appears to be powered by 5 V from the DC/DC converter. Actually, though, the EFM8 has an integrated linear regulator that accepts 5 V input and generates 3.3 V for its own use and for external circuitry. J2 is a three-pin header that allows the user to power the EFM8 from the DC/DC converter or from the 5 V provided by a USB connection. The latter arrangement is handy for initial testing and debugging because the EFM8 can function even if the battery is disconnected or the DC/DC converter is not operational.

The microcontroller has an integrated oscillator that is fairly accurate, but I chose to include an external oscillator (U8) in case higher frequency precision is needed. The LTC6930 is a “silicon oscillator”—this rather vague term refers to an oscillator IC that does not require a piezoelectric element. There are certain benefits associated with these devices; you can read more about silicon oscillators here.
The remaining components are the following:
  • J5: a header that allows us to debug and program the microcontroller using a Silicon Labs USB Debug Adapter
  • LED1: three general-purpose LEDs (red, green, and blue) in one package
  • FB1: a ferrite bead that helps to suppress power-supply noise
  • D1 and D2: ESD-protection diodes for the USB signals
  • J1: a USB Micro-B connector that allows the EFM8 to communicate with a USB host device
  • C3 and C4: output capacitors for the EFM8’s internal voltage reference
  • Various filter/bypass caps for the power rails

Help from the Experts: The MAX14870

The next schematic excerpt shows a DC-motor-drive IC and related components.


Click to enlarge

The board includes two of these circuits because the Tri-Track chassis has two tank-style tracks, with one motor for each track. We need to be able to control the two motors independently so that we can turn the robot by changing the speed of one track relative to the speed of the other track.
I like designing my own circuits, but I also enjoy reaping the benefits provided by highly skilled IC designers. Part of engineering humility is accepting the fact that the experts at Maxim can design a motor controller that far surpasses whatever I might come up with. So, here we have the MAX14870, a highly integrated, small-form-factor, user-friendly device that requires few external components and only three control signals.

The control interface is straightforward:
  • The nEN pin must be driven low to enable the motor drive outputs.
  • The logic level at the DIR pin controls the motor’s direction of rotation.
  • Drive voltage is applied to the motor whenever the PWM pin is logic high. As the name of the pin implies, the speed of the motor can be controlled by applying a pulse-width-modulated signal to the PWM pin.
  • An overcurrent condition or thermal shutdown will drive the nFAULT pin to logic low. This allows a microcontroller to be notified when something is going wrong with the motor-control situation. It’s an open-drain output, so multiple nFAULT pins can be connected together (though with this arrangement there is no way to determine which particular chip is generating the fault condition).

Sensing Current: V = IR

Let’s take a minute to understand what’s going on with the sense resistor, R1. The motor is driven by allowing current to flow from the 12 V supply, through one of the high-side FETs, through the motor’s coil, through one of the low-side FETs, and finally out to the COM pins. That current needs to make its way to the ground node, but we don’t have to connect the COM pins directly to ground. If we put a small resistor between the COM pins and ground, the voltage at the COM node will be proportional to the current flowing through the motor’s coil. In other words, this current-sense resistor allows us to monitor the motor-drive current.


Click to enlarge

By including the sense resistor and connecting the COM node to the MAX14870’s SNS pin, we are enabling the internal-current-regulation functionality. The MAX14870 wants the voltage at the SNS pin to stay below 100 mV; if this voltage starts to get too high, the motor-drive current is interrupted as needed to keep the SNS voltage below 100 mV. Thus, the maximum motor-drive current is given by the following equation:



The C-BISCUIT motor-control circuit has a 0.068 Ω sense resistor; this means that the motor-drive current is limited to about 1.47 A. The datasheet for the Tri-Track motors indicates that the starting current is about 1.5 A, so 1.47 A is a conservative limit that still allows the motor to start up normally. But considering that I have no prior experience with this motor or the MAX14870, I would not be surprised to find that 0.068 Ω is not the optimal value for RSENSE.
An important thing to keep in mind is that this sense resistor dissipates some serious power. This is an easy place to make a nontrivial mistake because low-voltage designers often don’t need to think carefully about resistor power ratings. Even though starting current is higher than steady-state current, just to be on the safe side we’ll assume that this resistor might be subject to 1.5 A for a long period of time. That translates to



I like a factor-of-two safety margin, so the resistor’s power rating should be at least 1/4 W. I chose a 1/2 W part because that gives me additional confidence that the resistor won’t burn as a result of designer error.
If you don’t need automatic current regulation, you can disable this feature simply by connecting the SNS pin to ground, which (obviously) ensures that the voltage at SNS will never exceed 100 mV. The MAX14870 still has its generic overcurrent protection, but that doesn’t kick in until the current flowing through one of the motor drive lines is greater than about 6 A for longer than 1 µs.

Motor Current—The EFM8 Ought to Know

Since I decided to include a sense resistor for automatic current regulation, I might as well throw in a few extra components that allow the EFM8 microcontroller to gather information regarding how much current the motors require under various operating conditions. That’s what the op-amp circuit is for—it’s just a gain-of-ten noninverting amplifier that serves as an interface circuit between the voltage across RSENSE and the EFM8’s ADC circuitry.


Click to enlarge

This motor-current data could even be transmitted to a PC via the Wandboard’s Wi-Fi to enable real-time remote monitoring.

One Big Cap and Three Small Ones

The 1 µF and 0.1 µF caps are typical power-supply bypass components. But why the huge cap? Well, driving a DC motor means we’re dealing with large transient currents, and we want to make sure we have a nearby source of readily available charge for those currents. Maybe 100 µF (for each motor-drive IC) is more than we need for this application, but it’s not easy to determine the optimal value, and in this case it’s better to have a little too much capacitance rather than not quite enough.

Conclusion


We’ve covered two major portions of the C-BISCUIT Robot Control Board—the EFM8 microcontroller and the driver circuit for the brushed DC motors. In the next article we’ll continue our tour through the RCB schematic.

Share this:

ABOUTME

Hi all. This is deepak from Bthemez. We're providing content for Bold site and we’ve been in internet, social media and affiliate for too long time and its my profession. We are web designer & developer living India! What can I say, we are the best..

Post a Comment
My photo

Hi, I`m Sostenes, Electrical Technician and PLC`S Programmer.
Everyday I`m exploring the world of Electrical to find better solution for Automation. I believe everyday can become a Electrician with the right learning materials.
My goal with BLOG is to help you learn Electrical.

Labels

LEKULE TV EDITORIALS ARTICLES DC ROBOTICS DIGITAL SEMICONDUCTORS GENERATOR AC EXPERIMENTS MANUFACTURING-ENGINEERING REFERENCE FUNDAMENTAL OF ELECTRICITY ELECTRONICS ELECTRICAL ENGINEER MEASUREMENT TRANSDUCER & SENSOR VIDEO ARDUINO RENEWABLE ENERGY AUTOMOBILE TEARDOWN SYNCHRONOUS GENERATOR DIGITAL ELECTRONICS ELECTRICAL DISTRIBUTION CABLES AUTOMOTIVE MICROCONTROLLER SOLAR PROTECTION DIODE AND CIRCUITS BASIC ELECTRICAL ELECTRONICS MOTOR SWITCHES CIRCUIT BREAKERS CIRCUITS THEORY PANEL BUILDING ELECTRONICS DEVICES MIRACLES SWITCHGEAR ANALOG MOBILE DEVICES WEARABLES CAMERA TECHNOLOGY COMMUNICATION GENERATION BATTERIES FREE CIRCUITS INDUSTRIAL AUTOMATION SPECIAL MACHINES ELECTRICAL SAFETY ENERGY EFFIDIENCY-BUILDING DRONE CONTROL SYSTEM NUCLEAR ENERGY SMATRPHONE FILTER`S POWER BIOGAS BELT CONVEYOR MATERIAL HANDLING RELAY ELECTRICAL INSTRUMENTS ENERGY SOURCE PLC`S TRANSFORMER AC CIRCUITS CIRCUIT SCHEMATIC SYMBOLS DDISCRETE SEMICONDUCTOR CIRCUITS WIND POWER C.B DEVICES DC CIRCUITS DIODES AND RECTIFIERS FUSE SPECIAL TRANSFORMER THERMAL POWER PLANT CELL CHEMISTRY EARTHING SYSTEM ELECTRIC LAMP FUNDAMENTAL OF ELECTRICITY 2 BIPOLAR JUNCTION TRANSISTOR 555 TIMER CIRCUITS AUTOCAD BLUETOOTH C PROGRAMMING HOME AUTOMATION HYDRO POWER LOGIC GATES OPERATIONAL AMPLIFIER`S SOLID-STATE DEVICE THEORRY COMPUTER DEFECE & MILITARY FLUORESCENT LAMP INDUSTRIAL ROBOTICS ANDROID ELECTRICAL DRIVES GROUNDING SYSTEM CALCULUS REFERENCE DC METERING CIRCUITS DC NETWORK ANALYSIS ELECTRICAL SAFETY TIPS ELECTRICIAN SCHOOL ELECTRON TUBES FUNDAMENTAL OF ELECTRICITY 1 INDUCTION MACHINES INSULATIONS USB ALGEBRA REFERENCE HMI[Human Interface Machines] INDUCTION MOTOR KARNAUGH MAPPING USEUL EQUIATIONS AND CONVERSION FACTOR ANALOG INTEGRATED CIRCUITS BASIC CONCEPTS AND TEST EQUIPMENTS DIGITAL COMMUNICATION DIGITAL-ANALOG CONVERSION ELECTRICAL SOFTWARE GAS TURBINE ILLUMINATION OHM`S LAW POWER ELECTRONICS THYRISTOR BOOLEAN ALGEBRA DIGITAL INTEGRATED CIRCUITS FUNDAMENTAL OF ELECTRICITY 3 PHYSICS OF CONDUCTORS AND INSULATORS SPECIAL MOTOR STEAM POWER PLANTS TESTING TRANSMISION LINE C-BISCUIT CAPACITORS COMBINATION LOGIC FUNCTION COMPLEX NUMBERS CONTROL MOTION ELECTRICAL LAWS INVERTER LADDER DIAGRAM MULTIVIBRATORS RC AND L/R TIME CONSTANTS SCADA SERIES AND PARALLEL CIRCUITS USING THE SPICE CIRCUIT SIMULATION PROGRAM AMPLIFIERS AND ACTIVE DEVICES APPS & SOFTWARE BASIC CONCEPTS OF ELECTRICITY CONDUCTOR AND INSULATORS TABLES CONDUITS FITTING AND SUPPORTS ELECTRICAL INSTRUMENTATION SIGNALS ELECTRICAL TOOLS INDUCTORS LiDAR MAGNETISM AND ELECTROMAGNETISM PLYPHASE AC CIRCUITS RECLOSER SAFE LIVING WITH GAS AND LPG SAFETY CLOTHING STEPPER MOTOR SYNCHRONOUS MOTOR AC METRING CIRCUITS BECOME AN ELECTRICIAN BINARY ARITHMETIC BUSHING DIGITAL STORAGE MEMROY ELECTRICIAN JOBS HEAT ENGINES HOME THEATER INPECTIONS LIGHT SABER MOSFET NUMERATION SYSTEM POWER FACTORS REACTANCE AND IMPEDANCE INDUCTIVE RECTIFIER AND CONVERTERS RESONANCE SCIENTIFIC NOTATION AND METRIC PREFIXES SULFURIC ACID TROUBLESHOOTING TROUBLESHOOTING-THEORY & PRACTICE 12C BUS APPLE BATTERIES AND POWER SYSTEMS DC MOTOR DRIVES ELECTROMECHANICAL RELAYS ENERGY EFFICIENCY-LIGHT INDUSTRIAL SAFETY EQUIPMENTS MEGGER MXED-FREQUENCY AC SIGNALS PRINCIPLE OF DIGITAL COMPUTING QUESTIONS REACTANCE AND IMPEDANCE-CAPATIVE SEQUENTIAL CIRCUITS SERRIES-PARALLEL COMBINATION CIRCUITS SHIFT REGISTERS WIRELESS BUILDING SERVICES COMPRESSOR CRANES DIVIDER CIRCUIT AND KIRCHHOFF`S LAW ELECTRICAL DISTRIBUTION EQUIPMENTS 1 ELECTRICAL DISTRIBUTION EQUIPMENTS B ELECTRICAL TOOL KIT ELECTRICIAN JOB DESCRIPTION INDUSTRIAL DRIVES LAPTOP SCIENCE THERMOCOUPLE TRIGONOMENTRY REFERENCE UART oscilloscope BIOMASS CONTACTOR ELECTRIC ILLUMINATION ELECTRICAL SAFETY TRAINING ELECTROMECHANICAL FEATURED FILTER DESIGN HARDWARE JUNCTION FIELD-EFFECT TRANSISTORS NASA NUCLEAR POWER VALVE COLOR CODES ELECTRIC TRACTION FLEXIBLE ELECTRONICS FLUKE GEARMOTORS INTRODUCTION LASSER PID PUMP SEAL ELECTRICIAN CAREER ELECTRICITY SUPPLY AND DISTRIBUTION MUSIC NEUTRAL PERIODIC TABLES OF THE ELEMENTS POLYPHASE AC CIRCUITS PROJECTS REATORS SATELLITE STAR DELTA VIBRATION WATERPROOF