PIC 18F-series MCU dev-board

 

The main aim of this paper is to study and create a general purpose printed circuit board for general application in the field of robotics using a PIC 18F4550(Peripheral Interface Controller) microcontroller as the heart of the circuit. Different types of robots have different requirements. The task at hand is to study these requirements and create a general purpose Printed Circuit Board which can be used as the circuitry of a number of different kinds of robots. An ideal Circuit design would utilize all the functions of the microcontroller being used. The main features of our robot’s brain are analog to digital conversion, pulse width modulation (can be thought of as digital to analog conversion), communication techniques. We also need to provide signals to govern our relay system and a way to connect to mechanical appendages. All these will be inculcated in our design.

Over the years we as human being have fantasized of creating a being as superior as ourselves, which has eventually led to our fascination with robots. A robot is analogous to a human being. Just as we have five senses that govern our actions, every kind of robot has certain requirements including: certain number of sensors, a brain for processing the information from the sensor and certain number of outputs required for performing a task based on the input from the sensors. Let’s take the example of a simple task, such as cleaning a table. Our eyes take images of the table, which are then studied by our brain to determine the dirty parts and tell our hands to clean those portions of the table.

To perform this task our brain employs a certain algorithm which links our eyes to our hands. This same algorithm can be reproduced in our robot. The question is, what kind of inputs do our sensors provide to our robot’s brain (the PIC microcontroller in this case), and in what form will the brain provide us with outputs? The sensors maybe light sensors, ultrasound sensors, heat sensors, infrared sensors etc.The output may either travel to our relay system directly, or we might need to transfer data from one point to another, or transfer data from our brain to a display unit (for example, a 16x2 LCD screen), when our sensors provide a particular input to the brain. Above all, we need to establish a link between the programming platform and our robot so we can program it to perform the given task. All these functions will now be incorporated into our design.

2. Circuit Design


I have selected the PIC 18F4550 as the heart of the controller due to its self-programmability and support for a large number of hardware peripherals. By self-programmability we mean that this device can write to its own program memory space under internal software control. By using a bootloader routine, located in the protected Boot Block at the top of program memory, it becomes possible to create self-modifying applications.

This circuit was simulated in National Semiconductor’s Multisim v10 and the Printed Circuit Board was designed in Diptrace v2.1.The final design of the board can be seen in figure given. 

2.1. Building a basic USB Development Board

To build an USB development board based on a PIC18F4550 we require the following

  1. ·         A 20MHz crystal oscillator & two 15 or 22pF associated capacitors.
  2. ·         A USB-B or USB-A connector powering the PIC (Vss & Vdd) and linked to D- & D+ pins.
  3. ·         A 'decoupling' capacitor between Vss &Vdd (100nF &eventually another between 1 and 10uF )
  4. ·         A 'decoupling' capacitor between Vss &Vusb (220nF min, 470nF is also good)
  5. ·         A switch boot for hard reset on MCLR'
  6. ·         A switch reset for entering in Boot mode on RB4.

 

  1. To introduce self-programmability we have to first program the microcontroller using In-Circuit Serial Programming. The Boot and Reset switches are used to toggle the board between Bootloader mode and Execute mode. In the Bootloader mode, the microcontroller is statically programmed. After that it is transferred into the Execute mode, where the execution of the code takes place.

2.2. Sensors Interfacing

Every kind of robot that we build needs a certain number of sensors, which may be light sensors, heat sensors, ultrasound sensors etc. These sensors require electric power. To maintain the output within a certain range (usually 0-5V), we provide five 3 pin sensor ports with the centre being the output and the rest of the pins being at +5V and GND (for reference). The sensors output are connected to the Analog to Digital Conversion pins* of the PIC 18f4550 IC. The output of the sensors, which was initially analog, will now be converted into a digital from which can easily be understood by the processor. Also, two potentiometers that act as an exterior reference for the microcontroller have been connected to further ADC ports.

2.3. Interfacing with external Controlling Devices

A 38Khz Infrared Receiver Module, with TSOP 1238 IC(produced by Vishay Instruments) as the centre, has also been added to introduce one-sided serial communication with an external device. This provides stimulus from an external device, which governs the functioning of the robot. This board has also been provided with an extra port for pairing it with a wired remote that will offer speed control. The eight pins of the port on the bottom left of the board have been connected to the four input pins of the L293D IC, two pins have been used to offer speed control(the connections can be seen in Table 1)and remaining two pins power the external remote.

Also, as male jumpers have been connected to the pins of the ICs, we can easily connectan external communication circuit to our system for serial or parallel communication.

2.4. Interfacing with a Display Unit

With the purpose of establishing a way to communicate with the user via a Digital Display Unit, this board has been made compatible with a 16 by 2 LCD (Liquid Crystal Display) screen.

The 16-pin LCD that i used contains an internal backlight to enhance the display.

2.5. Interfacing with our Relay System

For running our relay system we use the L293D Integrated Circuit that will link our motors to our brain. For Speed control we apply Pulse Width Modulation (PWM) techniques. As they are edge triggered, the enable pins of the L293D are shorted with the PWM pins in our microcontroller (see Figure 3).The four input pins of the L293D have been connected to four Digital pins of the microcontroller, while the output pins are shorted with the connection of the motor.

This circuit can be used to control only Direct Current and Servo motors. DC motors can be connected to port M1 and M2.If we need to run more than 2 motors, an external L293D circuit can be connected to the system using the port on the far right of the PCB. Apart from DC motors, this board also allows us to utilize stepper motors (upto 8 pin). We limit he use of heavy motors due to the current limitation of the L293 D IC.

3.Conclusion:

The board i designed can be used to make the following types of robots:

  1. Line follower
  2. Grid follower
  3. Obstacle chaser/avoider
  4. Manual robots of any kind
  5. Legged Robots-Quadrupedal
  6. Micromouse
  7. Swarm Robots using external communication circuitry

This board will fulfill the needs of any student who is interested in basic robotics. Below is the pin connection of PIC18-F series 40 pins.

Pin number Connection
1 Reset Switch
2 Sensor1
3 Sensor2
4 Sensor3
5 Sensor4
6 Next switch (SPST)
7 Sensor5
8 Potentiometer1
9 Potentiometer2
10 Speed control (down)
11 Vdd
12 Vss
13 Osc1
14 Osc2
15 Buzzer
16 L293D enable2
17 L293D enable1
18 470nf Capacitor
19 L293D input1 / LED1
20 L293D input2 / LED2
21 L293D input3 /LED3
22 L293D input4 / LED4
23 USB connector type B (pin2)
24 USB connector type B (pin3)
25 Unconnected
26 Green LED4
27 LCD data
28 LCD data
29 LCD data
30 LCD data
31 1uf capacitor
32 1uf capacitor
33 Reserved
34 Green LED3
35 Green LED2
36 L293D Speed up
37 Select button (SPST)
38 LCD control
39 Green LED1
40 LCD toggle

 All the pins, which are in red, are the system configuration pin or can say, basic circuitry to operate PIC Microcontroller. Remaining are custom pins, which are set by me. Sensor1 to sensor5 are 5 analog pins which can be connected to any analog output giving device through the male connectors above LCD.

Next and select buttons are push buttons which are used to give active low when pressed. Potentiometers are also connected to analog pins, which are on the left of LCD in orange colour.

One is just connected to LCD, for its brightness. Hence i have not mentioned that in the list.

I hope that L293D pin connection will be clear to you, when you will read my article on L293D motor driver. Apart from this, there are 4 Red LEDs which are connected in parallel to input pins of L293D and 4 green LEDs which are just used for signal and indicating purposes on the board. For example: I used them to show auto caliberation of IR sensor in my code.

To setup and start programming PIC, follow my articles on pic intro and programming setup. I have also made an tutorial for you on blinking LED with  this PIC microcontroller board. You can also see some robotic implementation by this board here

 If you have any doubt or query, just contact me at my email address.

Comments

same day loans on the phone

cash advance

payday express

probate cash advances

wow)) generic cialis usa

discount cialis

cialis online pharmacy

i recommend cialis cost canada

cash loans birmingham

http://loansolofast.com/ - instant payday loans

payday loans advance

same day loans pay back monthly

only today cialis usa pharmacy

cialis

tadalafil

try it cialis in usa

cash advance in uvalde

http://loansolofast.com/ - online payday advance

online cash advance

payday loan petal ms

we choice what is cialis

tadalafil

cheap cialis

analogo cialis

russell simmons payday loan

payday loans

payday loans online

installment loans for delaware

quick loans in rapid city sd

http://loansolofast.com/ - fast payday loans

online payday loan

quick personal loan approval

wow)) low cost cialis

discount cialis

cheap cialis

cialis 20 mg espana

norwich and peterborough personal loans

http://loansolofast.com/ - no fax payday loans

payday loans advance

quick loans in va

cash loan in one day

http://loansolofast.com/ - direct lenders for payday loans

best online payday loans

payday loans online ga residents

apply personal loans

http://loansolofast.com/ - payday loan or pay day loan

instant payday loans

payday loan offices near me

payday loans on 87th cottage grove

http://loansolofast.com/ - online payday loans

online payday loans direct lenders

cash advance key west

cash loans contact

http://loansolofast.com/ - payday advance online

payday loan or pay day loan

cash advance in livonia mi

payday loans in rowlett tx

http://loansolofast.com/ - no fax payday loans

online cash advance

payday loans belton mo

cash advance in weatherford tx

http://loansolofast.com/ - instant payday loans

online payday advance

cash advance in livonia mi

payday loan ukiah ca

http://loansolofast.com/ - payday loans online

payday loans online same day

gtc cash advance

cheapest personal loans in usa

http://loansolofast.com/ - online payday loans

payday loan payday loans

payday loan offices near me

are installment loans good for credit score

http://loansolofast.com/ - online payday loans direct lenders

best online payday loans

no credit personal loan approval

no credit personal loan approval

[url=http://loansolofast.com/]fast payday loans[/url]

fast payday loans

legit online payday loans

cash loans sheboygan wi

http://loansolofast.com/ - online payday loans

payday loans online same day

pay loan

apply personal loans

http://loansolofast.com/ - fast payday loans

best online payday loans

cash advance on normandy

quickenloan

http://loansolofast.com/ - online payday advance

online payday advance

cash advance low fee

cash advance Dallas 75243

http://loansolofast.com/ - 3 month payday loans

no fax payday loans

interest loan low rate unsecured

cash loans porirua

http://loansolofast.com/ - payday loans online same day

online cash advance

quick loans laredo tx

how to figure out interest on a short term loan

http://loansolofast.com/ - payday loan or pay day loan

payday advance online

permanent tsb personal loan rates

fast cash on memorial drive

http://loansolofast.com/ - payday loan cash loan

payday loan cash loan

four seasons pay day loan

the cash checking store

http://loansolofast.com/ - payday loan cash loan

3 month payday loans

fixed loans

same payday loan

http://loansolofast.com/ - payday loan cash loan

payday loan cash loan

payday loans without direct deposit and credit check

instant cash advance miami lakes

http://loansolofast.com/ - online payday loans

fast payday loans

cash loans scottsdale az

payday loans without direct deposit and credit check

http://loansolofast.com/ - best online payday loans

online payday loans direct lenders

cash advance elm rd

no credit check personal loan

http://loansolofast.com/ - payday loans online

payday loan payday loans

national payday loan okc

i need money now bad credit

http://loansolofast.com/ - fast payday loans

online payday loans direct lenders

reasons to apply for a personal loan

personal loans rome ga

http://loansolofast.com/ - direct lenders for payday loans

no fax payday loans

fast cash loans with no credit check

i need money now bad credit

http://loansolofast.com/ - online payday loans

payday loans online same day

payday loan in denver colorado

personal loans amarillo

http://loansolofast.com/ - online cash advance

payday loan cash loan

payday loans sedalia missouri

feinace

http://loansolofast.com/ - instant payday loans

best online payday loans

cash advance in Fremont Cali.

poor credit payday loan direct lenders

http://loansolofast.com/ - online cash advance

payday loan or pay day loan

payday loans in rowlett tx

where to get a personal loan with bad credit in edmonton

http://loansolofast.com/ - payday loans advance

direct lenders for payday loans

payday loans off child tax credit

defaulting on payday loans in tennessee

http://loansolofast.com/ - online payday advance

fast payday loans

people to people loans

payday loans online 24 hours

http://loansolofast.com/ - payday loan or pay day loan

payday advance online

best MA cash advance

fast cash gainesville fl

http://loansolofast.com/ - payday loan or pay day loan

payday advance online

fast cash on memorial drive

young guys taking cialis

http://buycialisoponline.com/ - cialis cheap

generic cialis

best price cialis soft

cialis 20mg espanol

http://buycialisoponline.com/ - buy cialis

cialis cheap

order erection pills cialis

20 mg genericos cialis

http://buycialisoponline.com/ - buy cialis online

buy cialis online

i use it cialis usa

cialis generico falso

cialis for sale

cialis online

how much are cialis pills

cialis sales usa

buy cialis

cialis coupon

cheapest buy cialis

cost of 20 mg cialis

buy cialis

cialis

costo cialis viagr

reviews on viagra

viagra online

viagra online

achat viagra ligne paypal

hoe viagra bestellen

buy viagra online

buy cheap viagra

pfizer viagra online overnight

Pages