An Achieveing Weekend

Last year was the first time I really got some experience in embedded programming. I’ve subscribed to Hack a Day‘s RSS feeds for the past few years, so a source of ideas and motivation is never lacking. I bought an Arduino to play with a few years ago, but obviously I wanted to get to a point where I didn’t need an Arduino for each project I work on.

Last year I took an Electronic Design course (most frustrating and enjoyable subject I’ve ever taken) in which we were introduced to the Renesas family of microcontrollers. Specifically we used an R8C mounted on a breakout board for ease of use. Through the course we got to play with LCD screens, Serial and I2C communication, communicating with motor drivers and some other useful bits and pieces. We were also taught about registers, interrupts and some other important aspects of design.

The Renesas would then have been the obvious place to start on my own projects, but the chips need a Renesas specific programmer that costs upwards of R1000, so I never took it any further. However, back in 2010 of Hack a Day did a great 4 part tutorial in getting up and running with the Atmel AVR range of microprocessors which I had bookmarked with the intention of one day delving into. The benefit of these is that an ordinary Arduino can be used to program them.

Over the past year or two I’ve also ended up picking up a couple odds and ends which have just been lying around since their acquisition, one of which was a Sure Electronics 24×16 LCD grid. So end of last year I finally get round to ordering some proto board, a few sockets and microcontrollers.

Now several months later I’ve finally got round to putting some stuff together. Conway’s Game of Life has always interested me, with it’s simple rules, it’s fairly straightforward to program. A grid of LEDs seemed like the perfect place to give it a run.

I visited quite a few websites in my search to get some code for this display. The display runs on an HT1632C driver, and somewhere along the line I came across a library to make it work, and some accompanying Arduino code. The library has the comment

Updated for the HT1632C by Nick H

in it, and the Arduino code

By Joel Simon, Based off LED Pong Clock by Nick Hall

I’ll update with links as soon as I figure out where exactly I sourced them. After getting it running nicely on the Arduino I set about adapting the code to run from one of my Atmega168PA microcontrollers that I’d required.

This first required a bunch of work getting avrdude and winavr up and running, all thanks to scszy’s tutorial and references. But after that it was fairly straightforward. I started off by programming my Conway’s game of life, which after a while I got running quite nicely. At the moment there is an option to manually specify a starting grid in code, but I just let it run by randomly generating a field and running from there.

After that was going I hooked up a MCP9701T-E/LT thermistor to an analogue input. The specs aren’t great, and nor is the performance, but I was at least slightly chuffed with my soldering of this SMD component onto my proto-board. I was quite surprised to see how quickly and how varied the readings from this unit are. I still need to get a proper thermometer to do some type of calibrating, but readings change several times a second one and half degrees up and down. This might be due more to voltage supply, but I haven’t investigated much.

I then proceeded with a push button so I can have a bit of input. My intention is to eventually have this with four different screens to choose from. The first one with the time and temperature. I want to see how accurately I can work off one of the built in clocks, as the microcontroller doesn’t have an RTC. I’ve also got a GPS unit lying around which I want to try to connect so as to be able to update the time every now and then.

The second menu will display the day and date. I have a stationary bike and a Polar heart rate monitor unit that I want to give a try as well. I’ll grab a reed switch and a magnet to put on the back wheel of my bike as a second speedometer and try get my RMCM01 Polar OEM which is a SparkFun product (Sparkfun apparently no longer sell the RMCM01 individually, but it can be bought ready to go) I sourced from Netram. These will displayed when active on the third menu. And the fourth menu is my Conway’s Game of Life. And I want to build some kind of housing for it, even if it’s just a nice perspex front.

I’ve done a mockup so far which can be seen in the video below:

I’ll do a new post with source and schematics at a later stage once I have the rest of the thing setup and working nicely. I just posted this now because I haven’t written anything in a while and I felt like it.

I’ve also reaffirmed my knowledge that I get far more work done at night, as most of this was accomplished between 23:00 and 04:00 on Friday and Saturday. I think there’re just less distractions.

Mini Intervalometer

I saw this intervalometer on Hackaday ages ago but never got very far with it. I ordered the PIC with a random RS components order, but without a PIC programmer, the components and the idea just lay around for a while. I dug them up the other day, and managed to locate a PICkit 2 at the university which I borrowed for the night.

How it’s supposed to look

I got the PICkit set up and programmed the chip hoping for the best. Unfortunately I couldn’t get my hands on any surface mount components, but built the kit out of through hole components. Also using two individual diodes (with a 0.5V forward voltage drop) instead of the combined dual Schottky diodes. I also used an 8 pin socket so as to not damage the PIC while soldering. Soldered them all together on a piece of protoboard and voila!

What mine looked like

So although it’s not as small as the surface mount version I’m quite happy. I must admit I was quite stoked when I plugged it in and it worked. It can be slightly finicky, but works well enough. Now I just need to find somewhere interesting I can safely leave my camera for a couple hours.

Wi-fi Hotspot with Samsung Galaxy Ace

My dad recently got an upgrade on his cellphone contract and opted for the Samsung Galaxy Ace. It’s on the lower end of Samsung’s Galaxy range, but running Android and with a very nice touch screen is fully packed with useful features. One thing which has become fairly standard on new smart phones is the ability to share its 3G/HSDPA data connection with nearby devices.

thegadgetsblog.com

I hadn’t thought much about it until my dad asked me if he was still going to be able to tether the phone to his laptop to connect while on holiday. A Google search didn’t return much help, but I dug through his menu and found it fairly easily. To share the phone’s data connection do the following.

  • From the home screen go to menu then settings
  • Open wireless and networks
  • open tethering and portable hotspot
  • select the mobile ap to activate the hotspot

by default it sets up an unsecured AP, with the high costs of data here it’s best to activate security, this can be done from the current menu by further going to

  • configure mobile ap

here you can set the ssid, security and password for the AP.

Fairly straightforward and works nicely.