Raspberry Pi Robots - Line Following - Episode 3. Robots.. Everyone loves robots. Not a single person doesn't. And here's how to make your own one! Welcome to Episode 3 of my latest Robots series! Raspberry Pi Projects. Projects based on everyone's favorite low cost Linux Machine - The Raspberry Pi. Learn Electronics, Programming, and Robotics all at once! Build your own rolling robot with a BASIC Stamp 2 microcontroller brain! Just follow the clear, step-by-step. Intro: Basic Line following Robot with Arduino. 09/07/2015It has been a few years since we initially posted this Basic Line Following Robot with Arduino tutorial, and. Long Road Ahead is a companion quest in Fallout 4. When traveling with Robert Joseph MacCready. In this video I will show you how to make a robot follow a line all by itself. By the end of this video you will understand a Python program and be able to introduce another line following bot into the world in order to aid my plans of complete domination. Watch the above for all the details. INFORMATION (Chronological order): First episode (Episode 1 - Basic Motor Control): https: //www. ESbe.. Second episode (Episode 2 - Obstacle Avoidance)Pi. Go- lite: http: //4tronix. Panasonic Eneloops: http: //www. Panasonic- ene.. Recently price cut Model B+: https: //www. My Wi. Fi dongle: http: //thepihut. My Git. Hub repo: https: //github. COMMANDS: 1) Navigate into the correct directoy (from the default one) with the command: cd robot/pi. Update the robot software in order to grab the latest program, line. Use the command: git pull. Look at the program with the command: nano line! Make sure you stay tuned by subscribing! Don't forget to like, share and comment! The Raspberry Pi Guy. Y U NO SUBSCRIBE?! The Line Follower Robot with Texas Instruments 1. Bit MSP4. 30. G2. Microcontroller. September 1.
Robotics. When Texas Instruments (TI) introduced their new value line 1. MSP4. 30 Value Line Launch. Pad in the mid of 2. USD 4. 3. 0 include the shipping cost, this make it as the cheapest programmer and development board platform that you could ever find in the market. Therefore the introduction of the MSP4. Blog Entry The Line Follower Robot with Texas Instruments 16-Bit MSP430G2231 Microcontroller September 11, 2011 by rwb, under Robotics. When Texas Instruments (TI. Qu-Bot, A Quickly Programmable Robot User’s Manual Page 6 of 52 4.5.3. Display Text on Serial Terminal 32 4.5.4. Using Serial Terminal to check output of above. Launch. Pad development board make a tremendous impact especially among the electronics hobbyist, students, and enthusiast because now the big boy (TI) is seriously taking part in the electronic hobbyist market and directly compete their 1. Atmel and Microchip. The MSP4. 30 Value Line Launch. Pad development board is come with the eclipse based Texas Instruments integrated development environment (IDE) called Code Composer Studio (downloadable from the TI website) and equiped with the professional grade C compiler and debugger, which make the development of MSP4. As you know most of the electronics hobbyist used the popular 8- bit class microcontroller to most of their embedded project such as AVR microcontroller from Atmel and PIC microcontroller from Microchip. Now you might wonder why we have to learn another type of microcontroller as most of the modern microcontroller has already provided all the necessary features that we need. Why not, learning another type of microcontroller is one of the fascinating and challenging topics to be learned especially for the true electronics hobbyist as this will broaden our knowledge and utilize what is the best on each of the microcontroller types to support our future embedded system project. The MSP4. 30 Microcontroller Project. After many considerations of what is the attractive way to introduce this MSP4. LED, I decided to built a simple and yet most popular robot. Because I think building a robot will give you the basic knowledge and understanding you needs to start explores many of the advance features offered by this 1. MSP4. 30 value lines microcontrollers by yourself. If you notice on the above picture this Line Follower Robot (LFR) used a similar CD chassis, DC geared motor, and sensors found on my previous articles “The LM3. Quad Op- Amp Line Follower Robot with Pulse Width Modulation“. Therefore this project also serves as a good example of the “digital” version of the analog LFR we’ve built before. The following is the complete electronic schematic of the Line Follower Robot: Now let list down all the necessary electronic components and other supported materials to build this LFR: 1. Resistors: 2. 20 (2), 4. K (3), 2. 2K (2), and 4. K (1)2. Light Dependent Resistor (2)3. Capacitors: 0. 1u. F (3), 1u. F (1) and 4. F/1. 6v (1)4. High Intensity 3 mm blue Light Emitting Diode (3)6. N- Channel MOSFET: BS1. IC: ACS 1. 72. 2A 3. Texas Instruments MSP4. Value Line Launch. Pad Development Board. DC Motor: Solarbotics GM2 Geared DC motor with Wheel (2)1. One reset push button switch. Perforated PCB: 7. AA Battery holder. Plastic Beads and Paper Clip for the castor (the third wheel)1. Bolt, Nuts, Double Tape and Standard Electrical Tape for the black line. Texas Instruments Code Composer Studio Core Edition version 4. Texas Instruments MSP4. G2. 23. 1 microcontroller datasheet SLAS6. SLAU1. 44. F. The complete firmware for this Line Follower Robot project is developed with the C language: /*****************************************************************************. File Name : Line. Follower. c. // Version : 1. Description : The MSP4. G2. 23. 1 Line Follower Robot. Author : RWB. // Target : MSP4. G2. 23. 1 Custom Line Follower Board. Compiler : Code Composer Studio Version: 4. IDE : Code Composer Studio Version: 4. Programmer : Texas Instruments MSP4. Launchpad Board. // Last Updated : 1. Aug 2. 01. 1. *****************************************************************************/. LEFT. Together with the 2. K resistor, they will form what’s known as the voltage divider circuit. This voltage divider circuit sensor will provide the varying voltage according to the amount of the light intensity reflected back to the LDR. The blue Light Emitting Diode (LED) will provide a constant light source for the sensors. Next the MSP4. 30. G2. 23. 1 microconttroller will translate this varying voltage using its analog to digital conversion (ADC) peripheral into the DC motor rotation speed using what known as the Pulse Width Modulation (PWM) signal. Because this LFR used the “differential steering” (i. It’s a 1. 6- bit RISC (reduced instruction set computer) microcontroller with Von Neumann architecture where the CPU, I/O, and memory shared the same 1. The MSP4. 30 is specially design for low consumption and optimize to be used with the C compiler. The “G” value line series such as the 1. MSP4. 30. G2. 23. Launch. Pad development board. This microcontroller has these following interesting features which I’m sure as the electronics hobbyist you will eager to try it by yourself. One of the features that make this 1. MSP4. 30. G2. 23. Spy- Bi- Wire” or also known as 2- wire JTAG (Joint Test Action Group). This useful feature enables us to step the C code line by line, set a break point, and check the variables or registers value while the chip is in the circuit (in circuit programming and debugging). The MSP4. 30. G2. Microcontroller Input/Output (I/O)The MSP4. G2. 23. 1 microcontroller has 1. I/O, 8 pins on the first ports (P1) and 2 pins on the second ports (P2). All these ports are configurable as the general purpose input or output ports and often they multiplexed with other I/O function such as A/D (analog to digital) input, PWM out, USI (Universal Serial Interface), Clock Input, Crystal Oscillator Input, and JTAG I/O terminal. As you’ve seen from the table above, the LFR only used several I/O ports and as rules of thumb the unused I/O ports have to be configured as the output ports and leave them unconnected. Alternatively you could configure all the unused ports as the input ports (default on power- up reset) and enable the pull- down resistor in order to avoid the unpredictable “floating” inputs problem arise in your project. The following C code shows how to configure the necessary I/O ports for this LFR: #define LEFT. By enabling the corresponding bit we simply tell the MSP4. G2. 23. 1 microcontroller to configure the port as an output port. Next the P1. REN (port 1 pull- up/pull- down resistor) register, by enabling the corresponding bit we could enable the pull- down resistor (configured as input) or pull- up resistor (configured as output). The MSP4. 30. G2. P1. OUT (port 1 output) register is used to control the output port logical state, it used to turn on and off the P1. P1. 6 to generate the required PWM signal. I used these ports because these ports are connected with two LED in the MSP4. Launch. Pad development board, therefore you could easily test the PWM output using these LEDs. The P1. 7 output port is also used to control the sensor LED; beside as the sensor light source, it also serves as a sign indicator when the LFR finish calibrating the sensors. The following code use C language bit operator to turn on and off the port using the MSP4. G2. 23. 1 microcontroller P1. OUT register: // Reset all the Output. The advantage of using MOSFET because this type of transistor has very high input impedance on its Gate (G) terminal which mean its need very low current in order to operate and its has a low ON resistance between the its Drain (D) and Source (S) terminals called Rds especially when operate on higher DC voltage supply compare to the ordinary Bipolar Junction Transistor (BJT). By applying voltage greater than the Vgs threshold voltage i. By simply switches ON and OFF the power supplied to the DC motor rapidly and the average amount of energy received by the DC motor is corresponding to the ON and OFF period (duty cycle); therefore by varying the ON period i. Instead on this LFR project I used the software PWM which is based on the MSP4. G2. 23. 1 Timer. Next we need two variables pwm. Therefore by varying both of the pwm. Because on this project I used MSP4. G2. 23. 1 microcontroller standard Sub Main Clock (SMCLK) of 1 MHz for the Timer. The upper and lower threshold setting is depend on the black line track and the sensors characteristic and could be changed by changing each of the MAX. The MSP4. 30. G2. ADC1. 0 peripheral used what is called “Successive Approximation Method” to convert the analog input from one of these channels to the 1. ADC1. 0MEM register. The ADC1. 0 peripheral is controlled by two control registers, ADC1. CTL0 and ADC1. 0CTL1. Thus by setting the ADC1. ON bit (logical high) in ADC1. CTL0 register we enable this ADC core. The most important thing to remember that these ADC1. ENC (Enable Conversion) bit in ADC1. CTL0 is low (ENC = 0) and prior to the A/D conversion this bit has to be set to 1 (logical high). The MSP4. 30. G2. ADC1. 0 peripheral have four operating mode which could be selected by setting the CONSEQx bits in the ADC1. CTL1 (ADC1. 0 Control Register 1) and on this LFR project we will use the “Single Channel Single Conversion Mode“. The following C code show how we setup the MSP4. G2. 23. 1 microcontroller ADC1. Start the ADC1. 0 Peripheral. Vref = Vcc, 1. 6 ADC Clock, Enable ADC1. ADC1. 0CTL0 = SREF. The actual A/D conversion is take placed in the Read. Sensor() function, as shown on this following C code: unsigned int Read. Sensor(unsigned char chn. ADC1. 0CTL0 and ADC1. CTL1), we have to disable the ADC1. ENC bit on ADC1. 0CTL0 register then prior to the A/D conversion we set (enable) the ENC and ADC1. SC (ADC1. 0 Start Conversion) bits in ADC1. CTL0 register. Next we wait the conversion by checking the ADC1. BUSY bit on the ADC1. CTL1 register. When the ADC1. BUSY bit is become “0” means the conversion is done and we could retrieve the stored 1. ADC1. 0MEM register. One of the most important features on this LFR project is the used of the calibration phase in the Calibrate. Sensor() function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |