Tag Archives: Dzl

Video: Hacking quadcopters with Arduino

A Maker by the name of Dzl recently reverse engineered the communication protocol of an inexpensive quadcopter to work with an Atmel-powered Arduino board.

According to the HackADayCrew, Dzl kicked off his hack by cracking open the quadcopter’s accompanying control handset to determine which transceiver it used.

“[He] then found the relevant datasheet and worked out all the pin configuration involved in the SPI communication. Flying data is transmitted as 8 byte packets sent every 20 mS, controlling the throttle, yaw, pitch and roll,” wrote HackADay’s John Marsh.

“[Dzl] took the build a step further, writing an Arduino library (direct Dropbox download link) that should catch you up to speed and allow you to skip straight to the fun part: hacking and experimenting.”

Dzl offers additional quadcopter hack details on his blog. More specifically, he used an Atmel-powered Arduino UNO (ATmega328) to eavesdrop on the communication between the handset and ‘copter. The annotated list of the initialization sequence is as follows:

* Quadcopter activated.
* Handset broadcast a unique network address or ID.
* Quadcopter receives broadcast, acknowledges, starts listening to data from specific ID.
* Transmitting flying data packet every 20 mS.

“Multible Quadcopters can be controlled simultaneously by assigning them different addresses,” Dzl confirmed. “The passing of ID is done on one fixed radio channel and flying data is sent on one of about 12 random radio channels. The quadrotors seem to auto scan the radio channels until they find data.”

Interested in learning more? You can check out Dzl’s official project page here.

Build your own metal detector with an Arduino

A Maker by the name of Dzl (and son) recently built his very own metal detector using an Atmel-based Arduino.

“Most metal detectors use a search coil that act as part of an oscillator circuit. When metal is put in proximity of the search coil both the frequency of the oscillation changes. Many metal detectors uses another more stable oscillator BFO (beat frequency oscillator) to act as a reference for the frequency of the search coil,” Dzl wrote in a blog post.

“Usually the frequency of the BFO is adjusted to exactly match that of the search coil oscillator when no metal is present near this. The signals from these two oscillators are then fed to a (usually analog) circuit that creates an output proportionally to the difference in frequency of the two. This may be either an audible tone and/or some meter reading.”

However, says Dzl, another device that is quite handy at detecting minute frequency changes is a versatile microcontroller (MCU).

“[So] we decided to swap the BFO approach for a microcontroller and came up with [a] simple circuit. The oscillator circuit feeds a 160kHz signal to pin 5 of the Arduino. The Arduino sketch then measures the frequency of this pin very accurately,” Dzl explained.

“When the ‘NULL SW’ button is held this frequency is stored. Any deviation from this frequency is then represented as a series of ‘geiger counter’ clicks on the piezo. The rate of the clicks increases as metal approaches the coil.”

Dzl says he and his son tried a number of different search coils, discovering that approximately 30 turns of wire around a 15cm. plastic bucket worked quite well.

“All we needed then was to tie it all to a discarded Ikea lamp – and hey-presto off to the beach to find treasures. The metal detector has excellent sensitivity and by changing the SENSITIVITY value in the Arduino sketch you are able to tune it for both small and large objects,” he added.

Want to try building your own metal detector with an Arduino? Check out the source code here.