Tag Archive | "avr"

Kit review – Protostack ATmega32 Development Kit

Introduction

For those of you prototyping with larger Atmel AVR microcontrollers such as the ATmega32, it can be inconvenient to continually assemble a circuit onto a solderless breadboard that includes power, programming header and a few basics – or you might want to create a one-off product without waiting for a PCB to be made. If these are issues for you, or you’re interested in working with AVRs  then the subject of this review may be of interest – the ATmega32 Development Kit from Protostack. The kit is one of a range that spans from the ATmega8, and gives you almost everything needed to work with the microcontroller. We’ve assembled and experimented with the ATmega32 kit, so read on to find out more.

Assembly

The kit arrives in a typical anti-static package with the contents and URL on the front:

packaging

The PCB is large, measuring 127 x 94 mm, made from heavy 1.6 mm FR4 PCB and all the holes are through-plated. And as you can see from the images below, there’s plenty of prototyping space and power/GND rails:

pcbtop

pcbbottom

The included parts allow you to add a power supply, polyfuse, smoothing capacitors for the power, programmer socket, external 16 MHz crystal, a DC socket, IC socket, a lonely LED and of course the ATmega32A (which is a lower-power version of the ATmega32):

parts

You can download the user guide from the product page, which details the board layout, schematic and so on. When soldering the parts in, just start with the smallest-profile parts first and work your way up. There’s a few clever design points, such as power regulator – there’s four holes so you can use both “in-GND-output” and “GND-output-input” types:

igo

… and the layout of the prototyping areas resemble that of a solderless breadboard, and the power/GND rails snake all around – so transferring projects won’t be difficult at all:

protoarea

If you need to connect the AVcc to Vcc, the components and board space are included for a low-pass filter:

lowpass

And if you get carried away and need to use two or more boards at once – they’re stackable:

stacking

Moving forward

After assembling the board and inserting the ATmega32, you can use an AVR programmer to check it’s all working (and of course program it). With a 10-pin interface USBASP inserted, I headed over to the AVRdude folder on my PC and entered:

which (as all was well) resulted with:

avrdudetest2

Awesome – it’s nice to have something that just works. Let the experimenting begin!

Conclusion

It’s a solid kit, the PCB is solid as a rock, and it worked. However it could really have used some spacers or small rubber feet to keep the board off the bench. Otherwise the kit is excellent, and offers a great prototyping area to work with your projects. If you order some, Protostack have a maximum delivery charge of $9 so you won’t get burned on delivery to far-flung places.  Larger photos available on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

LEDborder

Please note that the ATMEGA32A Development Kit in this review is a promotional consideration from Protostack.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in atmega32, atmel, avr, competition, education, electronics, kit review, microcontrollers, protostack, review, tronixstuff, usbaspComments (0)

Kit Review – AVR ISP Shield

Introduction

In the last few weeks I needed to flash some ATmega328P microcontrollers with the Arduino bootloader. There are a few ways of doing this, and one method is to use an AVR ISP shield. It’s a simple kit to assemble and use, so let’s  have look at the process and results.

As the kit is manufactured by Sparkfun, it arrives in typical minimalist fashion:

The kit includes the following items:

That’s it – no URL to instructions or getting started guide or anything. Luckily we have a bit of knowledge behind us to understand what’s going on. The PCB has all the components as SMT including the status LEDs, so the only soldering required is the shield header pins and the six or ten-connector for the programming cable. You receive enough header pins to fit everything except for both six and ten – you can have one or the other, but not both. Having some handy I thought adding my own socket would be a good idea, however the pins are placed too closed to the group of six, nixing that idea:

Assembly

After collecting all my regular soldering tools and firing up the ‘888 it was time to get to work:

The first thing to fit were the shield headers. A simple way to do this is to break off the required lengths:

… then fit them to a matching board:

… then you place the shield on top and solder the pins. After that I used some of my own headers to fit both six and ten-pin ISP headers – it never hurts to do both, one day you might need them and not have soldering equipment at the ready. Finally the zero-insertion force (ZIF) socket goes in last. Push the lever down so it lays flat before soldering. Then you’re finished:

Operation

Now to program some raw microcontrollers. Insert the shield into your board. We used Arduino IDE v1.0.1 without modifying the original instructions from the Arduino team. Now upload the “ArduinoISP” sketch which is in the Examples menu. Once this has been successful the PLS LED will breathe. You then insert the microcontroller into the ZIF socket and gently pull the lever down. The notch on the microcontroller must be on the right-hand side when looking at the shield. Finally – check the voltage! There is a switch at the bottom-left of the shield that allows 5V or 3.3V. This only changes the Vcc so programming a 3.3V microcontroller will still involve 5V via SPI – possibly causing trouble.

Next  you need to select the target board for the microcontroller you’re programming. For example, if it’s going into a Uno – click Uno, even if you’re hosting the shield with an older board such as a Duemilanove. Next, choose the programmer type by selecting Tools > Programmer >  Arduino as ISP. Now for the magic – select Tools > Burn bootloader. The process takes around one minute, during which time the “PROG” LED on the shield will blink and flicker. It turns off once finished, and the IDE also notifies you of this. For the curious, the process is in the video below:

As you hopefully noticed earlier a cable is included which allows in-circuit programming from the shield to your existing project or prototype. However we didn’t have use for it at this time, it will come in handy when doing more advanced work later on.

Conclusion

It’s simple and it works. So if you need to flash a whole tube of raw micros with the Arduino bootloader, this is an option. Full-sized images available on flickr. This kit was purchased without notifying the supplier.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in arduino, avrisp, DEV-11168, kit review, review, tutorialComments (4)

RF Wireless Data with the Seeedstudio RFbee

Introduction

In this article we examine the Seeedstudio RFbee Wireless Data Transceiver nodes. An RFbee is a small wireless data transceiver that can be used as a wireless data bridge in pairs, as well as a node in mesh networking or data broadcasting. Here is an example of an RFbee:

You may have noticed that the RFbee looks similar to the Xbee-style data transceivers – and it is, in physical size and some pinouts, for example:

comparison

However this is where the similarity ends. The RFbee is in fact a small Arduino-compatible development board based on the Atmel ATmega168 microprocessor (3.3V at 8MHz – more on this later) and uses a Texas Instruments CC1101 low-power sub1-GHz RF transceiver chip for wireless transfer. Turning over an RFbee reveals this and more:

But don’t let all this worry you, the RFbee is very simple to use once connected. As a transceiver the following specifications apply:

  • Data rate – 9600, 19200, 38400 or 115200bps
  • Adjustable transmission power in stages between -30dBm and 10 dBm
  • Operating frequency switchable between 868MHz and 915MHz
  • Data transmission can be point-to-point, or broadcast point-to-many
  • Maximum of 256 RFbees can operate in one mesh network
  • draws only 19.3mA whilst transmitting at full power

The pinout for the RFbee are similar to those of an Xbee for power and data, for example:

There is also the ICSP pins if you need to reprogram the ATmega168 direcly with an AVRISP-type programmer.

Getting Started

Getting started is simple – RFbees ship with firmware which allows them to simply send and receive data at 9600bps with full power. You are going to need two or more RFbees, as they can only communicate with their own kind. However any microcontroller with a UART can be used with RFbees – just connect 3.3V, GND, and the microcontroller’s UART TX and RX to the RFbee and you’re away. For our examples we will be using Arduino-compatible boards. If Arduino is new to you, consider our tutorials first.

If you ever need to update the firmware, or reset the RFbee to factory default after some wayward experimenting – download the firmware which is in the form of an Arduino sketch (RFBee_v1_1.pde) which can be downloaded from the repository. (This has been tested with Arduino v23). In the Arduino IDE, set the board type to “Arduino Pro or Pro Mini (3.3V, 8MHz) w/ATmega168”. From a hardware perspective, the easiest way to update the firmware is via a 3.3V FTDI cable or an UartSBee board, such as:

xbs4

You will also find a USB interface useful for controlling your RFbee via a PC or configuration (see below). In order to do this,  you will need some basic terminal software. A favourite and simple example is called … “Terminal“. (Please donate to the author for their efforts).

Initial Testing

After connecting your RFbee to a PC, run your terminal software and set it for 9600 bps – 8 – None – no handshaking, and click the check box next to “+CR”. For example:

term1

Select your COM: port (or click “ReScan” to find it) and then “Connect”. After a moment “OK” should appear in the received text area. Now, get yourself an Arduino or compatible board of some sort that has the LED on D13 (or substitute your own) and upload the following sketch:

Finally, connect the Arduino board to an RFbee in this manner:

  • Arduino D0 to RFbee TX
  • Arduino D1 to RFbee RX
  • Arduino 3.3V to RFbee Vcc
  • Arduino GND to RFbee GND
and the other RFbee to your PC and check it is connected using the terminal software described earlier. Now check the terminal is communicating with the PC-end RFbee, and then send the character ‘A’, ‘B’ or ‘C’. Note that the LED on the Arduino board will blink one, two or three times respectively – or five times if another character is received. It then reports back “Blinking completed!” to the host PC. For example (click to enlarge):
term2

Although that was a very simple demonstration, in doing so you can prove that your RFbees are working and can send and receive serial data. If you need more than basic data transmission, it would be wise to get a pair of RFbees to experiment with before committing to a project, to ensure you are confident they will solve your problem.

More Control

If you are looking to use your RFbees in a more detailed way than just sending data at 9600 bps at full power, you will need to  control and alter the parameters of your RFbees using the terminal software and simple AT-style commands. If you have not already done so, download and review the RFbee data sheet downloadable from the “Resources” section of this page. You can use the AT commands to easily change the data speed, power output (to reduce current draw), change the frequency, set transmission mode (one way or transceive) and more.

Reading and writing AT commands is simple, however at first you need to switch the RFbee into ‘command mode’ by sending +++ to it. (When sending +++ or AT commands, each must be followed with a carriage return (ASCII 13)). Then you can send commands or read parameter status. To send a command, just send AT then the command then the parameter. For example, to set the data rate (page ten of the data sheet) to 115200 bps, send ATBD3 and the RFbee will respond with OK.

You can again use the terminal software to easily send and receive the commands. To switch the RFbee from command mode back to normal data mode, use ATO0 (that’s AT then the letter O then zero) or power-cycle the RFbee.

RFbee as an Arduino-compatible board with inbuilt wireless

As mentioned previously the RFbee is based around an Atmel ATmega168 running at 8MHz with the Arduino bootloader. In other words, we have a tiny Arduino-compatible board in there to do our bidding. If you are unfamiliar with the Arduino system please see the tutorials listed here. However there are a couple of limitations to note – you will need an external USB-serial interface (as noted in Getting Started above), and not all the standard Arduino-type pins are available. Please review page four of the data sheet to see which RFbee pins match up to which Arduino pins.

If for some reason you just want to use your RFbee as an Arduino-compatible board, you can do so. However if you upload your own sketch you will lose the wireless capability. To restore your RFbee follow the instructions in Getting Started above.

The firmware that allows data transmission is also an Arduino sketch. So if you need to include RF operation in your sketch, first use a copy of the RFBee_v1_1.pde included in the repository – with all the included files. Then save this somewhere else under a different name, then work your code into the main sketch. To save you the effort you can download a fresh set of files which are used for our demonstration. But before moving forward, we need to learn about controlling data flow and device addresses…

Controlling data flow

As mentioned previously, each RFbee can have it’s own numerical address which falls between zero and 255. Giving each RFbee an address allows you to select which RFbee to exchange data with when there is more than two in the area. This is ideal for remote control and sensing applications, or to create a group of autonomous robots that can poll each other for status and so on.

To enable this method of communication in a simple form several things need to be done. First, you set the address of each RFbee with the AT command ATMAx (x=address). Then set each RFbee with ATOF2. This causes data transmitted to be formatted in a certain method – you send a byte which is the address of the transmitting RFbee, then another byte which is the address of the intended receipient RFbee, then follow with the data to send. Finally send command ATAC2 – which enables address checking between RFbees. Data is then sent using the command

Where data is … the data to send. You can send a single byte, or an array of bytes. length is the number of bytes you are sending. sourceAddress and destinationAddress are relevant to the RFbees being used – you set these addresses using the ATMAx described earlier in this section.

If you open the file rfbeewireless.pde in the download bundle, scroll to the end of the sketch which contains the following code:

This is a simple example of sending data out from the RFbee. The RFbee with this sketch (address 1) sends the array of bytes (testdata[]) to another RFbee with address 2.  You can disable address checking by a receiving RFbee with ATAC0 – then it will receive any data send by other RFbees.

To receive data use the following function:

The variable result will hold the incoming data, len is the number of bytes to expect, sourceAddress and destinationAddress are the source (transmitting RFbee) and destination addresses (receiving RFbee). rssi and lqi are the signal strength and link quality indicator – see the TI CC1101 datasheet for more information about these. By using more than two RFbees set with addresses you can selectively send and receive data between devices or control them remotely. Finally, please note that RFbees are still capable of sending and receiving data via the TX/RX pins as long as the sketch is not executing the sendTestData() loop.

I hope you found this introduction interesting and useful. The RFbees are an inexpensive and useful alternative to the popular Xbee modules and with the addition of the Arduino-compatible board certainly useful for portable devices, remote sensor applications or other data-gathering exercises.

For more information and product support, visit the Seeedstudio product pages.

RFbees are available from Seeedstudio and their network of distributors.

Disclaimer – RFbee products used in this article are promotional considerations made available by Seeedstudio.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in arduino, education, lesson, RF, rfbee, seeedstudio, tutorial, wireless, WLS126E1P, xbee

The world’s smallest oscilloscope??

Hello readers

Today we examine a tiny and fascinating piece of test equipment from Gabotronics – their XMEGA Xprotolab. Sure, that sounds like a lot – and it is. Yet the functionality of the Xprotolab is inversely proportional to its physical size. Try to imagine having an oscilloscope, arbitrary waveform generator, logic analyser and a spectrum analyser – including a display – in a package no larger than 25.4 x 40.6 mm (1″ x 1.6″) in size. Well imagine no more as here it is:

1ss

As described above, this tiny marvel of engineering has the following functions:

  • Two analogue oscilloscope channels with a maximum sampling rate of 2 million samples per second;
  • Analogue bandwidth of 320 kHz at 8-bits resolution;
  • Buffer size of 256 samples;
  • Fast fourier-transform;
  • Analog and external digital triggering;
  • Maximum input voltage of +/- 10V;
  • Automatic average and peak-to-peak measurements;
  • Logic analyser with eight channel maximum simultaneous monitoring;
  • Firmware is user upgradable;
  • Can also be used as a development board for the XMEGA microcontroller (extra items required);
  • When powered from a USB cable, the board can supply +/-5V and +3.3V into a solderless breadboard.

The OLED screen is very clear and precise, which considering the size of 0.96″ – very easy to read. One can also set the display mode to invert which changes the display to black on white, bringing back memories of the original Apple Macintosh:

invertedss

Using the Xprotolab took a little getting used to, however after pressing menu buttons for a few minutes I had it worked out. The more sensible among you will no doubt read the instructions and menu map listed at the website. Having the dual voltmeter function is quite useful, it saved me having to mess about with a couple of multimeters when trying to debug some analogue circuits I’m currently working with.

The display can be as complex or as simple as you choose, for example when working with the oscilloscope you can disable one channel and shift the waveform so it occupies the centre of the screen. Or when working with the logic analyser, you can choose to only select the channels being monitored, instead of filling the screen with unused logic lines.

There are a couple of things to take care with. When inserting the Xprotolab into your breadboard, be careful not to put pressure on the OLED display when pushing down; when removing it from the breadboard, try and do so evenly with the help of an DIP IC puller.

Generally in my reviews there is a video clip of something happening. Unfortunately my camera just isn’t that good, so below is the demonstration clip from the manufacturer:

As you can see the Xprotolab would be quite useful for monitoring various signals whilst prototyping, as you can just drop it into a breadboard. Furthermore, if your required range is measurable the Xprotolab saves you having to look back-and-forth between a prototype and the display from a regular oscilloscope as well.

As the purchase price is relatively cheap compared against the time and effort of trying to make an OLED display board yourself, one could also plan to build an Xprotolab into a final design – considering a lot of measurement and display work is already done for you it could be a real time-saver. The Xprotolab can run from a 5V supply and only draws a maximum of 60 milliamps. Product support is quite extensive, including source code, schematics, videos, a user forum and more available from the product page.

In conclusion the Xprotolab is genuinely useful, inexpensive and ready to use out of the box. It would make a useful piece of test equipment for a beginner or seasoned professional, and also integrates well into custom projects when required.

Remember, if you have any questions about the Xprotolab,  please contact Gabotronics via their website.

[Note – the Xprotolab reviewed in this article was received from Gabotronics for review purposes]

Posted in gabotronics, oscilloscope, part review, review, xmega, xprotolabComments (8)


Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: