AVR


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 :)

AVR


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

AVR


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.

AVR


I’ve been playing around with the Arduino Diecimila and the ATMEGA168 over the last couple of weeks to better familiarise myself with the AVR ATMega168 MCU, I’ve been using PICs on and off the last few years, but the decision was made to use the ATMEGA as the MCU of choice for the Strobit Triggr project, mainly due to the open source tool chains available, and the simply programmer required.

In short I’m glad I’ve made the switch and I must say I’m loving the learning experience.  I’ve moved from the Arduino software development platform as I found it very limiting and am now using the open source avr-gcc (win-avr) and Eclipse, using the AVR plugin and CDT plugin as my development platform of choice, I’m comfortable with eclipse as my editor as I’ve been using this for my Java development for the last 5 or so years.

As a task I set for myself to learn the onboard peripherals,  I’ve created a Weather Shield for the Arduino, so far it has the RFM12B RF module, DS1307 RTC, HH10D Humidity Sensor, a HP03D, combined barometric pressure and temperature sensor, and soon to have a light sensor and Dallas 1-Wire interface for talking to the Dallas Weather Station that I’ve had lying around in a box for the last 10 years, (yes one of the original ones released by Dallas in 1998, I’ve been waiting to move in my house for a long time),  I’ll post the weather shield design up on a separate topic later, but suffice to say, I’ve enjoyed playing with the SPI, I2C, ICP, UART and onboard timers.

AVR


Jans Gentsch has made his compact version of the Strobit Triggr available to the community, his version, the Strobit M08 based on AVR design can be found here.   Please note that there are a couple of things that need doing to the PCB, if you get a chance to implement Jans design, please post back any changes to me so I can make them available.

Hello Stephen,

I’ve attached the Eagle-Design-Data as well as the source code. I haven’t found time to do anything on those since my post, so the are not in the best state. There are a few Problems with the board design:

Transmitter – There is a connection missing between the processor and NIRQ of the transmitter-module (the transmitter module doesn’t have a fifo, so that the nirq-line is needed to clock out the data). I just added a piece of loose wire during assembly.
Receiver – NIRQ isn’t connected as well, so I am constantly polling, not really a power saving design. however I am still running on the first set of batteries so it’s not like they are being drained empty immediatly.
IO-Board – Thr optocoupley was meant to sit on the bottom side but I got confused. It has to sit on top now.

Getting everything into the housing was a major challenge.

The source code has been developed using avr-gcc and the eclipse ide.
As it stands only the most basic function, tiggering, is working. The control flow will have to be reworked in order to add the rest of the functionality. And of course my “magic” trigger id should be changed.

Have fun!

Alle the best
Jan

Files

You will need Eagle PCB to view/edit the schematics and PCB files, found here -http://www.cadsoft.de/

The firmware is written using winavr found here – http://winavr.sourceforge.net/

AVR


Well have the controller setup and have uploaded the demo code, all working :)   Now down too some serious work in getting buzzbot connected to the board. 

The Board is based on the AT91SAM7X MPU, of which I have absolutely no experience, so the learning curve begins (right at the bottom).  First thing I want to do is get the interrupts for the two wheel encoders working.  From my initial research I gather that any of the inputs on the GPIO can generate an interrupt on a state change, exactly what I want.  So now more research on how to make it happen using the ARM7 GCC tools I’ve installed, all demo code is compiling and working ok.

Looks like my starting point is some examples found here http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/index_at91.html 

Switch to our mobile site