dereenigne.org

reverse engineered

Arduino EtherShield DS18B20 Temperature Logger

I’ve been using an Arduino, an EtherShield and a DS18B20 temperature sensor to log the temperatures outside my window for about 6 months now, and it has worked well. I’ve also been getting a couple of emails looking for the source code to my program. The original code was rather quickly hacked together and I was reluctant to publish it (although I did send it to those that emailed). I got some spare time over the holidays and did a major refactor of the code, including moving from the EtherShield library to the ethercard library. Read more →

Arduino Float to String

If you have ever tried to use sprintf() on an Arduino to convert from a float to a string, you will notice it doesn’t work. sprintf(buf,"%f", floatvar); The above function will most likely return a “?” to your char buffer. If you google around, you’ll see various functions that people have written to overcome this, but all of them seem broken in one way or another. The alternative is to use dtostrf(), a standard avr-libc function. Read more →

Arduino Modbus RTU ADC

Modbus is an industry standard communications protocol for electronic devices. Given that most industrial sensors and meters provide their output by varying the voltage of the output pin between 0-10 Volts, Modbus compatible analog to digital converters are popular devices. Modbus is surprisingly resilient to interference. This is because it is based around the RS-485 standard. RS-485 is essentially a multi-point, balanced, version of RS-232 (which people might recognise as the serial port protocol), which is point-to-point, and unbalanced. Read more →

Arduino Duemilanove Optiboot

You may have noticed that the new Arduino Uno uses the optiboot bootloader. This new bootloader brings two main advantages: Smaller bootloader footprint - An additional 1.5kB of space for sketches. Increased bootloader baudrate - Faster sketch uploading. Fortunately for us, these bootloader improvements can be backported to the Arduino Duemilanove. If you have more than one Duemilanove to hand, then is it trivial to flash the new bootloader. Read more →

ENC28J60 Ethernet Breakout Board

One of the first things I wanted to buy when I got my Arduino board was an Ethernet shield. The ability to interface with the internet opens up a raft of possible applications for the device. After picking my jaw up off the ground after seeing the price of the of the official Wiznet W5100 based Arduino Ethernet shield, I decided to go for the cheaper MicroChip ENC28J60 based nuelectronics Ethernet shield. Read more →

DS1307 I²C Clock

I wanted to learn how to interface with I²C devices using my Arduino, so I bought a DS1307 clock and crystal kit from Earthshine Electronics. I’ve no association to them, but I’d recommend having a look at their shop. Their prices are very reasonable, unlike most Arduino component retailers. I²C is an addressable serial interface. That means that you can communicate with many I²C devices using the same 4 pins all the time. Read more →

Arduino GPS Clock

I had a Holux M-1000B Bluetooth GPS module that was just gathering dust in my room. I had bought it from DealExtreme back in the days when I had GPS-less (but external GPS capable) Nokia E51. Upgrading to a Nokia E52 has since made this receiver redundant. However, since getting an Arduino, and being put off by the price of GPS shields for them, I decided to use the GPS receiver I already have. Read more →

Marioduino

I recently acquired an Arduino Duemilanove, and my first shield arrived yesterday - a Nokia 3310 LCD Shield. The documentation was was a somewhat scarce for that particular shield, but it did the job. Once the obligatory “Hello, World!” program was written, I began writing this program. Mario was going to run across the LCD screen while Super Mario Bros. tune was playing on the speaker. Not having a musical note in my head, I had to have a google for the tone generation element of this project. Read more →