* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Kit Instructions - Jameco Electronics
Electrification wikipedia , lookup
Distributed control system wikipedia , lookup
Opto-isolator wikipedia , lookup
Control theory wikipedia , lookup
Control system wikipedia , lookup
Resilient control systems wikipedia , lookup
Solar micro-inverter wikipedia , lookup
Buck converter wikipedia , lookup
Rectiverter wikipedia , lookup
Semiconductor device wikipedia , lookup
Electric motor wikipedia , lookup
Phone connector (audio) wikipedia , lookup
Brushed DC electric motor wikipedia , lookup
Electrical connector wikipedia , lookup
Wien bridge oscillator wikipedia , lookup
Power inverter wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Surface-mount technology wikipedia , lookup
Induction motor wikipedia , lookup
Brushless DC electric motor wikipedia , lookup
Stepper motor wikipedia , lookup
MiniRover V2.0 PART NO. 2209684 The miniRoverV2.0 is an electronic circuit board compound by an 8 bit microcontroller (Atmel Atmega 328) and an H bridge motor driver (Texas L293D), capable to control two small electric motors, it is a good choice to build small robots, UGV line follower and to learn about programming and mechatronics. The goal of this project is: 1- Use of electronic components that can be easy to find and mounting without hard experience in electronic soldering, there are no SMD components. 2- Only two ports of the microcontroller to change the rotation direction of two small electric motors. 3- One port to control speed of rotation (PWM control). The digital pins PD4, PD3 of microcontroller Atmega 328, control the rotation direction of motors, and the pin PD6, control the speed of rotation (PWM control). Between Atmega 328 , and L293D, has a logical inverter made with two transistors BC548, the function of the this inverter is to provide the logic levels required to change direction of rotation of motors, in an arrangement in which use a smaller number of ports of the microcontroller. Without this arrangement, would be necessary four ports of microcontroller to change the sense of rotation for only one electric motor. To increase speed, just increase the PWM signal, to stop the motors cut off the PWM signal. This small code is an example of how to use this board, to program can be used the StudioAvr or Arduino IDE with an Avr Programmer. //move two motors one direction// void setup() { pinMode (7 , OUTPUT); pinMode (8 , OUTPUT); //pinMode (6, OUTPUT); //PWM control this line is not necessary it is here only for educational purposes// } void loop() { digitalWrite(7, LOW ); // put PD7low level// digitalWrite(8, LOW); // put PB0 low level // analogWrite(6, 90); // PWM control analogWrite values from 0 stopped to 255 max speed } Below, the true table to control he motors: |-------------------------------------------------------------| LOGICAL INVERTER Q1, Q2 |-------------------------------------------------------------| PD6 | PB0 | PD7 | MOTOR |-------------------------------------------------------------| PWM | 1 | 0 | TURN LEFT |-------------------------------------------------------------| PWM | 0 | 1 | TURN RIGHT |------------------------------------------------------------| 0 | X | X | STOP MOTOR |-------------------------------------------------------------| Time Required: 30 minutes depending on experience Experience Level: Intermediate Required tools and parts: Soldering iron Screw driver Studio Avr AVR Programmer Bill of Materials: Qty Jameco SKU Component Name 2 308567 Header, 6-Pin HEADER,VERTICAL,RECEPTACLE 1 ROW,20CONT,.100 INCH (2.54mm),FEMALE HEADER RECEPTACLE 1 743488 Zener diode 3.3v Diode Zener Single 3.3 Volt 5% 500mW 2-Pin DO-35 Bulk 1 35975 Silicon Rectifier Diode 50 Volt 1 Amp Silicon Rectifier Diode 1 372171 Inductor 10uH Inductive Axial Choke Features: Inductance: 10µH Tolerance: ±5% Conformal coated axial choke 3 138691 LED OPTO,LED, 5MM, BLUE DIFFUSED, T1-3/4 468NM, 45 DEGREE, FLANGED for power ,tx,rx indicator 1 115035 Header, 3-Pin, Dual row EADER,ST MALE,2RW,6PIN, .1"CTR,.025 PST,.23"GLDTL for Atmega programmer 3 152347 Connector Terminal Blocks 2 Position CONNECTOR, .2", TERM BLK (2) VERT .421"L X .351"W X .490"H For motors and power. 2 254781 Transistor BV548B TO-92 Transistor NPN RANSISTOR, BC548B, TO-92 TRANS, NPN, SWITCH For logical inverter. 1 119011 Tactile Switch Tactile Switch Off Momentary (On) Single Pole Single Throw Round Button PC Pins 0.05 Amp 12 Volt Through Hole 1 2139111 ATmega328P-PU ATMega328 Microcontroller Atmel 328 32kB Flash microcontroller 1 526248 Connector DIP 28 pin SOCKET, IC, 28 PIN, 390261-9, .300", DUAL, LADDER, P/B, TIN (10) Dip connector for Atmega 328. 1 683121 Connector DIP Socket16 Connector DIP Socket Socket 16 Position 2.54mm Solder Straight Through Hole Tube for L293D. 1 1341966 L293D The L293D is a quadruple high-current half-H driver. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. This device is designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positivesupply applications. 1 924570 L7805ACV Standard Regulator 5 Volt 1 Amp 3 Pin 3+ Tab TO-220 Tube 1 325068 CRYSTAL OSCILLATOR,20.000MHZ CRYSTAL,20.000MHZ,HC49/US,20PF LOW PROFILE 5 151116 0.1 uF 25 Volt 20% Ceramic Disc Capacitor 15405 22pf 50 Volt Ceramic Disc Capacitor filter capacitor 2 22 pf capacitor for atmega328 oscillator 3 691104 Resistor Carbon Film 10k Ohm 1/4 Watt 5% 2 690865 Resistor Carbon Film 1k Ohm 1/4 Watt 5% 3 690742 Resistor Carbon Film 330 Ohm 1/4 Watt 5% 1 659892 Resistor Carbon Film 22 Ohm 1/2 Watt 5% Step 1 - Insert screw terminals. Insert screw terminals. Step 2 - Insert DIP Sockets Insert DIP Sockets Solder Tail - 28-Pin 0.3"for Atmega 328 and DIP Sockets Solder Tail - 16-Pin 0.3"for L293D Step 3 - Insert voltage regulator and transistors Insert 5V regulator 7805, transistors BC548, zener diode and headers. Step 4 - Resistors Insert resistors, oscillator crystal Step 5 - Capacitors Add two capacitors of 22pF for Atmega oscillator and filter capacitors, LEDs, inductor and reset button. Step 6 - How to configure the Atmega 328 to 20MHZ Download the Avr Studio at site http://www.atmel.com/tools/atmelstudio.aspx. Step 7 - How to configure the Atmega 328 to 20MHZ. 2- In this link, show how to configure the AVR programmer http://www.pololu.com/docs/0J36/3.b Step 8 - How to configure the Atmega 328 to 20MHZ Open studio Atmel go to TOOLS-DEVICE PROGRAMMING. Step 9 - How to configure the Atmega 328 to 20MHZ In DEVICE PROGRAMMING choose Atmega328P, TOOL generally is STK500, Avr Studio detect automatically, INTERFACE ISP. And click APPLY Step 10 - How to configure the Atmega 328 to 20MHZ Go to FUSES, a new Atmega 328P comes from factory with 8MHZ internal clock, to change to run with a 20MHZ crystal, it is necessary change the LOW FUSE from 0xC2 to 0xD7, after this click in PROGRAM, and it is done. Step 11 - How to use miniRover V2.0 with Arduino IDE Go to http://www.arduino.cc/en/Main/Software and download the latest Arduino software for your platform. Step 12 - How to use miniRover V2.0 with Arduino IDE Add the following to the end of the boards.txt file in the arduino-1.0.1/hardware/arduino directory: ############################################################## minirover328pgm.name=ROVER v2.0 w/ ATmega328P via Programmer minirover328pgm.upload.using=avrispv2 minirover328pgm.upload.maximum_size=32768 minirover328pgm.build.mcu=atmega328p minirover328pgm.build.f_cpu=20000000L minirover328pgm.build.core=arduino minirover328pgm.build.variant=standard ############################################################## Step 13 - How to use miniRover V2.0 with Arduino IDE With an AVR ISP programmer such as our USB AVR Programmer, add the following to the end of the programmers.txt file in the arduino-1.0.1/hardware/arduino directory: avrispv2.name=AVR ISP v2 avrispv2.communication=serial avrispv2.protocol=avrispv2 this will allow the Arduino IDE to program with the avrispv2 protocol used by our USB AVR Programmer.