Posts with «arduino» label

Arduino Joy Part 2

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.

And a closer look at the top of the unpopulated 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.

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 Part 2

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.

And a closer look at the top of the unpopulated 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.

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 Woe

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
FrequencyTimer2::setPeriod(freq);
FrequencyTimer2::enable();
}

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)
{
digitalWrite(capdump,HIGH);
}
}

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 http://www.uchobby.com/ 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.


Arduino Woe

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
FrequencyTimer2::setPeriod(freq);
FrequencyTimer2::enable();
}

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)
{
digitalWrite(capdump,HIGH);
}
}

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 http://www.uchobby.com/ 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

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.


The Trouble With Things

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.


Out with the New, in with the Old

I bought an Arduino some time ago, but now I just received an ATMega168 from Daniel Jouiffe in Canada. He’s doing a trust scheme where he burns the boot loader onto an ATMega168, and then posts that and a 16MHz crystal to you, where ever you are. Then you pay him back however much you want. I just put into my Arduino NG board, and it works really nice. I’ve just doubled most specifications of my ATMega8. The forum post is here.

I’ve also gone and bought a Asustek R1F-K008E Tablet Laptop from here. It’s very nice, I like how it looks, comes with lots of extras, there are a few niggles with it, such as the way the pen gets scratched in the holder, or that Vista comes pre-loaded. I’ve spent the last couple of weeks sampling Vista, and this past week I’ve been trying to get it off. No easy task. There are many reasons for removing Vista, but the best are, many programs I live on, just don’t work, I don’t exactly blame Windows for this, but it’s highly annoying. Arduino doesn’t work, iTunes crashes no end, it keeps giving me pop-ups. I mean, honestly pop-ups, you have pop-up blockers on pretty much ALL web browsers, what made Microsoft think people like pop-ups?

Another reason to remove Vista is quite simply, the hardware cannot handle it. I have a laptop, a very nice laptop, Pentium 1.83Ghz Core 2 Duo , 1024Mb of DRR RAM, 120Gb hard disk, and it ran slowly, like a dog, with 2 legs… I put standard windows XP Professional on there, and it was lightning fast, things opened up instantly where as in Vista I’d have to wait 3 seconds, not much, but highly annoying. And lets not forget the BSOD every now and again. Oh sure, there are some features I miss, like the pretty UI and general streamlining, but XP is what I’m used to.

So I formatted the disk, and tried and install XP Tablet Edition, except my copy of XP Tablet Edition is odd. It’s been locked down in particular areas. So I scrub that, and install my copy of XP Professional, this goes fine, but no tablet drivers, nor any other drivers for that matter, so onto the Asustek website to download them. Ah, problem, Asustek have shit servers. I’m getting about 5kb/s on a 50Mb download, where as I have in the past got up to 300kb/s download speeds. 2 hours, 2 WHOLE hours for the drivers for the WiFi. I was not happy. So a day later, after download the drivers, and installing them, I think, great, I’ve basically got a normal laptop. So I went and re-installed my XP Tablet Edition over the top of Professional. So all the drivers are working, the tablet works, but a few things don’t, such as the AVG, and a few of the function buttons. I wonder where I can get another copy of the XP Tablet edition?


Out with the New, in with the Old

I bought an Arduino some time ago, but now I just received an ATMega168 from Daniel Jouiffe in Canada. He’s doing a trust scheme where he burns the boot loader onto an ATMega168, and then posts that and a 16MHz crystal to you, where ever you are. Then you pay him back however much you want. I just put into my Arduino NG board, and it works really nice. I’ve just doubled most specifications of my ATMega8. The forum post is here.

I’ve also gone and bought a Asustek R1F-K008E Tablet Laptop from here. It’s very nice, I like how it looks, comes with lots of extras, there are a few niggles with it, such as the way the pen gets scratched in the holder, or that Vista comes pre-loaded. I’ve spent the last couple of weeks sampling Vista, and this past week I’ve been trying to get it off. No easy task. There are many reasons for removing Vista, but the best are, many programs I live on, just don’t work, I don’t exactly blame Windows for this, but it’s highly annoying. Arduino doesn’t work, iTunes crashes no end, it keeps giving me pop-ups. I mean, honestly pop-ups, you have pop-up blockers on pretty much ALL web browsers, what made Microsoft think people like pop-ups?

Another reason to remove Vista is quite simply, the hardware cannot handle it. I have a laptop, a very nice laptop, Pentium 1.83Ghz Core 2 Duo , 1024Mb of DRR RAM, 120Gb hard disk, and it ran slowly, like a dog, with 2 legs… I put standard windows XP Professional on there, and it was lightning fast, things opened up instantly where as in Vista I’d have to wait 3 seconds, not much, but highly annoying. And lets not forget the BSOD every now and again. Oh sure, there are some features I miss, like the pretty UI and general streamlining, but XP is what I’m used to.

So I formatted the disk, and tried and install XP Tablet Edition, except my copy of XP Tablet Edition is odd. It’s been locked down in particular areas. So I scrub that, and install my copy of XP Professional, this goes fine, but no tablet drivers, nor any other drivers for that matter, so onto the Asustek website to download them. Ah, problem, Asustek have shit servers. I’m getting about 5kb/s on a 50Mb download, where as I have in the past got up to 300kb/s download speeds. 2 hours, 2 WHOLE hours for the drivers for the WiFi. I was not happy. So a day later, after download the drivers, and installing them, I think, great, I’ve basically got a normal laptop. So I went and re-installed my XP Tablet Edition over the top of Professional. So all the drivers are working, the tablet works, but a few things don’t, such as the AVG, and a few of the function buttons. I wonder where I can get another copy of the XP Tablet edition?


Christmas

Here’s for the first post, I’m rather active in electronics, lately I bought an Arduino (http://www.arduino.cc) and an Infra-Red range finder from http://www.sparkfun.com/commerce/categories.php

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 (http://www.placeboworld.co.uk/) 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!


Christmas

Here’s for the first post, I’m rather active in electronics, lately I bought an Arduino (http://www.arduino.cc) and an Infra-Red range finder from http://www.sparkfun.com/commerce/categories.php

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 (http://www.placeboworld.co.uk/) 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!