Posts

Showing posts from 2015

Wooden LCD clock make

Image
The obligatory re-housing LCD clock project! Something a bit different for this blog post.  No programming/electronics/hack blog would be complete without the obligatory (and I have to say, much maligned) taking-apart-an-LCD-clock-and-putting-it-into-a-pretty-box project!  So here's mine! I've had an old LCD clock sitting obediently on my project desk for a while now, diligently telling me how late it is and how I should really go to bed soon. Curiosity got the better of  me one afternoon and I took a small screwdriver to the whole thing and ended up with its guts on the desk in front of me.  The LCD screen itself is composed of a glass plate, embedded with the liquid crystal , various polarised filters, and a backing plane of a reflective foil.  Scrapping off the backing foil reveals a beautiful object - a piece of glass with lettering floating ethereally. This clock wasn't going back together in its original form, so my hand was pleasantly forced to assem

Of Bootloaders and Nanos

Image
Restoring a Nano to a default Nano To use a Nano with default bootloader: Select "Arduino Nano" in the Arduino IDE and click "Burn Bootloader" under Tools (I'm using the USBtiny ISP). Alternatively use avrdude: Write ATmegaBOOT_168_atmega328.hex (found in Arduino/hardware/arduino/avr/bootloaders/atmega) with an ISP, i.e. avrdude -p m328p -c usbtiny -e -U flash:w:ATmegaBOOT_168_atmega328.hex Optiboot bootloader with a Nano To use the Optiboot which comes with the Arduino IDE (version 1.6.5) Add this to the boards.txt file in Arduino/hardware/arduino/avr ############################################################## atmega328o.name=[Optiboot] Arduino Duemilanove or Nano w/ ATmega328 atmega328o.upload.tool=avrdude atmega328o.upload.protocol=arduino atmega328o.upload.maximum_size=32256 atmega328o.upload.speed=115200 atmega328o.bootloader.tool=avrdude atmega328o.bootloader.low_fuses=0xff atmega328o.bootloader.high_fuses=0xde atmega328o

Programming Atmega328p chip wirelessly with nRF24L01+ module - Part I

Image
I recently got my hands on a bunch of nRF24L01+ modules.  They're really easy to use and dirt cheap to pick up.  I followed this tutorial , which uses maniacbug's fantastic arduino library.  Although they are fairly ubiquitous as a radio transceiver of choice, I first heard about them on the excellent Julian Ilett's Youtube channel: I'm actually new to Arduino, but have messed about with programming chips and designing electronic devices for a couple of years.  I can see the attraction of Arduino, and I can see it's a great gateway for more fundamental electronics.  I picked up a couple of Arduino nanos (well, cheap Chinese knockoffs - they worked fine, incidentally), plugged them into the radios and installed some transmitting code on one (the joystick TX example in the  tutorial ) and some receiver code on the other - they worked great, out the box first time! Well that was just too easy!  The range was impressive too, at least twenty metres from the bott

Atmega328 as an external EEPROM programmer

Image
Atmega328 as an external EEPROM programmer Need extra memory for an AVR project, but don't want to splash out on a expensive EEPROM chip programmer?  It's easy to build your own! The problem: You need additional EEPROM memory for an AVR project, for example to hold data that wouldn't otherwise fit in the native AVR's EEPROM.  But how to get that data onto the external EEPROM?   The solution: Well... y ou could use an EEPROM programmer, but they can be expensive, and besides, you probably only want to write a few chips and it feels like overkill.   Why not use your AVR to accept data from your computer and then burn it directly onto your EEPROM chip? PC --> AVR communication with USART The easiest way to get your AVR to talk to your PC is to use a USB USART converter.  I picked one up for next to nothing. The one I got was a CP2012 STC.   To use it, hook up the USB TX line to the RX pin on your AVR, and the RX line to TX pin on your AVR.  There are als

Interfacing a (micro)SD card with an Atmega328 microcontroller

Image
Interfacing a microSD card with an Atmega328 microcontroller Hooking up an SD card (or microSD card) to your AVR project will seriously increase the amount of data storage you can access.  I wanted to stream WAV files from an SD card for an audio project I was working on.  I'm not going to delve into FAT16/FAT32 architecture or the SD card SPI interface in this post, but working on the principle that Life's too short to reinvent the wheel, there are libraries available for reading and writing to SD cards with Atmel microcontrollers.  First things first, we need to physically connect our SD card to the controller.  I'm actually using a microSD card to save space on my PCB, but I'm using a microSD card adapter so this will apply to SD cards equally.  Grab a soldering iron, your SD card (/microSD card adapter) and a 7 pin header and solder like so: Tin the header pins and be careful not to melt the plastic and bridge the connections.  Using a putty like "

Hand held PCB drill

Image
I was looking for a way to drill holes in home-made PCB boards.  It seemed that my only option wa investing in a rotary tool (i.e. Dremel) with a drill press.  However there seemed to be many forum discussions where a slight swing of the drill bit during lowering the drill press was causing a misalignment of drilled PCB holes.  Then I came across small 12V motors that had a drill bit attachment. Some have made their own drill presses for this.  Search Ebay or Amazon for "pcb drill press" and you'll be able to pick one up for a few pounds/dollars.  I soldered a small button onto the side of mine and, lo and behold!  A working, hand held PCB drill!  It's easy to find sets with the motor, drill attachment and several drill bits.  I found one with a set of 2 x 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4 and 1.5 mm bits. So how does it fair?  I've hooked it up to a 9V battery and hey presto...: Those are mostly 1.0 mm holes I've drilled there and by my eye they loo