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

dosi cialis 5 m

cheap cialis

buy cialis

cialis uk price

cialis usa women

buy cheap cialis

cialis

cialis cheap online ordering

payday loan eltham

[url=http://arealpaydayloan.com/] pay day loans[/url]

payday loans online

treatment of income tax paid in advance in cash flow statement

fast pony payday loans

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

fast payday loans

payday loans that dont require personal checks

mojo cash advance

loans for bad credit

cash advance

united group payday loan

cialis 20mg tunisie

cialis online

cialis

cialis discount rates

payday loan offices near me

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

payday loans online

instant payday loans no lenders

cialis acheter canada

[url=http://cialisrx.com/]cialis[/url]

cialis

online cialis professional uk

fast cash minot

pay day loans

pay day loans

cash advance on baby bonus

cash advance fremont michigan

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

instant payday loans

personal loans rome ga

cialis generico lima

buy cialis

cialis tadalafil

cialis for sale au

ways of making fast cash

cash advance

payday loans online

payday loan eltham

bad credit payday loans winnipeg

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

online payday loans

fast cash loans with no credit check

cialis 5 pas cher

cialis online pharmacy

buy cialis

visit our site branded cialis

mojo cash advance

cash advance

loans for bad credit

united group payday loan

safe place buy cialis online

cialis online pharmacy

discount cialis

nuovo cialis 5 mg

cash advance in ames iowa

payday express

personal loans

apply for small loans online

how to get a five thousand dollar loan with bad credit

pay day loans

pay day loans

payday loans in sioux city

cialis scadut

buy cialis

cheap cialis

price for cialis 5mg,

best cash advance Dallas

personal loans

payday loans

cash advance BOS 02126

generic cialis 60 mg online

cialis tadalafil

cialis tadalafil

only now cialis tablets sale

cialis dosagem

tadalafil

cialis

kann man billig cialis kaufen

dollar loans com

payday express

payday express

apply for small loans online

emergency eviction loans

personal loans

payday express

best cash advance Dallas

cialis-preise mastercard

cialis

cheap cialis

cialis keine wirkung mehr

i use it cialis soft

buy cheap cialis

cialis online pharmacy

farmacia online compra cialis

visa cash advance interchange

payday express

loans for bad credit

cash loans to your door glasgow

cheapest apr personal loans

payday loans online

cash advance

bad credit loan with installments

cialis scadut

buy cialis

cialis online pharmacy

kob cialis online

borrowing from ira

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

instant payday loans

easy loans monthly payments

get unsecured personal loan bad credit

payday loans

loans for bad credit

legitimate short term loans

cialis tab 20mg x 8

cialis online pharmacy

cialis tadalafil

cheapest cialis in melbourne

payday loans oc

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

instant payday loans

personal credit info

cash advance river falls wi

personal loans

personal loans

payday loans suffolk va

order brand cialis 120 mg

buy cheap cialis

cialis tadalafil

online cialis professional uk

1 hour cash advance

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

online cash advance

cash usa pay loan

cialis 20 mg costo farmacia

cialis

cialis

only here cheap cialis

payday loan ukiah ca

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

fast payday loans

advance on pay

cialis on women

cialis

buy cheap cialis

cialis dark stool

payday loans in nampa

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

no fax payday loans

payday loans in pleasanton ca

cash advance muskegon mi

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

payday loans online same day

need cash fast no faxing

cheapest apr personal loans

personal loans

loans for bad credit

personal loan in lapu lapu

cash cafe payday loans

payday loans

pay day loans

payday loan in florissant mo

cash advance BOS 02126

payday express

payday loans

cash advance sunnyvale ca

cash loan gosford

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

payday loan or pay day loan

top short term loan lenders

fast online installment loan

payday loans

payday loans online

visa cash advance interchange

cialis cheap online ordering

cialis online

cheap cialis

cialis when to take it

loans for bad credit and self employed

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

direct lenders for payday loans

cash loans sheboygan wi

borrowing from ira

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

payday advance online

payday loan in florissant

cialis 20 mg espana

cialis online

cialis online pharmacy

buy generic cialis europe

Pages