Fig. 1: Prototype of AVR based Keypad Controlled Wireless Robot
The circuit of the control circuitry mounted on the robot can be represented by the following block diagram –
Fig. 4: Block Diagram of AVR based Keypad Controlled Wireless Robot Control Circuit
Circuit Connections –
The remote circuit has the following circuit connections –
AVR Atmega 32 – This is a 8-bit AVR RISC based microcontroller. It comes in a 40-pin package and has 2KB RAM, 32KB flash memory, 1KB EEPROM, 32 General Purpose Input Output (GPIO) pins, 8 10-bit ADC channels, One SPI, one UART and one TWI interface on-chip. The controller has three in-built timers of which 2 are 8-bit timers and one is a 16-bit timer. The controller operates up to a clock frequency of 16 MHz. By executing powerful instructions in a single clock cycle, the Atmega 32 achieves throughputs approaching 1 MIPS per MHz allowing the system designers to optimize power consumption versus processing speed. The controller comes available in 40-pin Dual Inline (DIP) Package. Check out the pin diagram and pin configuration of this AVR controller here.
RF Receiver – The RF receiver detects the radio signal carrying the motor control signals. The RF receiver module has 8 pins and has following pin configuration –
Fig. 15: Screenshot of AVR Code for Keypad controlled Wireless Robot
This completes the AVR code for the remote control. Check out the complete code in the code section. The control circuit of the robot is a simple RF receiver coupled with L293D motor driver IC and it does not have any code involved. So, quickly get your hands dirty. It will be fun making this keypad controlled wireless AVR robot.
You may also like:
Project Source Code
### //Program to
#include#include #define F_CPU 1000000 #define USART_BAUDRATE 9600 #define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE*16UL))) - 1) #define pad PORTA #define r1 PA0 #define r2 PA1 #define r3 PA2 #define r4 PA3 #define c1 PA4 #define c2 PA5 #define c3 PA6 // Function prototype to check key pressed from keypad void check1(void); void check2(void); void check3(void); void check4(void); #define LCD_DATA PORTB //LCD data port #define ctrl PORTD #define en PD2 //enable signal #define rw PD1 //read/write signal #define rs PD0 //resister select signal #define CONTROL_OUTPUT PORTC // output port for wireless transmission void LCD_cmd(unsigned char cmd); void init_LCD(void); void LCD_write(unsigned char data); void move_forward(); void move_backward(); void turn_left(); void turn_right(); unsigned int press; int main() { unsigned char value; DDRC=0x0f; //LCD_DATA port as output port DDRB=0xFF; //signal DDRA = 0X0F; DDRD = 0X07; pad = 0xF0; init_LCD(); //initialization of LCD _delay_ms(50); LCD_write_string("EngineersGarage"); _delay_ms(1000); LCD_cmd(0x01); LCD_write_string("Keypad Cntrld"); LCD_cmd(0xC0); LCD_write_string("Wireless Robot"); while(1) { PORTA=0xF0; //set all the input to one value=PINA; //get the PORTD value in variable value if(value!=0xf0) //if any key is pressed value changed { check1(); check2(); check3(); check4(); } } return 0; } void check1(void) { pad =0b11111110; _delay_us(10); if(bit_is_clear(PINA,c2)) { move_forward(); } } void check2(void) { pad=0b11111101; _delay_us(10); if(bit_is_clear(PINA,c3)) { turn_right(); } } void check3(void) { pad=0b11111011; _delay_us(10); if(bit_is_clear(PINA,c2)) { move_backward(); } } void check4(void) { pad =0b11110111; _delay_us(10); if(bit_is_clear(PINA,c2)) { robo_stop(); } } void init_LCD(void) { LCD_cmd(0x38); //initializtion of 16X2 LCD in 8bit mode _delay_ms(1); LCD_cmd(0x01); //clear LCD _delay_ms(1); LCD_cmd(0x0E); //cursor ON _delay_ms(1); LCD_cmd(0x80); // ---8 go to first line and --0 is for 0th position _delay_ms(1); return; } void LCD_cmd(unsigned char cmd) { LCD_DATA=cmd; ctrl =(0<
Circuit Diagrams
Circuit-Diagram-Remote-Control-Keypad-Controlled-AVR-ATMega32-Wireless-Robot | |
Circuit-Diagram-Keypad-Controlled-AVR-ATMega32-Wireless-Robot |
Project Video
Filed Under: Electronic Projects, Featured Contributions
Filed Under: Electronic Projects, Featured Contributions
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.