Serially, Are You Syncing Or Asyncing?

I know you’ve heard of both synchronous and asynchronous communications. But do you really know the differences between the two?

Serial communication was used long before computers existed. A predecessor is the telegraph system using Morse Code, one of the first digital modes of communication. Another predecessor is the teletype, which set standards that are still used today in your Arduino or Raspberry Pi.

All you need is two wires for serial communications, which makes it simple and relatively robust. One wire is ground and the other the signal. By interrupting the power with predefined patterns, information can be transferred over both short and long distances. The challenge is receiving the patterns correctly and quickly enough to be useful.

I was a bit surprised to find out the serial port on the Arduino Uno’s ATmega328P microcontroller is a Universal Synchronous Asynchronous Transmitter Receiver (USART). I’d assumed it was only a UART (same name, just leave out synchronous) probably because my first work with serial communications was with the venerable Intel 8251 “Programmable Communication Interface”, a UART, and I didn’t expect the microcontroller to be more advanced. Silly me. Later I worked with the Zilog 8530 Serial Controller Chip, a USART, the term I’ll use for both device types.

All these devices function in the same way. You send a byte by loading it into a register and it is shifted out one bit at a time on the transmit (TX) line as pulses. The receiver accepts the pulses on a receive (RX) input and shifts them into a register, which is then read by the system. The transmitter’s job is pretty easy it just shifts out the bits at a known clock rate. The receiver’s task is more complex because it needs to know when to sample the incoming signal. How it does this is the difference between asynchronous and synchronous communications.

Continue reading “Serially, Are You Syncing Or Asyncing?”

Raspberry Pi Gets Turned On

The Raspberry Pi and other similar Linux-based single board computers simplify many projects. However, one issue with Linux is that it doesn’t like being turned off abruptly. Things have gotten better, and you can certainly configure things to minimize the risk, but–in general–shutting a Linux system down while it is running will eventually lead to file system corruption.

If your project has an interface, you can always provide a shutdown option, but that doesn’t help if your application is headless. You can provide a shutdown button, but that leaves the problem of turning the device back on.

[Ivan] solved this problem with–what else–an Arduino (see the video below). Simplistically, the Arduino reads a button and uses a FET to turn off the power to the Pi. The reason for the Arduino, is that the tiny processor (which draws less than a Pi and doesn’t mind being shut down abruptly) can log into the Pi and properly shut it down. The real advantage, though, is that you could use other Arduino inputs to determine when to turn the Pi on and off.

Continue reading “Raspberry Pi Gets Turned On”

AVR Vs PIC, Round 223: Fight!

Get ready to rumble! [Thierry] made the exact same Hello-World-esque project with two microcontrollers (that are now technically produced by the same firm!) to see how the experience went.

It’s not just an LED-blinker, though. He added in a light-detection function so that it only switches on at night. It uses the Forest Mims trick of reverse-biasing the LED and waiting for it to discharge its internal capacitance. The point is, however, that it gives the chip something to do instead of simply sleeping.

Although he’s an AVR user by habit, [Thierry] finds in favor of the PIC because it’s got a lower power draw both when idling and when awake and doing some computation. This is largely because the PIC has an onboard low-power oscillator that lets it limp along at 32 kHz, but also because the chip has a lower power consumption in general. In the end, it’s probably a 10% advantage to the PIC on power.

If you’re competent with one of the two chips, but not the other, his two versions of the same code would be a great way to start familiarizing yourself with the other. We really like his isDarkerThan() function which makes extensive use of sleep modes on both chips during the LED’s discharge period. And honestly, at this level the code for the two is more similar than different.

(Oh, and did you notice [Thierry]’s use of a paper clip as a coin-cell holder? It’s a hack!)

Surprisingly, we’ve managed to avoid taking a stray bullet from the crossfire that occasionally breaks out between the PIC and AVR fans. We have covered a “shootout” before, and PIC won that round too, although it was similarly close. Will the Microchip purchase of Atmel calm the flames? Let’s find out in the comment section. We have our popcorn ready!

Hackaday Prize Entry: MyComm Handheld Satellite Messenger

We live in a connected world, but that world ends not far beyond the outermost cell phone tower. [John Grant] wants to be connected everywhere, even in regions where no mobile network is available, so he is building a solar powered, handheld satellite messenger: The MyComm – his entry for the Hackaday Prize.

The MyComm is a handheld touch-screen device, much like a smartphone, that connects to the Iridium satellite network to send and receive text messages. At the heart of his build, [John] uses a RockBLOCK Mk2 Iridium SatComm Module hooked up to a Teensy 3.1. The firmware is built upon a FreeRTOS port for proper task management. Project contributor [Jack] crafted an intuitive GUI that includes an on-screen keyboard to write, send and receive messages. A micro SD card stores all messages and contact list entries. Eventually, the system will be equipped with a solar cell, charging regulator and LiPo battery for worldwide, unconditional connectivity.

2016 will be an interesting year for the Iridium network since the first satellites for the improved (and backward-compatible) “Iridium NEXT” network are expected to launch soon. At times the 66 Iridium satellites currently covering the entire globe were considered a $5B heap of space junk due to deficiencies in reliability and security. Yet, it’s still there, with maker-friendly modems being available at $250 and pay-per-use rates of about 7 ct/kB (free downstream for SDR-Hackers). Enjoy the video of [Jack] explaining the MyComm user interface:

Continue reading “Hackaday Prize Entry: MyComm Handheld Satellite Messenger”

Bright Idea For A Name Tag

Looking for a quick DIY project to separate yourself from the crowd at your next business function or maker expo? Take a leaf out of [Pete Prodoehl’s] book and make your own name tag complete with blinking LED!

Minimalist, yet flashy (sorry!), this quick project can be completed inside a few hours with few resources, and is a great way to display your DIY handiwork. Continue reading “Bright Idea For A Name Tag”

Automating 3D Printers With Robots

3D printers were never meant to be used for production. They’re not manufacturing machines, they’re prototyping machines. That doesn’t mean 3D printers can’t be used in a manufacturing context, it’s just very hard – you’d need someone manning a fleet of machines, or some sort of ‘automated build platform’ that won’t be invented for exactly fourteen years.

In the absence of someone paid to watch printers print, [Mark], [Robert], and [James] at tend.ai have created a way to manage a fleet of printers with a robot arm. It’s a robotic arm that automatically monitors the LCD on a rack full of 3D printers, plucks the finished prints off the bed, drops the parts in a box, and starts another print.

Tend.ai is in the business of cloud robotics, and have designed a system that takes any robotic arm, any webcam, and provides the backend for this robotic arm to – wait for it – tend to other machines. As a demo, it works well. Parts are picked up off of the machines, dropped into boxes, and another print run started.

As a tech demo for a cloud robotics platform, you can’t do much better than this. As a way to automate a fleet of 3D printers, I can only wonder how this robot arm system would work with large, flat printed parts. A robotic gripper could always be replaced with a spatula, I guess.

You can check out the demo and the ‘how they did it’ video below.

Continue reading “Automating 3D Printers With Robots”

Removing DRM From Aaron Swartz’s EBook

After his death, Aaron Swartz became one of the Internet’s most famous defenders of the free exchange of information, one of the most polarizing figures on the topic of intellectual property, and the most famous person that still held on to the ideals the Internet was founded on. Aaron was against DRM, fought for the users, and encouraged open access to information.

Early this year, Verso Books published the collected writings of Aaron Swartz. This eBook, according to Verso, contains ‘social DRM’, a watermarking technology that Verso estimates will, “contribute £200,000 to the publisher’s revenue in its first year.” This watermarking technology embeds uniquely identifiable personal information into individual copies of eBooks.

With a heavy sigh, you realize you do not live in the best of all possible worlds.

The Institute for Biblio-Immunology had a similar reaction to Verso Books’ watermarking technology applied to the collected writings of Aaron Swartz. In a communique released late last weekend, they cracked this watermarking scheme and released the code to remove this ‘social DRM’ from ePub files.

The watermarking technology in Aaron Swartz’s eBook comes courtesy of BooXtream, a security solution where every eBook sold is unique using advanced watermarking and personalization features. “A publication that has been BooXtreamed can be traced back to the shop and even the individual customer,” the BooXtream website claims, and stands in complete opposition to all of Aaron Swartz’s beliefs.

After analyzing several digital copies of Aaron Swartz’s eBook, the Institute for Biblio-Immunology is confident they have a tool that removes BooXtrem’s watermarks in EPUB eBooks. Several watermarks were found, including the very visible – Ex Libris images, disclaimer page watermarks, and footer watermarks – and the very hidden, including image metadata, filename watermarks, and timestamp fingerprints.

While the Institute believes this tool can be used to de-BooXtream all currently available ‘social DRM’ed’ eBooks, they do expect the watermarking techniques will be quickly modified. This communique from the Institute of Biblio-Immunology merely provides the background of what BooXtream does, not the prescription for the disease of ‘social DRM’. These techniques can be applied to further social DRM’ed eBooks, which, we think, is what Aaron would have done.