Sunday, March 17, 2013

Battery-powered Radio unit

Connected my battery charge-booster and XBee radios together today for a proper radio test, and had some very good results. The XBee was on a regulated XBee Explorer, taking care of the 3.3V signal conversions and power conversion. I connected the power directly to the output of the charge-boost, and then did a loopback test with XCTU (see previous post). The result was great! Over 99.8 % success rate across the room. Couple photos of the setup below.

Fig 1. Battery powered wireless unit.
Fig 2. Computer connected XBee unit. The red board in the middle contains some electronics for my DIP switches (pullup resistors and a shift register).
Eventually the battery powered unit (Fig 1.) will have the camera connected to it, so that the photos will be sent wirelessly.

In Fig. 2, you can just see the other part of the project I have been working on: shift register for my mode switches. The SD card reader shield contains a mini-protoboard which I have been using to my advantage here to hold all my components (8 resistors and an IC). A 90 degree header sticks out on one end, which I will use to connect this shield to my switches. Looks like there is still some room remaining on the protoboard, which will be good for when I add in some other sensors. However I was having a strange result with one of my pull-up resistors, so I'll have to do more testing before I can say that part of the project is ready.

Saturday, March 16, 2013

First Linksprite Photos!

Connected my LinkSprite camera directly to my Arduino to investigate the photo quality and software. I was using the sample software from the Sparkfun product description page. The image streamed to the serial monitor, which I copied and pasted to TextEdit and saved as a .txt file (plaintext). I used the python script from an instructables Bird Feeder project to convert this to a usable jpg file. This I was able to open directly.

During my testing I made a number of observations. Running at 38400 baud between the camera and Arduino was creating some errors (Fig. 1), so I changed to 9600 baud which eliminated the errors (Fig. 2). I also played a bit with the delays in the sample code, and moved some functions around to (hopefully) improve the speed of data transfer. My modified code is available here. Connections to the LynxSprite camera are: +5 and gnd to respective pins on Arduino. TXD to Arduino 4 and RXD to Arduino 5.

Fig. 1. Some transmission errors cause image to appear improperly (due to jpg encoding). Transfer rate: 38400 baud

Fig. 2. No transmission errors noted at 9600 baud.
Next I will connect and get my radio's working (including my battery powered radio unit) and test out some wireless photo transmissions.

Monday, March 4, 2013

Radio Testing

I bought my XBee radios over 3 years ago, but never actually got them working. I've been playing around a bit with them in my lab, and happened to come across a document explaining that an Arduino with XBee shield running an empty sketch can play the role of an XBee Explorer so decided to try it out. I hooked up a loopback circuit on my reciever, and used the digi X-CTU software to run the test. Results were flawless! Had my XBees up and running in less than 10 minutes talking across a rather small gap... will do some proper range tests once I get the battery and stuff sorted out.

99% Success rate!!!
Test setup showing my not-quite overlapping-antennas
Interestingly it seems the antennas are not required for communication... the u.fl connector alone can support some degree of signal at least over the short range tested. (As a side note, I got the antennas from ebay for about $5 including shipping). But unless I run into mass restrictions, the antenna will stay for now... at worst I can always take off the plastic casing and keep the wire whip.

In other news, I'm getting ready to defend my thesis so I'm not planning on ordering parts anytime soon... but defence date is in 2 weeks so... more electronics in the near future? I think so!