Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Simple ?C acts as dedicated motor control

Simple ?C acts as dedicated motor control

Motion-control systems often use a PWM signal to control the duty cycle for a motor driver or amplifier module. Typical designs generate the PWM signals using µCs with dedicated PWM output lines.
Such as the PIC16C65 (Microchip Technology, www.microchip.com) and the HC11 (Motorola Inc, www.motorola.com). However, these µCs may have more features than necessary for a motion-control system with multiple degrees of freedom. Using this type of µC on each degree of freedom becomes costly, particularly if all you need to do is generate motor-control signals.

An alternative approach uses one low-cost µC, in this case the PIC16C84, as a dedicated motor-control register (Figure 1). The circuit accepts control words from an 8-bit digital bus, and the chip-select line triggers the µC, much the same as other standard 8-bit hardware. You can arrange multiple µCs on a bus and communicate with a higher level motion-control computer or µC. For example, you can use the parallel port of a PC to control all the degrees of freedom on a robot arm. By using PWM signals to modulate the speed at each joint, coordinated motion is possible.

The RA3 and RB1-to-RB7 data-bus lines are digital inputs that connect to an output-controlled data bus. The PIC16C84 ignores these inputs until there is a high-to-low transition on Pin 6 (RB0/INT). On this transition, the µC places the state of RA3 on the output RA0 (direction bit) and places the state of RB1 on RA1. The state of the remaining lines, RB2 to RB7, set the pulse width of the PWM output, RA2. Note that these outputs are subject to special conditions.

The RB0/INT digital input latches the word on the 8-bit data bus. A 74HC138 1-of-8 device selector drives this active-low input. The high-to-low transition generates an interrupt to update the state of the register. At all other times, the circuit ignores the state of the 8-bit data bus.

RA0 drives the motor-drive chip and determines the polarity of the current going through the motor in the output stage of the driver. RA1 also drives the motor-drive chip. When RA1 is high and RA2 is high, active braking of the motor occurs. When RA1 is high and RA2 is low, the motor coasts to a stop.

The RA2 PWM output has a duty cycle that depends on the binary word on the inputs during a high-to-low transition on RB0/INT. The duty cycle of this signal increases from 1.56 to 100% in increments of 1.56%. In other words, the duty cycle goes from 1/64 to 64/64 in increments of 1/64, depending on the binary word on RB2 to RB7. The duty cycle repeats at a rate of approximately 300 Hz.

Visit Here for more.







 

More Articles to Read

Peeqo is a desktop bot that communicates through GIFs
Peeqo is a desktop bot that communicates through GIFs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs
Serial seven segment LED display shield
Serial seven segment LED display shield
G-code controlled drawing plotter
G-code controlled drawing plotter
An Arduino round word clock
An Arduino round word clock
The Sandwich-o-Matic will make your lunch automatically
The Sandwich-o-Matic will make your lunch automatically
Scalar Network Analyser Jr
Scalar Network Analyser Jr
An Arduino-controlled automated whiskey distillery
An Arduino-controlled automated whiskey distillery
The Rex800 looks like a dinosaur Terminator
The Rex800 looks like a dinosaur Terminator
Home Environment Monitor
Home Environment Monitor
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
Noisy ESP8266
Noisy ESP8266
App note: Noise analysis for high-speed op amps
App note: Noise analysis for high-speed op amps
Skill Sunday: Arrays
Skill Sunday: Arrays
App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown

Top


Shares