A metal detector used to be an entirely analogue instrument, an oscillator whose frequency changed with the inductance of its sense coil when a piece of metal approached. [Łukasz Podkalicki] shows us a more sophisticated machine, but with judicious use of an ATtiny 13 it is not a complex one.
A pulsed induction metal detector induces a current spike in its search coil, and times the decay of the resulting oscillation. The coil is part of a resonant circuit with a capacitor, and any metal in its field will change its resonant frequency. In [Łukasz]’s design the ATtiny13 fires a pulse at his coil using a MOSFET, and the voltages at the coil are sensed by an analogue pin through an appropriate clamp circuit. His software does the timing, and sounds a buzzer upon metal detection. It’s a deliciously simple implementation, and while as he shows us in the video below the break its relatively small coil is more suited to detecting coins or wires behind the drywall than locating lost hoards, there is probably ample scope for further experimentation.
This isn’t the first project from [Łukasz] that has found its way into these pages, his history with the ATtiny13 goes back a few years.
Continue reading “An ATtiny Metal Detector”
Small microcontrollers can pack quite a punch. With the right code optimizations and proper use of the available limited memory, even small microcontrollers can do things they were never intended to. Even within the realm of intended use, however, there are still lots of impressive uses for these tiny cheap processors like [Lukasz]’s audio amplifier which uses one of the smallest ATtiny packages around in the video embedded below.
Since the ATtiny is small, the amplifier is only capable of 8-bit resolution but thanks to internal clock settings and the fast PWM mode he can get a sampling rate of 37.5 kHz. Most commercial amplifiers shoot for 42 kHz or higher, so this is actually quite close for the limited hardware. The fact that it is a class D amplifier also helps, since it relies on switching and filtering to achieve amplification. This allows the amplifier to have a greater efficiency than an analog amplifier, with less need for heat sinks or oversized components.
All of the code that [Lukasz] used is available on the project site if you’ve ever been curious about switching amplifiers. He built this more as a curiosity in order to see what kind of quality he could get out of such a small microcontroller. It sounds pretty good to us too! If you’re more into analog amplifiers, though, we have you covered there as well.
Continue reading “Tiny Amplifier With ATtiny”
Sometimes the best projects are the simple, quick hits. Easily designed, fast to build, and bonus points for working right the first time. Such projects very often lead to bigger and better things, which appears to be where this low-power temperature beacon is heading.
In the world of ham radio, beacon stations are transmitters that generally operate unattended from a known location, usually at limited power (QRP). Intended for use by other hams to determine propagation conditions, most beacons just transmit the operator’s call sign, sometimes at varying power levels. Any ham that can receive the signal will know there’s a propagation path between the beacon and the receiver, which helps in making contacts. The beacon that [Dave Richards (AA7EE)] built is not a ham beacon, at least not yet; operating at 13.56 MHz, it takes advantage of FCC Part 15 regulations regarding low-power transmissions rather than the Part 97 rules for amateur radio. The circuit is very simple — a one-transistor Colpitts oscillator with no power amplifier, and thus very limited range. But as an added twist, the oscillator is keyed by an ATtiny13 hooked to an LM335 temperature sensor, sending out the Celsius and Fahrenheit temperature in Morse every 30 seconds or so. The circuit is executed in Manhattan style, which looks great and leaves plenty of room for expansion. [Dave] mentions adding a power amp and a low-pass filter to get rid of harmonics and make it legal in the ham bands.
Beacons are just one of the ways for hams to get on the air without talking. Another fun way to analyze propagation is WSPR, which is little like an IoT beacon.
Continue reading “Temperature Sensor and Simple Oscillator Make a Value-Added HF Beacon”
Seeing the popularity of the TS-100 soldering iron, GitHub user [ole00] found himself desirous of a few of its features, but was put off by its lack of a power supply. What is a hacker to do? Find a cheaper option, and hack it into awesomeness.
[ole00] stumbled across the inexpensive ZD-20U and — despite a handful (sorry!) of issues — saw potential: it’s compact, lightweight, and powered via a USB power cable. Wanting to use as much of the ZD-20U’s original board as possible, the modifications were restricted to a few trace cuts and component swaps. The major change was swapping out the 555 timer IC controlling the iron with am ATtiny13a MCU to give it a bit more control.
Continue reading “Upgrading A USB Soldering Iron!”
How much game can you get out of a chip with only 1 kB of flash memory and (five or) six free GPIOs? Well, you can get it to play the classic memory game, Simon. [Vojtak] is submitting this project for the 1 kB Challenge, but it looks like it’s already been used to teach simple microcontrollering to teenagers as well, so the code is actually straightforward to read, but full of nice features.
Neat tricks include sharing button-press sensing and LED driving on the same pin, which was necessary to make everything work on such a small chip. A simple linear-congruential pseudorandom sequence provides the variation, and it’s seeded by slow-clock/fast-clock timing jitter, so you’re probably not going to see the same sequence twice. (It’s not the best random number generator ever, but it’ll do.) If that weren’t enough, high scores (and the random seed for the game) are saved to EEPROM so that you can brag to your friends or re-live your previous moments of glory.
The board is easily solderable together as well. This is a fantastic beginner project, with details in the code that everyone can learn from. It’s a great game, and a great demonstration of what you can do with a dollar’s worth of parts and 1 kB of code.
Continue reading “Tiny Game of Simon on an ATtiny13”
When you take a microcontroller class in university, one of the early labs they have you drudge through on your way to, promised, mastery over all things embedded, is a tiny music generator.
It’s a more challenging lab than one would expect. It takes understanding the clock of the microcontroller and its sometimes temperamental nature. It takes a clear mental picture of interrupts, and is likely one of the first experiences a burgeoning designer will have worrying about the execution time of one of their loops. Also tables, data structures, and more. It even requires them to go out of their comfort zone a learn about an unrelated field, a challenge often faced in practicing engineering.
Luckily [Łukasz Podkalicki] has done a great job of documenting the adventure. He’s got everything from the schematic and code to the PWM traces on the oscilloscope.
It’s also worth mentioning that he’s got a few other really nice tutorials for the ATtiny13 microcontroller on his blog. A tiny party light generator and a IR receiver among them.
When [b.kainka] set out to make the world’s simplest RF detector, he probably didn’t realize it would be as easy as it was. Consisting of only a handful of components and thirty eight lines of code, he was able to make an RF detector that works reasonably well.
The microcontroller running the code is an ATtiny13 on a Sparrow board. He’s using an everyday LED as a detector diode and an internal pull-up resistor in the ATtiny13 for the bias voltage. The antenna runs off the LED’s anode. To make it sensitive enough, he switches on the pull-up resistor for a tiny fraction of time. Because an LED can act like a small capacitor, this charges it to a few volts. He then switches the pullup off, and the voltage across the LED will start to discharge. If there is an RF signal present, the discharge voltage will be less than the discharge voltage with no signal present. Neat stuff.
Be sure to check out his Hackaday.io page linked at the top for full source, schematics and some videos demonstrating his project.
Continue reading “Using an LED as a Simple RF Detector”