Saturday 26 April 2014

What's the time Mr Wolf?

So for the last couple of months the bit of bench time I've been able to get has all been spent on the edx course I mentioned in my previous post.  There was quite a bit of content to get through before the course wrapped up, so to get it done in time I wasn't letting myself play with any other projects or bits.  I was however ordering bits and pieces here and there which have slowly started to arrive.  Now that the course is done I've got time to play with what's arrived!

Something I should point out is that while all (or at least some) of the individual bits I've ordered will hopefully end up working together, one of the most common ways to test them individually seems to be with an Arduino.  I have almost no experience with Arduino's so it's a good chance to get to do a little more Arduino too!

One of the things I ordered was a Tiny RTC v1.1  


The DS18B20 you see in the picture above doesn't come with the kit - I ordered that separately.  The TinyRTC module has a spot to solder this guy in (as mentioned on the wiki page for the module) with the required pull up resistor already onboard.  All that's needed is to connect to the DS pin to read data from the sensor.  I soldered the headers and DS18B20 on and connected it to my Arduino Uno as shown on the wiki page:



There were two libraries I had to add for the TinyRTC sketch on the wiki to work (DS1307 & OneWire).  I changed the sketch to set the correct time (it shipped without the battery installed as can be seen above) and uploaded the sketch.  The time set correctly and the serial console showed the output of the RTC incrementing correctly.

Then I went looking at what was needed to read the temperature from the DS18B20.  This page has all the detail needed.  I had to add another library (DallasTemperature). I then restarted the IDE and added in code to the sketch to read the data from the DS pin to get the current temperature. I now had the temperature also displaying in the serial console.  I tidied the sketch up a bit and also tidied up the output to the serial console:



The last thing I wanted to try while I had this guy plugged in was the Saleae Logic Analyser I also bought over the last couple of months.  The Arduino is using I2C to talk to the the RTC module, so I connected the two required pins to the logic and plugged the logic into my Mac.  I opened the software, added an I2C analyser with the appropriate pins and recorded a sample:


Pretty straight forward!

I've got a few more bits to connect up and test, and a few more bits still on their way.  I've got a few ideas of things I would like to build, time to flesh a couple of them out.  Cool beans.

edx UT.6.01.x

So for the last couple of months now I have been taking the edx course UT.6.01x: Embedded Systems.  Like all edx courses it's delivered 100% online.  The course does a great job of teaching the fundamentals of embedded design, and is built around a Texas Instruments Launchpad.  If you haven't used one of the TI Launchpad's before I'd highly recommend taking a squiz.  They're super cheap for what they are and after taking the UT course I feel I've got a somewhat ok understanding now of the processor used for the course.  Setting registers, performing I/O - it's all covered.

All of the labs are hands on.  They can be completed in simulation using just the free (Trial Licence) Keil IDE software, or can make use of the TI launchpad and a few common components.  The work the UT guys did to develop the grader plugin for both simulation grading in the software debugger as well as debugging using the actual TI Launchpad was awesome!  So even though the course is an online only offering, you can still do all of the hands on labs and get a grade based on how well your solution performs.

Having just completed the course, I throughly enjoyed this one - just like the last couple of edx courses I've taken.  If you're looking for a (free) way to learn some stuff in a bit more of a structured format take a look at edx (and maybe this course).

Nixie Clock!

I've wanted a nixie clock for a long time.  A good mate and I talked about doing it over 10 years ago now - and he ordered some IN14 nix...