Archive for the ‘General’ Category

Knowledge Updates

14 October, 2007

Recently I’ve moved into University. I’m doing a course in Electronic Engineering, and I hope to gain a masters at the end of it.

So far I’m in my 5th week (4rd week of teaching) and I’m finding it very different, but also very interesting. The day is split up into hour blocks, with the first 50 minutes for lectures, and the remaining 10 minutes so that you can rush to the next thing on the timetable. I get 6 hours a week in laboratories messing around with components, and then the rest is theory, and there is quite a bit of that, with me spending about 26 hours a week working. There is on top of that exercises and prep work to be done outside of lectures and labs. That makes it quite intensive as courses go.

I’m living in halls on campus, however there are only 7 people on my floor, 3 girls and 3 other boys. As our floor is none too spacious we have gotten to know each other quite well and enjoy ourselves. I’m a bit new to actually living away from home so things are very different for me, but I seem to be managing.

All this change in scenery has not slowed my electronics. Today I received my latest order from Rapid. This consisted of about 300+ 0.1µF capacitors, 50×2 header pins, a 35A 600V bridge rectifier and an AVR ISP MKII. I bought the 0.1µF capacitors because they are rather ubiquitous in electronics as de-coupling capacitors, they are also used in the Arduino Diecimila, but more about that later. The 50×2 header pins are for in circuit programmers, to go along with the AVR ISP MKII for the new AVR projects that I’m planning. However the 35A 600V bridge rectifier is for an older project, I wanted to see if it could be practically be used in the intended application, or whether it would just be destroyed, unfortunately the intended application is a secret for the moment. The AVR ISP MKII is, unsurprisingly, for programming AVR projects. I also wanted to get it for burning Arduino boot loaders.

Recently a new Arduino board, the Arduino Diecimila has been released. This board is an updated version of the Arduino NG, which I own. It features a couple of new features, most notably a 3V3 out and an auto reset function. With the NG you needed to press reset to load a new program onto it, and it took 10 seconds to initialize the program when power was turned on, with the Diecimila this is not necessary and it boots up much faster. Normally I’d need to buy a new batch of Arduino Diecimila ATMega168s and boards, but by making some small alterations to the boards, detailed here or here. I went and made the modification to my Arduino NG board as you can see here:

An Arduino NG board with a 0.1µF capacitor soldered between 2 test points. This provides functionality similar to an Arduino Diecimila.

I also needed to upload a new boot loader onto the ATMega168 in order to take full advantage of the 0.1µF capacitor. To do this I needed to connect up the AVR ISP MKII that I also received today. This fitted onto the 2×3 pin header at the rear of the Arduino NG.

The Arduino is connected to the AVR ISP MKII which is burning a modified NG/Diecimila boot loader from Lady Ada.

Once it was all connected I need to make a few modifications to the boot loader. I did this using Lady Ada’s instructions here, this ended up looking like this:

A screen shot of the AVR Studio 4 screen where I upload the boot loader onto the Arduino.

This was just after uploading the new boot loader to the Arduino NG. I found that this worked perfectly and I shall be doing the same to the rest of the Arduino hardware that I own. I’m also now aiming to start working more with Arduino.

Now with these improvements to my base Arduino I took another look at my accelerometer project, I’m aiming to get the code finished, all be it in a rough-ish form by the end of the week. Once I’ve done that I’ll be posting here about the hardware changed, aims and the code.


Arduino Joy Part 2

5 October, 2007

Previously I had got both my Arduino and the accelerometer shield working, with it returning values of “x:453 y:450 z:395.” But I had no idea of what they meant. After doing a little detective work on the data sheet I figured that around 450 meant 0g, that is to say, it was not experiencing any gravity in those planes. This then meant that around 395 meant it was experiencing +/- 1g as I was unsure of the intended orientation of the sensor. After rechecking the data sheet it seemed the chip was designed to be facing down, this would mean that around 395 meant -1g. Doing some rough maths (450 – 390 = 60) I guessed that a change of 1g was equivalent to 60. This would mean that +1g would be about 510. I turned the Arduino module and the shield over and lo and behold I got a value of about 510 in the Z axis. What remains is to turn this int value into a float value of how many much g the board is experiencing.

I also very recently received a Babe bones Arduino Breadboard PCB and soldered it up, and this is what I received.

This is a shot of the parts that make up the Bare Bones Arduino before they're soldered together.

And a closer look at the top of the unpopulated PCB:

A view of the top of the Bare Bones Arduino PCB.

I then preceded to start soldering it up, starting with the surface mount inductor, then the continued with the smallest components, and ending with the largest. This allows me to rest it on the work surface as I solder, greatly easing construction. Below I have a picture of the Bare Bones Arduino board fully soldered up. I have to say i find it to be a great kit which is very simple to understand and then solder together. I only now need to figure out a way of getting a USB->TTL cable.

A shot of the completed Bare Bones Arduino.

I found it fairly simple if not rather tight to fit it into my mini-breadboard but it fitted and seems to work perfectly. I’ll post again later with some news of how it’s worked for me.

One other thing I’ve been keeping an eye on is, again, at uHobby, where Mr Fowler has now finished development of a Signal Generator that is designed to fit on the header pins attached to the Bare Bones Arduino. You can see his post here and his earlier post on the Signal Generators development here. One thing that is touched upon often is the feeling that comes from ordered PCB’s arriving, begin soldered up, and then working! I, as yet, have yet to order PCB parts, but I have made my own, and I’ve found it to be very relaxing.

Arduino Joy

9 September, 2007

Now that I’ve got my Arduino module working well again I decided to get started on an old project of mine.

Ages ago I requested some samples of a 3 axis accelerometer chip from ST Microelectronics. The chip was a LIS2L02AS4, and I got sent 3 of them. I was quite awed at the fact that they managed to get a 3 axis accelerometer in such a neat package. However I received a SOP24 package, now as SMDs come, it is quite a large device with a large pin spacing.

In order to fit it into the Arduino I’d need to at least build a breakout board so I could put it into a breadboard and then use jumpers to connect this to the Arduino pins. And as the device runs from a 3V3 source it would make the most sense to include that on the breakout board. I figured that would be too complicated as the board grew to be rather large. One of the key features of the Arduino is the sockets arranged around the outside edge of the board. These allow PCBs called Shields to be inserted onto of the Arduino board and then function like a whole product. So it was set, I would make it into a board. I borrowed the Arduino NG (that’s my version) PCB Shield layout in Eagle format from here. However I made a few changes, I wasn’t using the IO8-IO13, GND and AREF pins so I made the board as small as I could so as to save PCB.

This is what I ended up with this:

Accelerometer shield for an Arduino NG

So far I’ve gone through testing the sub assemblies. The 3V3 regulator outputs around 4V, which is not ideal, but the LIS2L02AS4 hasn’t released the magic smoke yet, and doesn’t seem like it will. The RGB LED is connected up to 3 of the Arduino’s (with an ATMega 168) PWM pins. This allows me to create all colours of the rainbow. I’ve JUST finished writing the code that fades it through all colours of the rainbow. However I want to streamline it some more before I post it up onto the internet.

One common problem that kept cropping up was that as the colour got very bright, it would flash. I finally figured this has happening because the PWM values were going above 255, which causes then to just turn off. So the RGB would get very bright with one colour, then that colour would just turn off, and then it would come back as being very bright and then it would finally fade away. I solved this problem by constraining the colour variables to 250.

Another problem lay with the switch I included. I simply wanted a normally high switch that would go low when pressed. Now I figured the ATMega168’s own internal pull-up resistors were being used so I wouldn’t need to include my own. I was not correct. Which meant that when the switch was pressed the output would just float. This meant the Arduino could not see it. I solved this by simply adding a 4k7 resistor in between the IO2 and 3V3+, however I’m yet to test this.

One of the first things I tested however was the accelerometer outputs as this was the most important part of the project and I was wary of my SMD soldering. I wrote enough code to simply read the analog inputs, dump the values into variables, and then print the variables as serial data which I could pick up on a serial terminal, like the one build into the Arduino IDE. This was fairly easy and I managed to get the values back, these were “x:453 y:450 z:395.” Unfortunately I don’t quite know how these values relate to each other, and how they are scaled, however they do change as I move the board around. This suggests that the accelerometer does indeed work. I also have the “FS” pin on the LIS2L02AS4 connected to I4 I can set whether the LIS2L02AS4 will read values up to 6g or just 2g, but again, I’ve not tested this yet.

The remaining tasks seem to be essentially figure out how the raw values can be converted to quantities of g and testing the PTM switches inputs.

Aside from the accelerometer shield I’ve also found an interesting article on the Arduino: Blog, there seems to be a way to make the Arduino NG board reset automatically when you upload a program to it here. It involves soldering a o.1uF capacitor between the bottom 2 solder points near diode and the ATMega168, I’m intending on trying this out, the moment I actually have some 0.1uF capacitors.

Finally, I recived 2 packages through the post recently. One contained “The Art of Electronics – 2nd Revision” by Horowitz and Hill from Amazon. The other was a sample pack from Microchip, it contained 3 ENC28J60s. This is an Ethernet to SPI chip, I’m looking forward to experimenting with it.

Arduino Woe

29 August, 2007

Lately my Arduino’s been giving me terrible problems, it would take absolutely AGES to start up, and then once it did, the moment I clicked on the “Tools” menu it would freeze for about 10 minutes before the menu would pop up. Not good. anyway, after a long time of Google searching and then giving up and then resuming my searching for a solution I recently came upon a post in the Arduino forums here which had the answer. It seems that by having a Bluetooth module attached to my computer (for Salling Clicker, a GREAT piece of software) the Arduino IDE was constantly searching through the COM ports for an Arduino BT or one of the COM ports, a Bluetooth one most likely, was giving it something unexpected.

Happily I just had to disable my Bluetooth adapter and suddenly it all worked. So to try I tested the following piece of code:

Test of interrupts and clock
(CC) 2007 TheFallenIndustries
Complies to around 2032 kilobytes and needs an ATMega168

#include <FrequencyTimer2.h>

unsigned long freq = 667; // f = 1/T so 1.5kHz is about 667uSec
int val = 0;
int analogPin = 5;
int pin = 13;
int capdump = 7;

void setup()
pinMode(11,OUTPUT); // clock is on io pin 11
pinMode(7,OUTPUT); // capacitor dump
pinMode(2,INPUT); // the interrupt input
attachInterrupt(0, fire, RISING); // 0 is pin2, 1 is pin3

void loop()
val = analogRead(analogPin);
if(val >= 1000) // Capacitor Charged
FrequencyTimer2::disable(); // stop charging
else // Capacitor Discharged
FrequencyTimer2::enable(); // start charging

void fire()
if(val >= 1000)

This seemed to work fine, so I’m expecting a flurry of Arduino experimenting soon. Hopefully I’ll get some LCD displays running in both 8 bit and 4 bit mode.

Another blog I’ve come across recently is It would seem that should you link to this guy’s site, or write an article about hobby electronics, he will send you a kit or a PCB for free. In the past it has been LCD displays but recently it has all been Arduino themed. I found a particular article that was very interesting as I’ve been tryign to convert my La Fonera’s into embedded device servers. However some of the articles are not as complicated, for example this about sorting through large “lucky bags” of components.

The Trouble With Things

22 August, 2007

It’s been quite a bit of time since I last updated this, but here I am again.

Lately I’ve decided to simplify my life. After all only once I am organized and regulated can I then allow spontaneity. So in order to do that I’ve gone through all the things I’ve wanted to do, planing to do, and doing, and written a large list. Going through this list I’ve noticed a lot of projects that I no longer have any interest in, namely using PICAXE chips. I’ve moved on to Arduino and the more complex opportunities it provides. I’ve also been able to cull some travel plans that simply couldn’t completed because of changing commitments, and, more importantly, a lack of money! Also listing these tasks has made it a lot easier to see what things can be done quickly and simply (throw out old war gaming stuff) and what will take more time ( control an Arduino through a La Fonera with Open WRT using the SCL, SDA, GND lines). Definitely worth the time spent on writing it. And as I keep the list as a notepad file on my 2Gb USB Memory stick, I can easily update it when I think of a new, or remember an old, project.

Another way of simplifying things is to reduce things, in my case, throw out anything I’m not using, or planning to use in the immediate future. As a result I’ve got rid of most of my old PC , modeling and war gaming magazines, freeing up 2 shelves. I’ve also sorted through my books, removing those that I don’t read anymore and consigning them to a charity shop. I’ve also thrown out all the junk I’ve collected with the hope of being able to fix it or make something from it.

There is another reason for this simplification as well. On the 15/16th of August I shall be moving. This is when I move into my new halls of residence when I start university. I will be moving into a smaller room, so to help with the move, and to make it as pain free as possible I want to have to move as little stuff as possible. To save on money I’ll be moving out of my room during the holidays, I’m only there for the semesters, so having less stuff to move will definately be a bonus. This won’t be too much of a hassle as I’m going to a local university, it’s only about an hour away.

One project I’m tryign to finish off at the moment is to get Linux onto my laptop, a R1F-K008e. However this seems to fail a lot. The main sticking point is, I can’t connect to WPA WiFi networks. This is REALLY annoying because I bought to laptop specifically to be mobile, and I’d need to access more secure, therefore more popular, WPA networks. At home I connect to the internet through a WPA WiFi network, but with Linux I can’t, I’ve tried Ubuntu 6.06 and 7.04 and Xubuntu 6.10 and 7.04. But the included “just works” Network mangers, quite simply, don’t. So I need to download something, but I can’t, because I cannot connect to the internet. D’oh!! However Windows does just work, strange that… Another problem is the tablet, the R1F is a tablet PC, but Tablets have very flaky support, but I do remember reading how someone’s managed to get their tablet working in Ubuntu 7.04 which has prompted me to try just a bit more before consigning Linux as a whole to the “it’s a was of time” bin.

My other foray into the land of Linux was getting DD-WRT on to a pair of La Foneras. I’ve managed it with one, which had the earlier, easily crackable, firmware but the second is proving difficult as it has the later 1.7.2 firmware, which is a lot harder to crack. Once I’ve done that I’m hoping to turn it into a simple wireless embedded server which can connect to an Arduino.

A Timely Reminder

16 February, 2007

Been a bit of time since I last did this, but hey, thats the way things are. I’ve been busy. I left Costa to work for a small IT company based in Windsor for about £1000 a month, pretty damn sweet I think you’ll agree, but more about that later. I’ve also got some ambitious, but achievable, I hope, plans to go abroad in my Gap Year, not just once but twice. I also have some new projects that I’m planning, while some of the old ones still haven’t be completed.

I work in the software company as a “Support Analyst” doesn’t mean much, essentially I’m part of the 4 strong help desk. I have no advanced qualifications aside from my GCSEs and A Levels, none of which are IT based. I’m very lucky to have this job, because most people my age would be earning around £5.35 an hour, I get £6.70. How did I manage that you ask? Well I join a scheme called Year in Industry and what they do is they market you out as an eager helper to engineering and software companies. After all, the company gets an eager 18 year old willing to learn and they can pay him, what he thinks is a lucrative amount, but to them is peanuts. After all how much would an adult at a help desk earn? about £21k, I earn £12k, it’s very worth it for them. Another advantage is that I could want to come back after uni to join the company, which is great, for me, and for them. It’s a pretty sweet deal. So here I am, learning MySQL, and C# and getting cool free stuff like “broken” 12 port network hubs.

As for traveling, the idea of funding these trips got a whole lot easier. What with £870 a month (post tax) to save/waste/spend. My rather extravagent plans to spend a month in Japan and a Month in California have been cut somewhat drastically. I shall now just be planning to go to California for 2 weeks. However I’m planning to go and visit The Gathering with s25 in April. Luckily my line manager was a native of California before moving to the UK, so I’ve asked her for a list of nice places to see, and I got a whole list of places to go, and sights to see. I’m hoping to drop by at the Maker Faire and see a few other cool geeky sights.

Unfortunately I can be rather hopeless I have many projects that just happen to fall by the way side in my desire to do something new. This I find VERY annoying. I’ve barely got started with the Arduino module, although I have been dissecting some code. Nor am I planning to really incorporate it into any of my projects soon. Nor have I even tried to interface my IR Range finder that I spent so long looking for. This is most disappointing, although I have a feeling it’s broken anyway, I left it on a battery, and it began to short out. I’m not sure how, or why, but it was extremely hot. I’m yet to finish any of my robotic projects.The midi-bot lies in pieces, the Mini-bots still require pieces, my antweights are still scattered. All in all not the best state of affairs. So rather than try and catch up, guess what I’m doing, yep, starting NEW projects! I’ve just bought a GIGANTIC 3300uF 450VDC capacitor. Large, at about 335 Joules, I bloody hope so! Now according to my calculations, thats a lot of current, about 2000A over 700 uSeconds. Of course I want to make it portable, which is problematic, as a 12V needs to be stepped up to supply 450V. I’ve also been looking in to Fon, or La Fonero, and how it can be hacked. I’m still, slowly working on my Server PC, but running into some VPN issues, I can’t seem to get remote access to it, which is a pain considering I don’t want to have to plug a screen, keyboard and mouse into every time I want to use it. I’ve also fucked up my old laptop by deleting the kernal32.dll while trying to upgrade it. So if ANYONE has a linux install that runs off floppies, give me a email!

I had a driving test on the 31st of January, which I JUST failed, 2 serious faults, 9 minors. Your allowed up to 16 minors, but the second you get a serious fault, you’ve failed. I accidentally rolled into the kerb on a 3-point-turn, on a road with one of the steepest cambers ever, after performing two hill starts, perfectly, on roads at inclines of about 60%. My tester was a total bastard. I’ve got a new test booked for 12th March.

As for pyro, I haven’t engaged in anything of a chemical nature for about a year now. Which is very annoying, nor have I actually taken an interest in it. But I soon hope to start again slowly, I need to clear out my table and cupboards in my garage and then sort the remainder into a Lab/ Electronics workshop.


10 December, 2006

Here’s for the first post, I’m rather active in electronics, lately I bought an Arduino ( and an Infra-Red range finder from

The IR range finder is for the mini-bots I’m planning on making, these are small, about 4″ cubed, cheap, less than £20, robots. The idea is to make a swarm of them, so maybe 5 at most. I’ve already designed the PCB which allows the use of either IR or Sonar range finder, they have LDRs for light level sensing, and movement is controlled by two Servos converted for continuous rotation. It is controlled by a 08M PIC really basic, but VERY cheap, £1.79, the PCB will cost more say £2.00 and the Servos will cost the most £5 each.

Arduino is an open source micro-controller based on AMTEL chips, my board has a ATMEGA8 28-pin chip, gives me 3 PWM (Pulse Width Modulated) outputs which are simply analogue outputs, 6 analogue inputs, and 11 digital inputs/outputs, the PWMs can also be configured as digital outputs. I figured, as PICAXE is a bit Secondary School, even Primary school, I should probably find something more complex, but more flexible, and this is what I’ve decided upon. Reading on the site, you see it has a provision made for things called Shields, basically another PCB that is designed to slot into the top of the Arduino board, and provide extra functionality, such as blue tooth and accelerometers, can you say DIY PC Wii-mote ?

Right, that’s the electronics over with. Now onto the rest, Last night was the 9th of December, and on the 9th of December, Placebo ( played a gig at Wembley Arena, North London. And because I love them, I went along. It was ABSOLUTELY FUCKING AMAZING!!!!!! They had 11 large projection screens, numerous lights and LOTS of speakers, the lights and the projections were really good, very Placebo-like. The music, well, I’ve listened to placebo religiously for about 3 or so years now, and I can truly say, they’re much better Live. As for the Arena, It’s quite odd, the set up, I can’t really describe it, because I was kinda sitting at 90 degrees to the band and so forth. Why didn’t I get a standing tickets you ask ? I was meant to go with friends, and they went and lost their tickets, so I figured, ah fuck em, I’ll go alone, so I did. I think I’ll stick to standing tickets, I spent most of the time standing anyway!