Since just about everyone who would be interested in electronics has a decent cellphone now, there’s an idea that we don’t need USB or weird serial adapters anymore. Bluetooth LE is good enough for short-range communication, and there are a ton of boards and Kickstarter projects out there that are ready to fill the need.
[Michah] has built what is probably the lowest-spec and cheapest BTLE board we’ve ever seen. It’s really just an ATTiny85 – a favorite of the crowd that’s just slightly above Arduino level – and an HM-10 Bluetooth 4.0 Low Energy module.
This board was developed as a means to connect sensors for a vintage motorcycle to an iOS device for display and data logging. A small, cheap board was needed that could be powered by a LiPo battery, and [Micah] created a board that fit his needs perfectly.
Four of the six IO pins on the ‘Tiny85 are broken out on a pin header; two are used to communicate with the BTLE module. It’s simple, fairly cheap, and can be powered by a battery. Exactly what you need if you want a wireless sensor board. All the files can be found in the Git repo and everything is open source. Not bad.
Class D amps are simple – just take an input, and use that to modulate a square wave with PWM. Send this PWM signal to a MOSFET or something, and you have the simplest class D amp in existence. They’re so simple, you can buy a class D amp chip for $3, but [George] thought that would be too easy. Instead, he built his own with an ATTiny and an H-bridge motor driver. No surprise, it works, but what’s interesting is what effect the code on the ATtiny can have on the quality of the audio coming out of the speaker.
The microcontroller chosen for this project was the ATtiny 461, a part we don’t see much, but still exactly what you’d expect from an ATtiny. The heavy lifting part of this build is an L298 chip found on eBay for a few dollars. This dual H-bridge is usually used for driving motors, but [George] found a home for it in the power section of an amplifier.
The ATtiny is clocked at 16 MHz, making the ADC clock run at 1 MHz. A 10-bit precision conversion takes place, and this value sets the PWM duty cycle. Timer1 in the chip is set up to run at 32 MHz, and by counting this timer up to 1023 gives this amp its PWM cycle speed of 31.25 kHz. That’s right in the neighborhood of what a class D amp should run at, and the code is only about 30 lines. It can’t get simpler than that.
[George] put up a video of this amp in operation, and despite not following the standard design of a Class D amp, it sounds pretty good. You can see that video below.
Continue reading “Class D Amp with an H-Bridge”
[ekaggrat] designed a 3d-printed clock that’s fairly simple to make and looks awesome. The clock features a series of 3d-printed gears, all driven by a single stepper motor that [ekaggrat] found in surplus.
The clock’s controller is based around an ATtiny2313 programmed with the Arduino IDE. The ATtiny controls a Darlington driver IC which is used to run the stepper motor. The ATtiny drives the stepper motor forward every minute, which moves both the hour and minute hands through the 3d-printed gears. The hour and minute are indicated by two orange posts inside the large gears.
[ekaggrat] etched his own PCB for the microcontroller and stepper driver, making the build nice and compact. If you want to build your own, [ekaggrat] posted all of his design files on GitHub. All you need is a PCB (or breadboard), a few components, and a bit of time on a 3D printer to make your own clock.
[Tim] discovered a simple way to measure the length of WS2812 addressable LED strips from a microcontroller. This is great for any project that can have an arbitrary length of addressable LED strip attached to it.
The simplest (and perhaps most reliable) way to measure strip length is by feeding the serial output pin of the end of the strip back to the microcontroller. The microcontroller keeps clocking bits into the strip until it receives data from the end of the strip. [Tim] didn’t want to run an additional signal to the end of his strip, so he found another solution.
[Tim] used the ADC of his microcontroller (an ATtiny) to measure supply voltage droop as LEDs are turned on. Each LED draws around 60mA at full brightness, so [Tim] sequentially turned on each LED and watched the ADC for slight voltage changes. If the voltage changed, there must be an LED at that address. [Tim] does note that this method is extremely dependent on the power supply used and only works on short strips. Check out his blog post for more details.
The typical way of doing a low battery detector is throwing a comparator in the circuit, setting it to measure a certain threshold voltage, and sending that signal off to a microcontroller or other circuit to notify someone the battery is going dead. [Josh] has a simpler way using an 8-bit AVR and zero other parts.
The chip [Josh] is using is the ATtiny84. The ADC in this chip is usually used to measure an unknown voltage against a reference voltage. The trick [Josh] is using is to do this in reverse: The internal 1.1 Volt reference voltage is measured against an unknown scale, namely the input voltage.
The value provided by the ADC on the chip will always be Vin times 1024 over the reference voltage. Since Vin will be 1.1 V in this case, the ADC value is known, it’s only a matter of doing some 6th grade algebra to determine the value of the input voltage.
[Josh] put together a small demonstration where the chip blinks out the number of volts its receiving from a bench power supply. By blinking a LED, it can blink out the current value of VCC as integers, but by using this technique you should be able to get a fairly fine-grained reading of what VCC actually is. Video below.
Continue reading “Adding a Battery Gauge to a Project With Zero Parts”
If you want to program an AVR chip as inexpensively as possible, then [Ian’s] solution might just be for you. He built an AVR programmer using only four components. This design is based on the vusbtiny AVR programmer design, with a few components left out.
[Ian’s] design leaves out two of the resistors and two diodes, leaving just four components. These include a 1.5k resistor, a small capacitor, a USB connector, a six pin header, and an ATtiny45. He admits that this may not be exactly up to USB spec, but it does work.
This is one of those projects that is really an exercise in “will it work?” more than anything else. The fact that you need to first program an AVR chip means that this wouldn’t be useful in a pinch, because you would already have to have a working programmer. Nonetheless, it’s always fun to see what can be done with as little as possible.
A few days ago we saw what would have been a killer Kickstarter a few years ago. It was the smallest conceivable ATtiny85 microcontroller board, with resistors, diodes, a USB connector, and eight pins for plugging into a breadboard. It’s a shame this design wasn’t around for the great Arduino Minification of Kickstarter in late 2011; it would have easily netted a few hundred thousand dollars, a TED talk, and a TechCrunch biopic.
[AtomSoftTech] has thrown his gauntlet down and created an even smaller ‘tiny85 board. it measures 0.4in by 0.3in, including the passives, reset switch, and USB connector. To put that in perspective, the PDIP package of the ‘tiny85 measures 0.4 x 0.4. How is [Atom] getting away with this? Cheating, splitting the circuit onto two stacked boards, or knowing the right components, depending on how you look at it.
[Atom] is using a few interesting components in this build. The USB connector is a surface mount vertical part, making the USB cord stick out the top of this uC board. The reset button is extremely small as well, sticking out of the interior layer of the PCB sandwich.
[AtomSoft] has the project up on OSH Park ($1.55 for three. How cool is that?), and we assume he’ll be selling the official World’s Smallest Arduino-compatible board at Tindie in time.