[CNLohr] has made a habit of using ATtiny microcontrollers for everything, and one of his most popular projects is using an ATTiny85 to generate NTSC video. With a $2 microcontroller and eight pins, [CNLohr] can put text and simple graphics on any TV. He’s back at it again, only this time the microcontroller isn’t plugged into the TV.
The ATtiny in this project is overclocked to 30MHz or so using the on-chip PLL. That, plus a few wires of sufficient length means this chip can generate and broadcast NTSC video.
[CNLohr] mentions that it should be possible to use this board to transmit closed captioning directly to a TV. If you’re looking for the simplest way to display text on a monitor with an AVR, there ‘ya go: a microcontroller and two wires. He’s unable to actually test this, as he lost the remote for his tiny TV from the turn of the millennium. Because there’s no way for [CNLohr] to enable closed captioning on his TV, he can’t build the obvious application for this circuit – a closed caption Twitter bot. That doesn’t mean you can’t.
Continue reading “ATtiny85 Does Over The Air NTSC”
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.