[MakingThingsWork] wanted an accurate way to keep track of the weight of his beehive, so he decided to build himself a data logging electronic scale. First he ripped the strain gauges from an old electronic scale which he then fitted to his home made beehive base. He then went about designing and building the control board which is based about the Attiny 85 (if you hadn’t guessed by the banner). An instrumentation amplifier was used to amplify the signal from the strain gauge, which is then read by the ADC on the Attiny. It looks like he had some trouble getting consistent results from the scale, so to eliminate the error caused by temperature variations he set up a fixed voltage divider for reference. With this setup the scale can produce results at +/- 0.5lb accuracy, sounds just fine for a system that cost less than $50. The V-usb project software has been used to connect the scale to his PC which he uses to collect and graph the data. All in all a very neat project and by the looks of it, some very productive bees.
AVR337 Articles
Virtual Machine For Microcontrollers Lets You Run Python On AVR Chips

[Clifford Wolf] wrote in to let us know about a project he recently completed called EmbedVM. It’s a virtual machine for AVR microcontrollers. The package has a relatively small overhead, taking up about 3kB of program memory. The VM can execute 74,000 instructions per second, and runs asynchronously from the microcontroller. As [Clifford] demonstrates in the videos after the break, this can be handy for preloading commands to prevent slowdown during heavy VM processor loads.
The snippet in the image above is an example program written in the C-like VM code which will play some [Rick Astley] on a speaker. This code can be run from RAM, EEPROM, or even external storage like an SD card. Recently there was a supplemental compiler project that even takes Python code and compiles it into VM byte-code. What a nice abstraction tool for making inexpensive microcontroller-based designs easily programmable for those that have a bit of Python experience.
If you don’t recognize the name, [Clifford Wolf] is also the author of OpenSCAD, a tool that is quite popular with 3D printing.
Continue reading “Virtual Machine For Microcontrollers Lets You Run Python On AVR Chips”
Dev Board From An AVR Programmer

[jethomson] sent in a build he’s been working on that turns an inexpensive AVR programmer into a development board. The build is based on the very affordable USBasp programmer that’s based on an ATmega8. With hundreds of these boards available from China for less than a Hamilton, we’re wondering how soon it will be before we see these boards end up in other projects.
After fiddling with the AVR fuse settings, [jethomson] managed to burn some code to the microcontroller. After that, all that was required to upload software to the programmer is a bit of solder, a push button, and an external programmer. [jethomson] also managed to make this little AVR programmer compatible with the Arduino environment with a small addition to the boards.txt file.
[jethomson] included a few bits of software as an example – he ported the haunted USB cable and adapted the USB business card to print out, “All work and no play makes Jack a dull boy.” Nice work, and we can’t wait to see it in future projects.
Kinect-controlled Delta Robot Has A Magnetic Personality

[Malte] is a loyal Hackaday reader and neurobiology PhD candidate with a keen interest in hobby robotics – definitely our kind of guy! He wrote in to share a project he has been working on in his spare time, a Kinect-controlled delta robot (Google translation).
Deltares, as it is called, is pretty straightforward as far as delta robots are concerned. It uses three servos to actuate the arms, which are controlled by an AVR micro running BASCOM. The AVR gets its coordinate data from his computer via a serial connection after it has been captured by the Kinect. [Malte] opted to use Microsoft’s official SDK for the project, processing the Kinect skeletal data using a small C# application he wrote.
The end result is pretty neat as you can see in the pair of videos below. In the first video, [Malte] uses Deltares as a plotter, drawing a crude face on a piece of paper with a marker. In the second, he commands Deltares with his right hand, using his left to activate the magnetic solenoid to pick up the steel spheres.
It looks pretty cool to us, and we’d love to see what sorts of things he puts together if he ever ends up making robotics his career rather than a hobby.
Continue reading “Kinect-controlled Delta Robot Has A Magnetic Personality”
Noise Generator Ported To Run On Small AVR, Also Arduino Compatible

Feeling a bit left out because he didn’t have a PICAXE on hand, [Rob Miles] decided to port the Luna Mod code so that it would work on an AVR chip. He chose to build his around an ATtiny45, but also mentions that this is Arduino compatible.
This case layout is a bit different from the original Make version, but we like this look just a bit better. It might not satisfy your need for that hipster looking enclosure, but the repurposed macadamia nut box looks seems it was built for this purpose. Take a look as the video after the break to see the final product and hear it spewing newly composed cacophony. [Rob] is sharing the sketch as a dropbox file but we’ve also included our own hosted link after the break in case is stops working.
Continue reading “Noise Generator Ported To Run On Small AVR, Also Arduino Compatible”
AVR Programmer Modelled After The MkII – Uses LUFA

Here’s a new option for building your own AVR programmer. It’s called the MkII Slim and the diminutive size makes it live up to its name. The design is rather spartan, using just three chips; a voltage regulator, a MAX3002 level converter, and an Atmel AT90USB162 as the main microcontroller. This chip has a built-in USB module, foregoing the need for a separate FTDI chip.
The firmware is built on the Lightweight USB Framework for AVRs (LUFA). This is a USB stack implementation originally called MyUSB that was developed by [Dean Camera]. Regular lurkers over at the AVRfreaks forums will recognize [Dean’s] name, or his handle [abcminiuser] as a source for many of the high quality AVR tutorials found there. But we digress.
The programmer offers all the features you’d want in an In-System Programmer. It can easily be reflashed with future updates thanks to the bootloader running on the chip. There’s jumper-selectable power options, and it can program targets running at 3.3V or 5v. The full development package including code and artwork is available for download at the site linked above. For your convenience we’ve embedded the schematic after the break.
Continue reading “AVR Programmer Modelled After The MkII – Uses LUFA”
A Study In AVR Power Saving Techniques

[Scott] found the iCufflinks from Adafruit Industries pretty interesting, but he thought that the stated run time of 24 hours was a bit short. He figured he could improve the product’s power consumption at least a little bit, to improve the overall battery life.
From their schematics, he placed an order for parts and built two identical iCufflink mock-ups side by side – one running their code and one running his. He took baseline current draw measurements, then got busy slimming down the cufflinks’ software. It had been 20 years since he touched assembly, and he has never written it for an AVR, but judging by his work he’s not rusty in the least.
He slowed the ATtiny’s clock down and tweaked a few other settings for a savings of 53μA, but the real improvements came via a fairly simple fix. The original code called for the processor to institute a counting loop to sleep, which he found to be very wasteful. Instead, he chose to put the processor in an idle state, using the chip’s watchdog timer to wake it when it was time to pulse the LED. The power savings from this change alone was a whopping 261μA!
When he was said and done, the changes save about 315μA of current draw, and should allow the cufflinks to run for up to 38 hours without swapping batteries. In [Scott’s] opinion, a nearly 60% improvement in battery life is pretty good for a day’s work, and we’re inclined to agree.
