Posts with «communications» label

I2C To The Max With ATtiny

The Arudino is a powerful platform for interfacing with the real world, but it isn’t without limits. One of those hard limits, even for the Arduino MEGA, is a finite number of pins that the microcontroller can use to interface with the real world. If you’re looking to extend the platform’s reach in one of your own projects, though, there are a couple of options available. This project from [Bill] shows us one of those options by using the ATtiny85 to offload some of an Arduino’s tasks using I2C.

I2C has been around since the early 80s as a way for microcontrollers to communicate with each other using a minimum of hardware. All that is needed is to connect the I2C pins of the microcontrollers and provide each with power. This project uses an Arduino as the controller and an arbitrary number of smaller ATtiny85 microcontrollers as targets. Communicating with the smaller device allows the Arduino to focus on more processor-intensive tasks while giving the simpler tasks to the ATtiny. It also greatly simplifies wiring for projects that may be distributed across a distance. [Bill] also standardizes the build with a custom dev board for the ATtiny that can also double as a shield for the Arduino, allowing him to easily expand and modify his projects without too much extra soldering.

Using I2C might not be the most novel of innovations, but making it easy to use is certainly a valuable tool to add to the toolbox when limited on GPIO or by other physical constraints. To that end, [Bill] also includes code for an example project that simplifies the setup of one of these devices on the software end as well. If you’re looking for some examples for what to do with I2C, take a look at this thermometer that communicates with I2C or this project which uses multiple sensors daisy-chained together.

Send Old-Fashioned Pager Messages with New-Fashioned Hardware

In a world of always-connected devices and 24/7 access to email and various social media and messaging platforms, it’s sometimes a good idea to take a step away from the hustle and bustle for peace of mind. But not too big of a step. After all, we sometimes need some limited contact with other humans, so that’s what [EverestX] set out to do with his modern, pocket-sized communication device based on pager technology from days of yore.

The device uses the POCSAG communications protocol, a current standard for pager communications that allows for an SMS-like experience for those still who still need (or want) to use pagers. [EverestX] was able to adapt some preexisting code and port it to an Atmel 32u4 microcontroller. With a custom PCB, small battery, an antenna, and some incredibly refined soldering skills, he was able to put together this build with an incredibly small footprint, slightly larger than a bottle cap.

Once added to a custom case, [EverestX] has an excellent platform for sending pager messages to all of his friends and can avoid any dreaded voice conversations. Pager hacks have been a favorite around these parts for years, and are still a viable option for modern communications needs despite also being a nostalgic relic of decades past. As an added bonus, the 32u4 microcontroller has some interesting non-pager features that you might want to check out as well.

Thanks to [ch0l0man] for the tip!

Hack a Day 18 May 21:00

A Crash Course In Reliable Communication

It’s probably fair to say that anyone reading these words understands conceptually how physically connected devices communicate with each other. In the most basic configuration, one wire establishes a common ground as a shared reference point and then the “signal” is sent over a second wire. But what actually is a signal, how do the devices stay synchronized, and what happens when a dodgy link causes some data to go missing?

All of these questions, and more, are addressed by [Ben Eater] in his fascinating series on data transmission. He takes a very low-level approach to explaining the basics of communication, starting with the concept of non-return-to-zero encoding and working his way to a shared clock signal to make sure all of the devices in the network are in step. Most of us are familiar with the data and clock wires used in serial communications protocols like I2C, but rarely do you get to see such a clear and detailed explanation of how it all works.

He demonstrates the challenge of getting two independent devices to communicate, trying in vain to adjust the delays on the receiving and transmitting Arduinos to try to establish a reliable link at a leisurely five bits per second. But even at this digital snail’s pace, errors pop up within a few seconds. [Ben] goes on to show that the oscillators used in consumer electronics simply aren’t consistent enough between devices to stay synchronized for more than a few hundred bits. Until atomic clocks come standard on the Arduino, it’s just not an option.

[Ben] then explains the concept of a dedicated clock signal, and how it can be used to make sure the devices are in sync even if their local clocks drift around. As he shows, as long as the data signal and the clock signal are hitting at the same time, the actual timing doesn’t matter much. Even within the confines of this basic demo, some drift in the clock signal is observed, but it has no detrimental effect on communication.

In the next part of the series, [Ben] will tackle error correction techniques. Until then, you might want to check out the fantastic piece [Elliot Williams] put together on I2C.

[Thanks to George Graves for the tip.]

Makers in Space: What Was Old Is New Again

Setting the record straight on the history of Do-It-Yourself satellites.

Read more on MAKE