Arduino sleep mode - Waking up when receiving data on the USART

I’ve been playing with the Arduino sleep modes and i wanted to be able to wake up from the sleep when receiving data on the serial port. Mainly, because in my project I’m using the XBee in the API mode and the tricks exposed in http://www.arduino.cc/playground/Learning/ArduinoSleepCode and http://www.libelium.com/squidbee/index.php?title=Save_power_in_SquidBee_-_sleep_mode involve putting Arduino in SLEEP_MODE_PWR_DOWN and using an extra pin on the arduino to monitor the RX pin and detecting LOW. I didn’t like that much that solution so I started to look into other ways of doing it without using an extra pin and without risk of losing data in the serial interface. Because as I understood it using SLEEP_MODE_PWR_DOWN requires to send first a burst of data to the serial interface in order to wake up the arduino. And it takes a while for the Arduino to become fully functional so that means that you will lose/miss data in the serial interface. That was something that didn’t fit my project. ...

October 15, 2008

Upgrading Xbee Series 2 (XbeeShield) to Xbee ZB with Arduino

As stated in this digi page is possible to upgrade/convert a Xbee Series 2.5 to a Xbee ZB (with full standard Zigbee capabilities). Xbee Series 2.5 is just another name for the forme Series 2, so the upgrade procedure is exactly the same. The procedure if fairly straighforward Remove ATmega168 from Arduino board Insert XbeeShield into Arduino Change *both *jumpers in XbeeShield to USB Connect Arduino to the computer using the USB cabke Download the ZNet 2.5 to ZB Conversion Kit here Start the X-CTU 5.1.4.1 software Select the proper COM port (should be Usb serial port (COMX)) Click on Test Query. The following dialog should appear indicating that X-CTU found the Xbee in that COM port and giving you some information about the Xbee module version, etc. In my case it was a ZB24-B with 1220 firmware Go to the Modem Configuration tab Download the ZNet 2.5 to ZB Conversion Kit here if you didn't do it earlier Uncompress the ZIP Select the “Download new versions” button. Press the “File” source button Select the xbee_zb.zip file to add the firmware set to X-CTU Back to the Modem Configuration tab. Select "Always update firmware" checkbox and select XB24-ZB (or XB24P-ZB if you have a PRO module) and the function set that you want for the module (router, coordinator, end device, each one in two differente flavor AT or API). In my case I selected XB24-ZB and COORDINATOR API. Check the product manual to find out about API and AT modes and the different firmwares for each set Press "Write" and X-CTU will start uploading the firmware to the module The firmware upgrade is complete **NOTE**: Make sure that the configuration for DIO7 is DISABLED as this XBee pin is connected to the RST in the Arduino. If you leave the default option (1 - CTS) random resets after a couple of seconds may occur+ NOTE 2: Be aware that putting XBee to sleep will also raise DIO7 and produce and Arduino reset. See this other post on XBee sleep and Arduino reset

September 6, 2008

Arduino and DS1620 digital temperature sensor

I received a couple of Arduinos Diecimilla that I bought from Libelium. My first project with Arduino has been interfacing with DS1620 digital temperature sensor. It was really easy it just a matter of connecting pin 3, 4 and 5 on the Arduino to RST, CLK and DQ on the DS1620. The source code in this post will read the temperature from the DS1620 using the 3 wire interface and it will output the result to the serial interface in the Arduino. ...

August 31, 2008