[Vinod] has done a lot of work with microcontrollers, but this is his first try at displaying graphics using composite video. He had a small PAL television on hand, and an ATmega32 which just needs a stable clock source and a few resistors to get things going.
There are a lot of other hacks around that use composite video out with microcontrollers. But this is a ground-up approach which will help you understand the concepts behind these graphics. [Vinod] started by calculating the possible resolution. He needs to hold a frame buffer in memory, and since his chip has just 2 kilobytes of SRAM this will be the limiting factor. He settled on a display area of 128 by 64 pixels. This divides evenly by 8 so he’s not wasting any bits, and it totals 1k, leaving half of the SRAM for use in calculating the shapes which populate the buffer. An interrupt service routine runs ever 64 microseconds to feed data for each line of the display.
With the scanning in place, he moved on to fill the frame buffer. Two functions are used, one which sets a pixel the other clears a pixel. He compares these to using a pencil and an eraser. By calling these functions from his main program he is able to draw lines, boxes, and circles. A bit of creative looping and he’ll have animations as well, but that’s a concept for a different post.
[vinod] wanted to familiarize himself with AVR assembly programming, but wanted to do something a little more ambitious than simply blinking an LED. While the completed build does blink a few LEDs, we love that e decided to implement multitasking on his microcontroller.
The program [vinod] came up with uses round robin scheduling to give one of the seven programmed tasks a little bit of compute time every time a timer is triggered. Although it’s extremely simple compared to “real-life” real-time operating systems like VxWorks, it’s still an impressive achievement.
In the video after the break, [vinod] shows off his task-switching with seven LEDs. The white LED is a PWM task, while the six other LEDs are simple toggling tasks that switch a LED on and off at set intervals independent of each other. This would be hard – if not impossible – to do without some sort of scheduling. Nice work, [vinod].
Continue reading “Putting multitasking on an AVR”
[Vinod Stanur] just finished another hobby project by building a WAV audio player using a microcontroller. He had started development a while back using a PIC microcontroller. But the chip he was using didn’t have enough SRAM to allocate as a playback buffer. When he got his hands on an ATmega32 his mind turned back to the project and he saw it through to the end.
He takes advantage of what he learned on several earlier builds. He’s using a TV remote as input, just like his Snake game did. Storage is provided by an MMC card, a trick he perfected with this voice recorder project. Instead of using a FAT library, he uses his own code to read the linked-list (File Allocation Table) for sector addresses, then he parses the WAV header and processes the file accordingly.
Playback uses two 512 byte buffers. One is feeding the output while the other is being populated from the memory card. When the output buffer is exhausted the two are swapped and the process continues. You’ll find [Vinod’s] demo of the project after the break.
Continue reading “WAV playback with an ATmega32″
We think [FlorianH] did a bang-up job of prototyping his Minima Quadcopter on the cheap. The total bill comes in right around $200 and we’re very happy with the quality of parts as well as the results.
Here you can see the top of the double-sided board which he etched to host all of the components. At each corner there is a power MOSFET which drives the motor. At first glance we thought that the Xbee module was acting as the radio control and processer as well. But on the underside you’ll find an ATmega32 which is responsible for reading the Gyroscope sensor and Accelerometer, processing these signals and driving each MOSFET via PWM lines to provide stability.
You can see some flight tests after the break. [FlorianH] mentions that there is some oscillation in the feedback loop when both the gyro and accelerometer are used. But cut the accelerometer out of the equation and the platform is rock-solid.
This build uses carbon tubes to mount the motors, which we think will be a little more robust than the all-PCB designs are.
Continue reading “DIY quadcopter for around $200″
Check out this setup that [Ruenahcmohr] is using in his air muscle experiments. The orange mesh contains an air bladder that is connected to a hose on the right side. The bladder can be filled, or emptied with two solenoid valves not seen here (but you can get a good look in the video after the break). The muscle attached to chain on the other end and is kept under constant tension by a spring. The chain bends 180 degrees around a gear which is connected to a potentiometer. This gives feedback to the ATmega32 which controlling the whole thing. This way, the slider seen above can be used to control the apparatus.
We don’t know if [Ruenahcmohr] has a use in mind for this setup, but it certainly looks promising! We’ve seen these air muscles used for haptic feedback before, but right now we’re drawing a blank when it comes to ideas. What would you use it for?
Continue reading “Experimenting with an air muscle and sensor feedback”
[SunWind] developed his own version of the Phillips Ambilight system (translated) which he is calling LiveLight. We’ve seen more than a few of these hacks, many of them are based around Arduino, and most use LED strip lighting. [SunWind] is using strip lighting as well, but his design is clean and polished quite a bit more than anything else we’ve seen. In our minds this would be welcomed by even the most discriminating of A/V enthusiasts.
He found just the right size of project box and managed to fit everything in on a nicely milled PCB. The enclosure itself has also been milled to allow the mini USB B connectors for each of the nine RGB LED strips. But he didn’t stop there, the top of the enclosure has labels milled into it to help when hooking everything up.
An ATmega32 addresses the LED strips based on data pushed in from a computer. An on-board FTDI chip adds USB connectivity and [SunWind] used a hack to rewrite the EEPROM on that chip so that it enumerates with the name “LiveLight USB Interface”. A program called Boblight gathers the data from the currently playing video. You can see the final project in the video embedded after the break.
Continue reading “LiveLight is an expertly crafted ambilight clone”
[Oneironaut] is trying out a new GPS module with the prototype seen above. It’s a San Jose Navigation device identified as FV-M8 and sold by Sparkfun for just under a hundred bucks. That’s it hanging off the bottom-right of the breadboard seen above. They’ve packed a lot of power into the small footprint, and made it very easy to control at the same time. Although the device is fully configurable, you can start grabbing serial data from it just by connecting a single data line, 3.3V, and ground.
[Oneironaut] tests it out by streaming the serial data to a character LCD screen, then comparing the output to his handheld Garmin GPS device. You can see him describe his ATmega32-based test platform in the video after the break. We’re used to seeing spy-tech for most of his projects and this will eventually join those ranks. He’s thinking of putting together a magnetic tracking module that plays nicely with Google Earth.
Continue reading “Prototyping with a GPS module”