Mini project for my daughter

Been a while since I used my soldering iron last time. Really enjoyed prototyping simple electronic circuits with my kids tonight.

This was 2nd time this year. First time was in June:

Can continue working on my micro-controller projects now under Linux

I thought it’s impossible, and was so surprised when I tried and it just worked under Debian Sid and Virtual Box with Windows 7 Pro.

Atmel Studio was a very easy install in a VM, and it had no problems finding my USB programmers and devices attached to my host Linux machine. It’s very good news given that my new digital oscilloscope with logic analyzer arrives tomorrow :)

Last weekend’s small DIY project

I really enjoyed this. I know it does not look like much, but I am very happy about this little project: I finally learned how to solder properly and lead-free, and I now understand AVR microcontrollers architecture and specifics. What’s left is to finish power optimization and start periodically add different sequences for LEDs and different reactions to button clicks.

And I also learned about powering small devices and about Joule Thief / step-up regulators, induction, surface-mount and PCB design/ordering (however, these are not used in this project)

Github:
https://github.com/samoylenko/avr_s1

schema

Plans for the weekend – firmware for my OLED business card project

Making another attempt to reactivate my OLED business card project. Due to lack of time and other priorities, I had to stop it for several months.
I think that I’ve find an optimal hardware design and power source. Given limitations of ATtiny85, I started writing firmware in assembly, now I am starting it again in C.

The board on picture was assembled to allow me work at kitchen table while watching my kids :)

At the picture (left to right): Adafruit Monochrome 128×32 I2C OLED graphic display (SSD1306), 9V battery, DYI ATtiny85 dev board, AVRISP mkII programmer

 

Getting “avrdude: initialization failed, rc=-1″ with ATmega328 after pulled it from Arduino?

I’ve spent the entire day solving this issue :) While all ATtiny85 were responsive and happy, both ATmega328 refused to work with avrdude throwing the error below while working perfectly with Arduino.

avrdude_1

The problem was that Arduino uses a 16Mhz external crystal as chip’s clock, and chip is pre-programmed to use it. Just add a 16 Mhz crystal with two 22 pF capacitors as at picture below:

ATmega_crystal

And microcontroller will respond to avrdude:

avrdude_2

As far as I know, microcontrollers can be instructed to use internal clock instead of external crystal, but I am yet to find out how to do this.

In general, while crystal takes extra 2 pins off AVR, it enables microcontroller to run at a better (and more precise) frequency. In my small projects I plan to use ATtiny mostly with internal clock since it only has 8 pins. With ATmega, I probably will use a crystal more often, but I pulled it from Arduino and started all this AVR programming hobby because I wanted as much compact solutions as possible, with no to minimal extra stuff, so I still prefer more pins to a faster clock.