Project 26 : ADC and DAC Checker Board

Circuit setup

ADC0804 video

DAC0800 video

ADC DAC Board Version I

ADC DAC Board Version II 
ADC PCB Layout

Version II Video

Project 25 : Speed Boat Controller

Project setup 

PWM output signal  

Dual boat engines 

Driver schematic

Early setup video 

Tut 8 : First Order Circuit



Answers

7.4) Vc(t) = 40exp(-50t)
7.11) io(t) = 1.2exp(-3t)
7.40 a) Vc(t) = 4+8exp(-t/6)
7.54 b) i(t) = 3-1exp(-9t/4)


Tut 7 : Capacitor and Inductor


Answer
 (i) Req=12.5 ohm
 (ii) iL = 0.25 A
 (iii) Vc= 15V

Project 21 : Scanning Array Unit

8-wire unipolar stepper motor  

Early project setup

Early project test

Early video 1

Early video 2

Test setup


Testing video

Finished product

Finished video

Tut 17 : LCD Big Characters



 Big characters

PBP Program
'program to display big characters (numbers) on LCD

DEFINE OSC 20
@ device hs_osc

DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 5
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2

TRISB = 0
TRISD = 0

nPos VAR BYTE

LCDOut  $FE,$40,$01,$01,$01,$01,$01,$01,$01,$01  ' Cust Char #0
LCDOut  $FE,$48,$1F,$11,$11,$11,$11,$11,$11,$11  ' Cust Char #1 
LCDOut  $FE,$50,$1F,$10,$10,$10,$10,$10,$10,$1F  ' Cust Char #2 
LCDOut  $FE,$58,$01,$01,$01,$01,$01,$01,$01,$1F  ' Cust Char #3 
LCDOut  $FE,$60,$1F,$11,$11,$11,$11,$11,$11,$1F  ' Cust Char #4 
LCDOut  $FE,$68,$11,$11,$11,$11,$11,$11,$11,$1F  ' Cust Char #5 
LCDOut  $FE,$70,$1F,$01,$01,$01,$01,$01,$01,$1F  ' Cust Char #6 
LCDOut  $FE,$78,$1F,$01,$01,$01,$01,$01,$01,$01  ' Cust Char #7
 
Pause 500
LCDOut $FE,1

loop:
 nPos = 0
 GoSub Zero
 nPos = 1
 GoSub One
 nPos = 2
 GoSub Two
 nPos = 3

Pause 2000
GoTo loop

Zero:
 LCDOut $FE,$80+nPos,1
 LCDOut $FE,$C0+nPos,5
Return
One:
 LCDOut $FE,$80+nPos,0
 LCDOut $FE,$C0+nPos,0
Return
Two:
 LCDOut $FE,$80+nPos,7
 LCDOut $FE,$C0+nPos,2
Return

Tut 16 : LCD Custom Characters

Most of the alpha numeric LCD like 16x2 character has ability to generate few custom characters. Custom characters on any 16x2 LCD provides the functionality of CGRAM (Character Generator RAM) where you can create your own characters for display. The codes for custom character generation using PIC16F877 microcontroller can be created using any custom character generator available in the internet. The custom character generation using  PIC16F877 is in 8bit mode. 
 
Custom characters on LCD  

Battery character on LCD 
 
We can program 8 custom characters when we are using 5x8 font in the LCD settings and we can program 4 custom characters when we are using 5x10 font in the LCD settings. The binary coding in the custom charactor generator can be written in HEX form as in PBP program below.
Custom character generator
 
PBP Program
'program to display some characters on LCD
 
DEFINE OSC 20
    @ device hs_osc

DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 5
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
 
TRISB = 0
TRISD = 0

LCDOUT  $FE,$40,$00,$0A,$0A,$00,$11,$0E,$00,$00  ' Cust Char #0: happy smiley 
LCDOUT  $FE,$48,$0E,$15,$1B,$19,$1B,$15,$0E,$00  ' Cust Char #1: copyright
LCDOUT  $FE,$50,$0E,$0E,$1F,$0E,$04,$00,$1F,$00  ' Cust Char #2: press 

Pause 500
LCDOut $FE,1
 
Loop:
LCDOut $FE,$80+0,0
Pause 1000
LCDOut $FE,$80+1,1
Pause 1000
LCDOut $FE,$80+2,2
Pause 1000
GoTo loop
 

Tut 4 : Mesh Analysis


Answers

Q1.    Io = -1.244A,   I1 = -1.756A
Q2.   Va=12.35V,   Vb=27.35V,   Vc=10.585V,   Vd=0,   Ve=7.53V

TWISS 2013

Basic soldering technique and resistance measurement
 
 
Video 1: Soldering technique
 
Video 2: Continuity test and resistor measurement



Video 3: Cardboard car
 
Figure 1: Schematic and components list



Figure 2: Competitors

 Figure 3: Obstacle challenge

 
 

Tut 3 : Nodal Analysis


 
Answers

Q1. (i) Va = -5V, Vb= -10V, i1 = 1mA, i2 = -20mA, i3 = 31mA,  i4 = -10mA, i5 = 10mA
       (ii) Power dissipated = 0.275W, Power developed = 0.33W
Q2. Va = 13V, Vb = 0.095V, Vc = 18.3V      
Q3. V1 = -76.75V, V2 = -31.5V      

Tut 2 : KVL,KCL,Delta to Wye, Wye to Delta and Quiz 1



Answers

Q1. Va = 18.75V
Q2. (i) Ra = 8 ohm
       (ii) i1= 3A, V1 = 6V
Q3.  (i) Number of nodes = 11, branches = 24
       (ii) Req = 9.85 ohm
       (iii) Vo= 0.42 V
  
Quiz 1





Tut 15 : Serial data communication

Serial data communication is a communication between microcontroller and other systems like RFID reader, GPS module, GSM module or computer. The communication is done via a RS232 interface. RS232 is a standard for a serial communication interface which allows to send and receive data. With the RS232 interface it is possible to setup a connection between a microcontroller and those units. Sometime the RS232 interface is used for communication between two microcontrollers.
 
 PIC and Computer communication
 
Old computers have their own serial ports (COM), thus the communication will go through these ports. Note that modern PCs don't have a serial port so you need to get a USB to serial converter. They are available at low cost. For serial communication the line used to transmit data is called TX and the line used to receive data is called RX. When sending or recieve commands from a PC to a microcontroller, or vice versa, the informations can be viewed on PC using any hyper termial program. Another way is to send the informations through visual basic.
 Communication blog diagram 
 
 USB to UART converter

PBP Program
'program to send and receive serial data 
 
DEFINE OSC 20
   @ device hs_osc  'jika guna crytal 20Mhz
 
INCLUDE "modedefs.bas"          ' Include serial modes
x VAR Byte(3)
 
loop:                                  
SerIn2 PORTC.7, 84,keyout,[WAIT("A"),STR x\3]    'receive data
SerOut2 PORTC.6,84,[x(0)]     ' Send 1st data
pause 100
SerOut2 PORTC.6,84,[x(1)]     ' Send 2nd data
pause 100
SerOut2 PORTC.6,84,[x(2)]     ' Send 3rd data
pause 100
GoTo loop
End   

Tut 14 : RFID

RFID (Radio-Frequency IDentification) is a small electronic devices that consist of a small chip and an antenna. The chip typically is capable of carrying 2K/4K/8K bytes of data or less. The RFID device serves the same purpose as a bar code or a magnetic strip on the back of a credit card or ATM card since it provides a unique identifier for that object. 

The RFID device must be scanned to retrieve the identifying information from the cards or tags. A significant advantage of RFID devices over the others mentioned above is that the RFID device does not need to be positioned precisely relative to the scanner. 

In contrast, RFID devices will work within a few feet (up to 20 feet for high-frequency devices) of the scanner. Some short distance RFID works below than 10 cm. Some common problems with RFID are reader collision and tag collision. Reader collision occurs when the signals from two or more readers overlap. The tag is unable to respond to simultaneous queries.Systems must be carefully set up to avoid this problem. Tag collision occurs when many tags are present in a small area. But since the read time is very fast, it is easier for vendors to develop systems that ensure that tags respond one at a time.
 
RFID tags may be used as:
  • Animal tracking tags, inserted beneath the skin.
  • Tags can be screw-shaped to identify items, trees or wooden items.
  • Credit-card shaped for use in access applications.
  • Smart attendance and parking system.

 
 RFID reader and tag(transponder)
 

System block diagram


Application of RFID in parking system
 
PBP Program
'program to use RFID reader and tag 
 
DEFINE OSC 20
   @ device hs_osc                         
INCLUDE "modedefs.bas"          ' Include serial modes
DEFINE HSER_RCSTA 90h           ' Definition serial modes utk Hserin
DEFINE HSER_TXSTA 24h
DEFINE HSER_BAUD 57600             ' 57600 Bauds rate
DEFINE HSER_SPBRG 21
DEFINE HSER_CLROERR 1
 
buf VAR BYTE(7) 

' -----[ EEPROM Data ]-----------------------------------------------------
Tag1 Data "AES8915"         ' ID 1
Tag2 Data "PGL9796"          ' ID 2
Tag3 Data "PJT4769"           ' ID 3
Tag4 Data "NAV8915"          ' ID 4
Tag5 Data "BFE6529"          ' ID 5
Tag6 Data "FE6529 "            ' ID 6
Tag7 Data "*BFE652"          ' ID 7
 
loop:
HSerin [WAIT("*"),STR buf\7]    
Check_List:
'checking commands  
Goto loop