Skip to content

Connecting an Arduino and Raspberry Pi via GPIO using serial communication.

Notifications You must be signed in to change notification settings

akchobby/Arduino_2_Raspi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino_2_Raspi

This repository aims to aid those who would like to connect an Arduino uno and a Raspberry pi 3 via serial communication (UART) the harder way ;).

Concept

The purpose of the project is to be able use the GPIO pins of raspi (3.3V tolerant)to perform serial communication with an Arduino uno which runs at a higher voltage (5V). The most widely advised solution is to use a logic level shifter but this is not a cheap way. The method used for the project was to make a Voltage divider circuit with simple and cheap resistors to bring down the votage from the Arduino Tx line.

Serial Comm

A short note on Serial Communication. In this type of comm there exists a total of 3 ports the transimmision (Tx) , the recieving(rx) and ground. Its is important to know the baurate of the serial comm so that it can be monitored in the serial monitor of Arduino. This rate can be set.

Physical circuitry

The solution I had come up with was inspired link from Oscar Liang. This article discusses other techniques too and I strongly recommend reading it.

For a more clear understanding the fritzing diagram form the link mentioned earlier.

Once you run the programs on the arduino and raspi after correctly connecting the ports, one can monitor it via the serial monitpr provided by arduino through another computer, example of how it will look.

Installation and Usage

  • First clone the repo in both your system and Raspberry pi
  • Compile upload the arduino code into the arduino uno.
  • ensure the connections are done properly
  • open the serial monitor.
  • run the python code from the Raspberry Pi

P.S : ensure in Raspi config the serial communication is enabled.

About

Connecting an Arduino and Raspberry Pi via GPIO using serial communication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published