What is “baud”? 

 September 5, 2018

By  Peter

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!



You may also like

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

In this Maker Mind Meld summit presentation, Dal Gemmell talks about a new generation of wireless networks, based on cutting-edge blockchain technology, that delivers a new kind of open, decentralized wireless network built by individuals

Read More
Dal Gemmell – A blockchain-powered decentralized network owned by you

Happy New Year! The turn of a year is an opportunity to reflect (look back) and plan (look forward). 2022 was another challenging year in many respects, and 2023 will be no less challenging. However,

Read More
Start 2023 with Tech Explorations