Notes

Assignement

design and build a wired &/or wireless network connecting at least two processors

What i am going to do

I want to make make a ATtiny Networking System using Serial .

Networking

In embedded system all about interlinking circuits(Microcontrollers,Sensors,Actuators,networks etc) to create a complete system .in many situations for swaping informations from one circuit to another they must have a common communication protocol lot of communication protocols available they all underlying two main catagories serial and Parallel .

Networking Fab Academy

These are the technologies widely used for networking .

Parallel

Parallel communication protocols transfers multiple bits at a time using buses of data

Pros: *fast *easy to interface

Cons: *Requires more IO lines

We are opt for Serial by sacrificing Speed for saving IO pins .

Networking Fab Academy

Image Source : https://learn.sparkfun.com

Serial

Serial Communication stream their data ,single bit at a time we can implement serial communication using 1 wire ,normally we are using 2 wire(RX,TX)

Networking Fab Academy

Image Source :https://learn.sparkfun.com

SPI(Serial Peripheral Interface )

It is an interface bus commonly used to send data between microcontrollers and its peropherals ,it is full duplexit can send and recive in same time .

Half Duplex

It gives communication to two directions but only one direction at a time ,Eg :- Walkie Talkie

Networking Fab Academy

Full Duplex(Double Duplex)

It allows communication in two directions at a time like a Mobile Phone communication.

Networking Fab Academy

I2C(Inter-integrated Circuit)

It allows to communicate mutiple “slaves” to one or more “masters” it requires only two wires two exchange information. one master can support upto 1008 slave devices and it allows multi-master system Networking Fab Academy

Internet Protocols

UDP

TCP

HTTP

FTP

wireless

RF

Zigbee

Wifi

ESP8266

Networking Fab Academy I am going to use ESP8266 in my final project , I will add more about ESP in my Project Documentation Page

My Networking

I created 3 networking board using ATtiny45 for targetting I2C connection but a mistake happen I forget to give Pullup Resistors in SDA and SCL thats why i changed to serial .

Why Pullup Resistors important in I2C?

I serached for an alternative solutions to I2C netwotking without using Pullup Resistors , but every where is saying it is necessory .

I reserched on it , finally i got clear idea abot that .

I2C bus consist of Two signals(SCL - Clock Signal and SDA -Data Signal) , and I2C driveres in the MCU working in Open Drain condition means they want signal lines in LOW cant drive it in High its for eliminating chances of damaging the driver thats why we need to put a Pullup resistor in SDA and SCL .

Board Designing

In My First Board “Node 1” i added an FTDI connection to communicate with PC and in other Boards “Node 2” i added two I/O pins for external interfacing ,I attached a LED on It .

Networking Fab Academy Eagle Networking Fab Academy Eagle

Download Eagle Files

Node 1 FTDISchBrd

Node 2 SchBrd

Networking Fab Academy Eagle

Programming

I want to program in Embedded C thats why i referred Neil’s hello.bus.45 after undestanding the code i modified Neils code for my requirements .

I changed all Pins and LED blinking pattern after that i programmed it using Make file .I am attaching my code here .

Node_1.C Make File

Node_2.CMake File

I am got more interest in C than Arduino i need to learn Embedded C .

Final Output

This is the Output of my project .

My Movie from Jaseel on Vimeo.

New Things I Learned

Diffrent Networking models and theier use also i experimented with I2C and Serial and i am going to use Wifi(ESP8266) in my final project .

Problems Faced and Solutions

Main Problem i faced serial communication issues with PC iam getting random charactors in terminal .

Solution

Ensure all boards working in same baud rate (normally we are using 9600 baude rate)