2009 May

May 2009


The other day when playing around with different fuse settings on the Widget Board, I incorrectly wrote the wrong values, oops one bricked board :(   However all is not lost.

With a second working Widget Board and a simple Arduino sketch , I used the following procedure to recover from my mishap.

First I installed the following sketch onto a working Widget Board

void setup() {
  pinMode(3, OUTPUT);  
}
 
void loop() {
  while(1) {
    PIND |= _BV(3);
  }
}

What this sketch does is generate a 1.2MHz clock signal on the INT1 port of the Widget Board. (Click the picture below to see the the full trace )

image

Next I attached this signal to the XTAL1 pin (Pin 7) of the AtMega168v on the bricked board (I just held it against the crystal pin). 

While holding this connection on the pin, I then fired up AVR-DUDE and rewrote the correct fuse settings, after confirming that the fuse values could be read back I then remove the wire and everything was back to normal.

So all is not lost :)

Version 1.0 of the boards is progressing to the point where I’ll be starting work on v1.1, integrating user feedback and any issues on the tracker, I’ve put a few up there so please check them out, comment or add your own.  Issue Tracker.

I’m extremely happy to say that everything has progressed really well, there are not any show stoppers with the board and as they stand are very usable.  The range of the RF with the units I’ve tested is brilliant, mainly inside, I’m hoping to do some tests over the weekend outside.

The rest of my components finally arrived yesterday and I now have fully complete boards, the low profile crystals look really slick, alas I’ve decided not to keep them in the next board revision and opted for a more generic and cheaper HC49 type crystal.   There are a few more changes, but check out the Issue Tracker.

In the Wild

A few of the extra PCB I sent out are finally arriving at their intended destinations and hopefully everyone will have time and skills to build them.  For those that have already built them I have received some great feedback.  Looking forward to their test results.

Arduino

Last night I installed the crystals on all my boards and they are now running after re-programming the fuse bits.  I’ve also re-compiled the lily pad boot loader for 8Mhz and 10Mhz along with updating the Arduino board files, I will have them online in SVN shortly.

I’m also assuming that you know how to program your fuse bits and they are correctly programmed.  The fuse values I’m using are found below in the boards.txt file. I don’t have to remind you that programming incorrect fuse values can potentially BRICK your board.  If you’re unsure please ask on the discussion group.

You need to have the correct boot loader up and running on your Strobit first.  I’ve yet to test the boot loader programming from the Arduino environment as I do all mine manually using avrdude, but here are the hex files, the 8Mhz is for if you don’t use a crystal, the 10Mhz is if you have the crystal installed.

Below is the boards.txt found in the Arduino hardware directory, just copy and paste into this the boards.txt and restart the Arduino environment. 

Then select the Widget Board of choice from the TOOLS|Board menu.

##############################################################
strobit1.name=Strobit Wireless Widget (10 MHz) Atmega168
 
strobit1.upload.protocol=stk500
strobit1.upload.maximum_size=14336
strobit1.upload.speed=19200
 
strobit1.boot loader.low_fuses=0xE6
strobit1.boot loader.high_fuses=0xDF
strobit1.boot loader.extended_fuses=0x00
strobit1.boot loader.path=strobit
strobit1.boot loader.file=strobitBOOT_168_10MHZ.hex
strobit1.boot loader.unlock_bits=0x3F
strobit1.boot loader.lock_bits=0x0F
 
strobit1.build.mcu=atmega168
strobit1.build.f_cpu=10000000L
strobit1.build.core=arduino
 
##############################################################
 
strobit.name=Strobit Wireless Widget (8 MHz) Atmega168
 
strobit.upload.protocol=stk500
strobit.upload.maximum_size=14336
strobit.upload.speed=19200
 
strobit.boot loader.low_fuses=0xE2
strobit.boot loader.high_fuses=0xDF
strobit.boot loader.extended_fuses=0x00
strobit.boot loader.path=strobit
strobit.boot loader.file=strobitBOOT_168_8MHZ.hex
strobit.boot loader.unlock_bits=0x3F
strobit.boot loader.lock_bits=0x0F
 
strobit.build.mcu=atmega168
strobit.build.f_cpu=8000000L
strobit.build.core=arduino
 
##############################################################

Strobit RFM12B PCB Layout

I’ve started to document the Wireless Widget Board in the wiki, documentation is currently all over the place, but slowly getting there.  Currently I’m working on the build instructions so those of you that I’ve sent PCBS to can at least have a parts list.  

I’ve also put up an initial bill of materials. But it would be great if someone can do a Octopart BOM and share it.

Initial building instructions can be found here: http://code.google.com/p/strobit/wiki/Rfm12BuildingInstructions with more to come.

I had a chance to grab a few photos of the progress so far, also helps that most of my components that I had on order arrived today so the boards has been kitted out with all the headers.  Now I can plug the prototype personality in, still waiting on my crystals, switches, and diodes.

This gives an idea of size. (I don’t have big hands either)  This board has a 900MHz 2dB GSM SMA antenna, prototype personality board installed and battery holder for CR123A Lithium battery. 

0515-1105040515-110420

 

Different battery options, using x2AA with a switched battery pack soldered onto the board.

0515-110726-01

The SMA connector is a standard PCB straight SMA connector that has been soldered onto the edge of the board.  The board have been designed for the Sparkfun PCB edge mounted SMA connector (SKU: WRL-00593), however I found that a standard PCB SMA connector will do the same job, the distance between the centre pin and the ground pins is the same thickness as the PCB and all the pins line up with the Sparkfun footprint, the centre pin fits perfectly and so do the two bottom ground pins, only difference is the two top ground pins don’t get soldered.

0515-110243

 

One of the LEDs flashing….Its Alive!!!!0515-110702

Today I did some testing on the RF side of things,  nothing scientific, just walking around the house seeing if it would dropout or report bad checksums, I’m happy to reports all is working as expected (using the 915Mhz RFM12B module)

The tests are done by using the RFM12B Example sketch found in the JeeLab RFM12B library by Jean-Claude over at Jeelab (RFM12B Arduino Library)

This library runs unmodified on the wireless widget board, just follow the instructions in the README about setting up node ids.

From the preliminary testing using some compact 1/2 wave GSM 900MHZ/1800MHZ antennas (http://www.dealextreme.com/details.dx/sku.5237)  I’m easily getting all the way around the house with no dropouts, have yet to do outside tests.

Today I constructed another 2 boards, very easy to do all done in around 30 minutes.  This now brings the total to 3.

Applying the boards with solder paste by hand, manually placing the components, bake them in the toaster oven together.  This time I got the LEDs the right way around and the right amount of solder paste on everything, no bridges on the CPU pins and looks like the right amount of fillet on the RFM12B module, very little cleanup work required, it’s amazing how little solder paste is required.

Add another 5 minutes to hand solder on the SMA connectors and program the boot loader on each, voila all done in around 30 minutes.

Now I have a potential “Network” I will start testing the RF side of things.  Currently I’m using the 915MHz modules.

Today I got a chance to do some testing on the boards. 

State of play so far:

  1. Checked for shorts on power – OK
  2. Did a board level continuity test – everything as per schematic.
  3. Power at the correct levels and at the right places.
  4. Found that my USBASP programmer needs sw2 set and now all working, I can now read and set fuses etc.
  5. Arduino lillypad bootloader successfully loaded and working – Whoot!
  6. ASCII sketch loaded via Arduino development environment, serial port tested at 9600, all working.
  7. Jean claudes RFM12B Test Sketch loaded and working.  Can configure device and some random data is being read back from RFM12B, need a second board operational to fully test the RF side of things.

TODO:

  1. Build a second device now that the basic circuit is working and verified.
  2. Fully test RFM12B and wireless comms.
  3. Test I/O i.e. Analogue and Digital ports, LEDS  etc
  4. Customise boot loader to use onboard LEDS.
  5. Document all of the above for others on the project’s website.

All in all I’m pretty happy :)

The PCBs arrived last week, unfortunately not in time for the long weekend so I haven’t really had a change to do anything until today and from my initial observations I’m happy with the results.

RFM12B PCB

IMG_8691_crop

2.4GHz MRF24J40MA PCB

IMG_8693_cropped

Prototype PCB

IMG_8699_cropped

As I mentioned on the Strobit-general Google List and the SPOT-development Google list,  they seem to have multiplied from when I placed my order to when I received them,  I calculated I would get approx 12 back of each board, in the end I received 32 of each board, go figure…..so if anyone wants a couple of free blank PCB then contact me and I can send you some if you cover the postage costs.  Please use the contact form to let me know.

Hot Out of the Oven

Today I assembled the first one!  Didn’t take long at all due to the minimal component count.  If anything I need to add more solder paste to the RFM12B footprint, but seems to have taken.

RFM12B PCB Assembled

IMG_8706_crop

I’ve partially assembled the board, enough to give me basic functionality so I can do some tests, while the rest of my components I’ve ordered (SMA connectors etc) arrive.  Unfortunately my stash of 0603 capacitors were actually 0805 ones in disguise, so I’ve had to use these even though the footprints are for 0603.   In the photo you can see some of them installed on their side.   Same goes for my bead, I only had some 0805 in my stash but have 0603 on order, just couldn’t wait :)  

I’ve enabled all the solder jumpers so I don’t need to install the switch and the BAV diode for the time being.

Changes for next board revision:

A couple of things stand out with this board revision, nothing major but niggly enough to warrant changes or at least thinking about them.

Crystal Footprint – One thing so far, I’m kicking myself for not making the crystal footprint a HC-49 SMD, I thought about it before I send the files off for fabrication, instead I opted for the sleek 0503 ceramic smd crystal, problem is they are more expensive and not as easy to come by, so I’ve added this as a change for the next board revision.  In future I’ll stick with the stock standard low cost crystal HC-49C footprint.

Switch – Do I really need it?  The onboard switch seemed like a good idea at the time, but in reality do I really need it?  I’m glad I had the fore thought to add a solder jumper to bypass it. Honestly I will probably more than likely use a switch remotely (i.e. on the side of an enclosure) or on the battery pack itself rather than on the PCB.  I may just leave the ability to have a remote switch and remove the onboard footprint all together.

LDO regulator onboard? – I’m still up in the air about this one.  Initially I wanted to keep things as low cost as possible (and I still do), and then add additional functionality via the personality boards so keeping the core board to bare minimum components, as I have only intended these to run from battery or from USB, not from a wall wart or A/C plug pack.  I have added some reverse protection with the BAV Scotty diode, but this won’t protect the board if someone connects a 9vDC source.  Anyway I think  I will wait and see how I go with testing and community feed back.

Jean-Claude over at JeeLabs has been playing with the RFM12 and has noted some differences between the RFM12B and the RFM12.

http://jeelab.equi4.com/2009/05/06/rfm12-vs-rfm12b-revisited/

Switch to our mobile site