.st0{fill:#FFFFFF;}

Arduino

What is “baud”? 

 September 5, 2018

By  Peter

Join Our Mailing List

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community.

One email per week, no spam, unsubscribe at any time.

The unit “baud” is the speed of communication between the two devices. Your computer and the Arduino talk via the USB/TTL (serial) interface. There are a few parameters that control this communication, but all of them are standardized (so you don’t have to worry about them) except for the speed.

If you don’t set the two devices to the same speed, then one device will be sending data to the other faster or slower than expected, and the result will be a mess (the text in the serial monitor will be garbage, and unreadable).

A speed of 9600 bauds means that data will flow between the devices at a rate of 9600 signal changes per second. One cause of confusion here is that many people think that 1 signal change is the same as 1 bit. Therefore, people expect that 9600 bauds is the same as 9600 bits per second, which it isn’t.

At the electrical level, a computer uses voltages to transmit data (a computer can also use multiple voltage levels plus the signal phase to encode multiple bits in a single signal change, but let’s keep things simple here).

Data is transmitted by changing the signal parameters rapidly. For example, you can create a protocol where binary “1” is transmitted by changing voltage from HIGH to LOW, and a “0” by changing voltage from a LOW to HIGH.

When you have a protocol where 1 signal change encodes 1 bit, then 1 baud = 1 bit per second.

It is possible to have multiple bits encoded in a single signal change, like in Phase-shift keying (PSK). In PSK, each signal change encodes 2 bits. So, 1 baud = 2 bit per second.

In quadrature amplitude modulation (QAM), we have 4 bits for every signal change, so 1 baud = 4 bit per second.

And the list goes on…

In practical terms, you must ensure that your devices are communicating at the same baud rate.

For the Arduino, do this:

  1. Look in your Arduino sketch for a line that looks like this (in the setup function): Serial.begin(9600) — The number may vary.
  2. Set the speed of your serial terminal on the computer to the same number.

This should do it!


Tags

baud


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Understanding the power requirements is crucial for any enthusiast using the Arduino Uno in their projects. How you manage voltage, amperage, and power sources impacts the success or failure of your endeavours. In this guide,

Read More
The Ultimate Guide to Powering Your Arduino Uno Board

If you are curious about how electronic devices work, understanding the fundamentals of the operation of their basic components is essential. Every electronic device—from the smartphones in our pockets to the satellites orbiting our planet—contains

Read More
A Guide to Essential Electronic Components in Circuits