User Manual for ATtiny RS485 Quad Motor Control Board V1.0
ATtiny RS485 Quad Motor Control Board V1.0 is a ATtiny development board aimed at beginners and robot enthusiasts.The Board is designed to provide the following functionalities to the user.
- Building 4 Wheel Drive Robotic projects
- Bidirectional Control for upto 4 DC Motors
- Unidirectional control upto 8 Motors
- Stepper Motor Control Development using ATtiny
- RS485 Communication capabilities
- Slave Motor Controller for Arduino
- Slave Stepper Motor control for Arduino
- RS485 based Motor Control
- Learn about ATtiny architecture
ATtiny motor control board is designed for learning about the ATtiny2313 architecture and for providing motor control (both brushed DC motor and Stepper Motor) functionality to your latest robotics or automation project.The board is build around the 20 pin ATtiny2313A microcontroller chip from ATMEL (now Microchip).
The ATtiny chip packs 2Kbytes of Flash,128bytes of RAM ,a UART ,2 Timers and 4 PWM channels.
The ATtiny2313A microcontroller is interfaced to twin L293D chips and a MAX485 RS485 tranciever chip.The Twin L293D chips present in the board can provide bidirectional control of upto 4 DC brushed motors or unidirectional control of upto 8 DC brushed motors.
Ability to control 4 DC brushed motors can be used during building 4 wheel drive robots.
The 4 PWM channels of ATtiny are connected to the enable pins of the two L293D chips allowing us to individually control the speed of the 4 Motors.
The twin L293D's can be programmed to control both 5V or 12V stepper motors.
The board can control both 5V and 12V rated motors (stepper and DC brushed motors) by using the JP3 jumper.
The UART of ATtiny is connected to MAX485 RS485 tranceiver chip which can be used for remote controlling the motors from your PC using a USB to RS485 converter.
The board can be easily powered by a 12V DC adapter.
The board was originally designed for controlling multiple DC brushed motors like in the wheels of a 4 wheel drive robot or the multiple propellers of an underwater robot.
The twin L293D's (U5 and U4) on the board can provide bidirectional control for upto 4 DC brushed motors or unidirectional control (ie ON/OFF control) of upto 8 DC motors.You can see the Ports used to control the L293D chip in the below block diagram.
Here PB3,PB4,PB2 and PD5 are PWM channels of ATtiny2313 which are connected to the enable pins of the L293D chips.By controlling the pulse width signal ,you can control the speed of the motors connected to P6,P7,P4 and P5 screw terminals.
The below figures shows the circuit diagram of the motor control section of the board.The ENABLE pins are highlighted in Pink.The ATtiny2313 is shown as two seperate chips ,first one showing only the pins controlling U4 and the second one showing only the pins controlling U5.
L293D requires two voltages to function,
- VCC1 (Pin16) - used for powering the chip which is +5V
- VCC2 (Pin 8) - used for powering the motors connected to the L293D.
In the circuit shown below, it is represented by the label MOTOR_VCC .
Since MOTOR_VCC decides the voltages at which the motors connected to the board will run .You can use the jumper JP3 on the board to drive the connected motors at either 5V or 12V.
Moving the jumper JP3 to towards +12V as shown in the above figure will drive the motors at +12V and if you move the jumper towards +5V ,motors will be driven at +5V .The circuit diagram is shown below.
The two L293D's can be combined together to control a single stepper motor (5V or 12V ).The voltages at which the stepper motor can be varied by using jumper JP3 as explained above.
12 debugging LED's (6 for U5 and 6 for U4) are provided to visualise the logic levels of ATtiny pins as well as the L293D pins to which they are connected.You can use these LED's to easily debug your motor control code during development.
Out of the 12 debugging LED's ,
D4,D5,D2 and D3 are connected to L293D enable pins (or ATtiny PWM pins) and are RED coloured.Brightness of these LED's may vary accoring to the PWM signal levels.
Rest of the LED's are connected to 1A,2A,3A and 4A pins of the respective L293D's and are GREEN in Colour.
The power supply section is build around LM1117 linear voltage regulator and can be powered using any 12V DC adapter.
Maximum Input voltage for the board is +15V ,operating the board continously above +15V may damage the voltage regulator.The regulator can provide an output current of about 750mA.
Extra Ground ,+5V and +12V pins (Screw terminals) are available on (Terminal Block Connector) K3 for powering external circuits.
RS485 section of the ATtiny motor Control Board is build around MAX485 half duplex RS485 tranceiver IC from Maxim.
The RXD and TXD lines of the ATtiny2313 are connected to the RO and DI pins of MAX485 through jumpers JP1 and JP2.
PD3 and PD4 pins of ATtiny are connected to ~RE (Pin2,active low) and DE pins of MAX485 for putting the chip in Receive or Transmit mode.
MAX485 chip is half duplex so it can either transmit or receive at a time.The ATtiny chip has to put the MAX485 chip in either of the modes by changing the logic sates on PD3 and PD4.
The serial lines of ATtiny UART (both TXD and RXD ) can be accessed by removing the jumper caps on JP1 and JP2.
The ATtiny board can be easily programmed by any commonly used AVR programmers like USBtinyISP using 6 pin programming connector P1 (AVR ISP).