Tag Archive | "ATmega328"

Kit Review – akafugu Simpleclock

Introduction

Finally another kit review! Thanks to akafugu in Japan (the people who brought us the Akafuino-X) we have a new clock kit to assemble – the Simpleclock. But first, what is it?

A clock – yes. You can never have too many clocks. Also, a digital thermometer and an alarm clock. It is based on the Atmel ATmega328 and Arduino IDE, with open-source firmware. The real-time clock uses the DS1307 circuit with battery backup that we know and love. This means you can completely modify the clock or concoct a completely different use for your Simpleclock. Countdown timer? There’s an idea…

Furthemore, the display module is their individual I2C-interface TWI Display. Therefore you have a clock as well as some Arduino-based hardware to experiment with later on. However, let’s assemble it first.

Assembly

Putting it all together was quite straight-forward. You can follow the detailed instructions at the akafugu site. All the parts required to make a functional clock as advertised are included with the kit:

Here are the brains of the operation – the pre-programmed microcontroller and the DS1307 real-time clock IC: 

You do receive an IC socket for the MCU, but not for the RTC – however this shouldn’t be an issue – just double-check your soldering and have some confidence. The PCBs are nicely laid out with solder-masking and a clear silk-screen:

The PCB on the left in the images above is for the display module – it runs an ATtiny microcontroller than can be worked with separately. Moving forward, you start with the lowest-profile components including the resistors and capacitors:

Take note of the vice – these are great, and light years ahead of the “helping hands” things you see around the traps. This was a Stanley model from element14. The resistors sit in nicely:

The next step is to put a blob of solder on the solder pad which will be beneath the backup battery holder – this forces contact between the negative side of the coin cell battery and the PCB:

Everything else went smoothly – I did have a small worry about the pin spacing for the USB power socket, however a clean tip and a steady hand solved that problem:

The rest of the clock board is much easier – just follow the instructions, take your time and relax. Soon enough you’ll be finished:

However I did have one “oops” moment – I left the PTC in too tall, so it needed to be bent over a little to give way for the display module when inserted:

The next task is to solder the four digit display to the display PCB – nothing new here:

Which leaves you with the standalone display module:

Using the Simpleclock

The firmware for clock use as described in the product page is already loaded in the MCU, so you can use it without needing and programming time or effort. It is powered via a mini-USB cable which you will need to acquire yourself. Frankly the design should have a DC socket and regulator – perhaps for the second revision 🙂 With second thought, it’s better running from USB. When I turn on the computer in the morning the Simpleclock beeps and ‘wakes up’. The menu system is simple and setting the time and alarm is deceptively so. Some thought has been put into the user interface so once assembled, you could always give the clock away as a gift without fear of being asked for help. However mine is staying on top of the monitor for the office PC:

And here it is in action on the bench:

If you get the urge to modify and update the code, it is easily done. As the Simpleclock kit is open source, all the data required is available from Akafugu’s github page. Please read the notes and other documentation before updating your clock. The easiest way to physically upload the new code will be with a 5V FTDI to USB adaptor or cable.

Conclusion

The Simpleclock was easy to assemble and works very well. It would make a fun kit for those learning to solder, as they have something that once completed is a reminder of their success and useful in daily life. Apart from using USB for power instead of a DC socket – it’s a great kit and I would recommend it to anyone interested in clocks, enjoys kit assembly, or as a gift to a young one to introduce them to electronics and microcontrollers.

Note – the Simpleclock kit was a promotional consideration from akafugu.jp, however the opinions stated are purely my own.

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 akafugu, arduino, clocks, ds1307, I2C, kit review, tutorialComments (2)

Kit review – nootropic design Digit Shield

Hello readers

Time once again to examine another kit. This week we have the nootropic design Digit Shield for Arduino Uno/Duemilanove and compatible boards. Although a finger can be called a digit this shield is not some sort of biotechnological experiment – instead it gives us four seven-segment LED displays to show various forms of numerical data from our Arduino sketches.

Although many people may be tempted to use a standard LCD unit, there are a few advantages to using an LED display – such as digit size, enhanced readability in daylight, and LED displays are generally much more robust than LCDs. Therefore there should be many uses for the Digit Shield. Furthermore, the people at nootropic design have been awesome as they support the Open Hardware Definition 1.0, and the Digit Shield design files have been made available under Creative Commons attribution-share alike.

First let’s run through construction, then operation with some demonstrations. The kit arrives in a nice reusable bag with a pointer to the online instructions:

1ss

Kit construction was relatively simple thanks to the excellent instructions by nootropic design. All the parts required for completion are included, except for IC sockets:

2ss

My demonstration kit included green LED displays, however it is also available in red-orange, depending on the retail outlet you choose. Once again the PCB is well laid out, with a good solder mask and a nicely labelled silk screen on top:

3ss

Now to start soldering. The process is nothing out of the ordinary, and should take around half an hour at the most. First in are the resistors:

4ss

Notice how the current-limiting resistors for the LED segments will be under the LED displays. So now we solder in the LED modules and create a resistor jail:

5ss

Now for the shift register and BCD to decimal ICs. I found inserting them a little tricky due to my large hands and the LED display already being in place, so it would be easier to fit the ICs before the LED modules:

6ss

This leaves us with the transistors, capacitors, header sockets and the reset button:

7ss

After soldering the reset button, you may need trim down the solder and legs (as shown below) otherwise there is a possibility they will rub the DC input socket on the Arduino board:

Finally the shield pins are fitted and the shield is ready:

9ss

The next task is to download and install the Digit Shield’s Arduino library. The latest version can be found here. Extract the folder into your

folder, then restart the Arduino IDE software.  A quick test of the shield can be accomplished with the SimpleCounter sketch available from the inbuilt examples. To find this, select File>Examples>DigitShield>SimpleCounter in the Arduino IDE, and upload the sketch. Hold onto the desk as you watch some numbers increment:


Using the shield in your own sketch is quite simple. Instead of reinventing the wheel there is an excellent explanation of the various functions available on the lower section of this page. A very useful feature is when the shield cannot display a number – it shows all four decimal points instead. The only slight criticism that comes to mind is the inability to directly display hexadecimal digits A~F, as the LED units lend themselves nicely to doing so; or the option of controlling each LED segment individually with a simple function. So let’s see if that is possible…

One of the joys of open hardware is the fact we can get the schematic, see how it works and attempt to solve such dilemmas ourselves. For those without software that can read Cadsoft EAGLE files, here is the schematic in .pdf format. The section we need to see is how the LED segments are driven. Look for the 74HC595 and 74LS247 ICs. Serial data is shifted out from the Arduino digital pins to the 74HC595 shift register. (For more information about how 74HC595s work with Arduino please visit this tutorial).

Outputs A~D (Q0~Q3) represent binary-coded decimal output and the outputs E~H (Q4~Q7) control the transistors which select the current digit to use. The BCD output is fed to the 74LS247 BCD to seven-segment drive IC. Although this is a very useful IC, it can only display the decimal digits and a few odd characters (see page two of the data sheet.pdf). So this leaves us unable to modify our sketches or the shield library to solve our problem. Such is life!

Perhaps the people at nootropic design can consider a change in the hardware for the next version to incorporate such requirements. However there are several projects available in the Digit Shield’s website that may be of interest, including a way to daisy-chain more than one shield at a time.

Nevertheless the Digit Shield is a simple kit that makes displaying Arduino-generated numerical data simple and clear. Furthermore lovers of blinking LEDs will have a ball. For further questions about the Digit Shield contact nootropic design or perhaps post on their forum.

As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow me on twitter or facebook, or join our Google Group for further discussion.

High resolution images are available on flickr.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, kit review, notropicsComments (13)

Kit review – nootropic design Hackvision

Hello readers

Time for another kit review – the nootropics design Hackvision,  a nice change from test equipment. The purpose of the Hackvision is to allow the user to create retro-style arcade games and so on that can be played on a monitor or television set with analogue video input. Although the display resolution is only 128 by 96 pixels, this is enough to get some interesting action happening. Frankly I didn’t think the Arduino hardware environment alone was capable of this, so the Hackvision was a pleasant surprise.

Assembly is quick and relatively simple, the instructions are online and easy to follow. All the parts required are included:

partsss

The microcontroller is pre-loaded with two games so you can start playing once construction has finished. However you will need a 5V FTDI cable if you wish to upload new games as the board does not have a USB interface. The board is laid out very clearly, and with the excellent silk-screen and your eyes open construction will be painless. Note that you don’t need to install R4 unless necessary, and if your TV system is PAL add the link which is between the RCA sockets. Speaking of which, when soldering them in, bend down the legs to lock them in before soldering, as such:

Doing so will keep them nicely flush with the PCB whilst soldering. Once finished you should have something like this:

almostdoness

All there is to do now is click the button covers into place, plug in your video and audio RCA leads to a monitor, insert nine volts of DC power, and go:

doness

Nice one. For the minimalist users out there, be careful if playing games as the solder on the rear of the PCB can be quite sharp. Included with the kit is some adhesive rubber matting to attach to the underside to smooth everything off nicely. However only fit this once you have totally finished with soldering and modifying the board, otherwise it could prove difficult to remove neatly later on. Time to play some gamesin the following video you can see how poor my reflexes are when playing Pong and Space Invaders:

[ … the Hackvision also generates sounds, however my cheap $10 video capture dongle from eBay didn’t come through with the audio … ]

Well that takes me back. There are some more contemporary games and demonstration code available on the Hackvision games web page. For the more involved Hackvision gamer, there are points on the PCB to attach your own hand-held controls such as paddles, nunchuks and so on. There is a simple tutorial on how to make your own paddles here.

Those who have been paying attention will have noticed that although the Hackvision PCB is not the standard Arduino Duemilanove-compatible layout, all the electronics are there. Apart from I/O pins used by the game buttons, you have a normal Arduino-style board with video and audio out. This opens up a whole world of possibilities with regards to the display of data in your own Arduino sketches (software). From a power supply perspective, note that the regulator is a 78L05 which is only good for 100mA of current, and the board itself uses around 25mA.

To control the video output, you will need to download and install the hackvision-version arduino-tvout library. Note that this library is slightly different to the generic arduino-tvout library with regards to function definitions and parameters. To make use of the included buttons easier, there is also the controllers library. Here is a simple, relatively self-explanatory sketch that demonstrates some uses of the tvout functions:

And the resulting video demonstration:

I will be the first to admit that my imagination is lacking some days. However with the sketch above hopefully you can get a grip on how the functions work. But there are some very good game implementations out there, as listed on the Hackvision games page. After spending some time with this kit, I feel that there is a lack of documentation that is easy to get into. Sure, having some great games published is good but some beginners’ tutorials would be nice as well. However if you have the time and the inclination, there is much that could be done. In the meanwhile you can do your own sleuthing with regards to the functions by examining the TVout.cpp file in the Hackvision tvout library folder.

For further questions about the Hackvision contact nootropic design or perhaps post on their forum. However the Hackvision has a lot of potential and is an interesting extension of the Arduino-based hardware universe – another way to send data to video monitors and televisions, and play some fun games.If you are looking for a shield-based video output device, perhaps consider the Batsocks Tellymate.

As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow me on twitter or facebook, or join our Google Group for further discussion.

High resolution images are available on flickr.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, games, hackvision, kit review, LCD, microcontrollers, notropicsComments (2)

Discovering Arduino’s internal EEPROM lifespan

How long does the internal EEPROM of an Atmel ATmega328 last for? Let’s find out…

Updated 18/03/2013

Some time ago I published a short tutorial concerning the use of the internal EEPROM  belonging to the Atmel ATmega328 (etc.) microcontroller in our various Arduino boards. Although making use of the EEPROM is certainly useful, it has a theoretical finite lifespan – according to the Atmel data sheet (download .pdf) it is 100,000 write/erase cycles.

One of my twitter followers asked me “is that 100,000 uses per address, or the entire EEPROM?” – a very good question. So in the name of wanton destruction I have devised a simple way to answer the question of EEPROM lifespan. Inspired by the Dangerous Prototypes’ Flash Destroyer, we will write the number 170 (10101010 in binary) to each EEPROM address, then read each EEPROM address to check the stored number. The process is then repeated by writing the number 85 (01010101 in binary) to each address and then checking it again. The two binary numbers were chosen to ensure each bit in an address has an equal number of state changes.

After both of the processes listed above has completed, then the whole lot repeats. The process is halted when an incorrectly stored number is read from the EEPROM – the first failure. At this point the number of cycles, start and end time data are shown on the LCD.

In this example one cycle is 1024 sequential writes then reads. One would consider the entire EEPROM to be unusable after one false read, as it would be almost impossible to keep track of  individual damaged EEPROM addresses. (Then again, a sketch could run a write/read check before attempting to allocate data to the EEPROM…)

If for some reason you would like to run this process yourself, please do not do so using an Arduino Mega, or another board that has a fixed microcontroller. (Unless for some reason you are the paranoid type and need to delete some data permanently). Once again, please note that the purpose of this sketch is to basically destroy your Arduino’s EEPROM. Here is the sketch:

If you are unfamiliar with the time-keeping section, please see part one of my Arduino+I2C tutorial. The LCD used was my quickie LCD shield – more information about that here. Or you could always just send the data to the serial monitor box – however you would need to leave the PC on for a loooooong time… So instead the example sat on top of an AC adaptor (wall wart) behind a couch (sofa)  for a couple of months:

The only catch with running it from AC was the risk of possible power outages. We had one planned outage when our house PV system was installed, so I took a count reading before the mains was turned off, and corrected the sketch before starting it up again after the power cut. Nevertheless, here is a short video – showing the start and the final results of the test:


So there we have it, 1230163 cycles with each cycle writing and reading each individual EEPROM address. If repeating this odd experiment, your result will vary.

Well I hope someone out there found this interesting. Please refrain from sending emails or comments criticising the waste of a microcontroller – this was a one off.

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, atmega328, atmel, EEPROM, hardware hacking, lesson, microcontrollers, projects, tutorialComments (5)

Tutorial: Your Arduino’s inbuilt EEPROM

This is chapter thirty-one of a series originally titled “Getting Started/Moving Forward with Arduino!” by John Boxall – A tutorial on the Arduino universe. The first chapter is here, the complete series is detailed here 

[Updated 09/01/2013]

Today we are going to examine the internal EEPROM in our Arduino boards. What is an EEPROM some of you may be saying? An EEPROM is an Electrically Erasable Programmable Read-Only Memory. It is a form of non-volatile memory that can remember things with the power being turned off, or after resetting the Arduino. The beauty of this kind of memory is that we can store data generated within a sketch on a more permanent basis.

Why would you use the internal EEPROM? For situations where data that is unique to a situation needs a more permanent home. For example, storing the unique serial number and manufacturing date of a commercial Arduino-based project – a function of the sketch could display the serial number on an LCD, or the data could be read by uploading a ‘service sketch’. Or you may need to count certain events and not allow the user to reset them – such as an odometer or operation cycle-counter.

What sort of data can be stored? Anything that can be represented as bytes of data. One byte of data is made up of eight bits of data. A bit can be either on (value 1) or off (value 0), and are perfect for representing numbers in binary form. In other words, a binary number can only uses zeros and ones to represent a value. Thus binary is also known as “base-2″, as it can only use two digits.

How can a binary number with only the use of two digits represent a larger number? It uses a lot of ones and zeros. Let’s examine a binary number, say 10101010. As this is a base-2 number, each digit represents 2 to the power of x, from x=0 onwards:

binary2 binary12

See how each digit of the binary number can represent a base-10 number. So the binary number above represents 85 in base-10 – the value 85 is the sum of the base-10 values. Another example – 11111111 in binary equals 255 in base 10.

binary2

Now each digit in that binary number uses one ‘bit’ of memory, and eight bits make a byte. Due to internal limitations of the microcontrollers in our Arduino boards, we can only store 8-bit numbers (one byte) in the EEPROM. This limits the decimal value of the number to fall between zero and 255. It is then up to you to decide how your data can be represented with that number range. Don’t let that put you off – numbers arranged in the correct way can represent almost anything!

There is one limitation to take heed of – the number of times we can read or write to the EEPROM. According to the manufacturer Atmel, the EEPROM is good for 100,000 read/write cycles (see the data sheet). One would suspect this to be a conservative estimate, however you should plan accordingly. *Update* After some experimentation, the life proved to be a lot longer

Now we know our bits and and bytes, how many bytes can be store in our Arduino’s microcontroller? The answer varies depending on the model of microcontroller. For example:

  • Boards with an Atmel ATmega328, such as Arduino Uno, Uno SMD, Lilypad or the Freetronics KitTen/Eleven – 1024 bytes (1 kilobyte)
  • Boards with an Atmel ATmega1280 or 2560, such as the Arduino Mega series – 4096 bytes (4 kilobytes)
  • Boards with an Atmel ATmega168, such as the original Arduino Lilypad, old Nano, Diecimila etc – 512 bytes.

If y0u are unsure have a look at the Arduino hardware index or ask your board supplier.

If you need more EEPROM storage than what is available with your microcontroller, consider using an external I2C EEPROM as described in the Arduino and I2C tutorial part two.

At this point we now understand what sort of data and how much can be stored in our Arduino’s EEPROM. Now it is time to put this into action. As discussed earlier, there is a finite amount of space for our data. In the following examples, we will use a typical Arduino board with the ATmega328 with 1024 bytes of EEPROM storage.

To use the EEPROM, a library is required, so use the following library in your sketches:

The rest is very simple. To store a piece of data, we use the following function:

The parameter a is the position in the EEPROM to store the integer (0~255) of data b. In this example, we have 1024 bytes of memory storage, so the value of a is between 0 and 1023. To retrieve a piece of data is equally as simple, use:

Where z is an integer to store the data from the EEPROM position a. Now to see an example.

This sketch will create random numbers between 0 and 255, store them in the EEPROM, then retrieve and display them on the serial monitor. The variable EEsize is the upper limit of your EEPROM size, so (for example) this would be 1024 for an Arduino Uno, or 4096 for a Mega.

The output from the serial monitor will appear as such:

So there you have it, another useful way to store data with our Arduino systems. Although not the most exciting tutorial, it is certainly a useful.

LEDborder

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, or join our 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, EEPROM, lesson, microcontrollers, tutorialComments (33)

Project – Simple RFID access system

In this tutorial you can make an RFID access system. It’s very simple and can be used with a wide variety of end-uses.

Updated 18/03/2013

The purpose of this project is to prototype a basic RFID access system. Although it is not that complicated, this article is my response to a kit reviewed in the Australian “Silicon Chip” (November 2010) electronics magazine. Their article describes the kit in detail – operation, schematic, use and installation. However the code for the microcontroller (PIC16F628A)  is not published due to the kit manufacturer holding copyright over the design.

This is a shame, as many organisations have been quite successful selling open-source kits. So instead of moaning about it, I have created my own design that matches the operation of the original, instead using the ATmega328 MCU with Arduino bootloader. Consider this a basic framework that you can modify for your own access system, or the start of something more involved.

articless

There are pros and cons with the original vs. my version. The biggest pro is that you can buy the whole kit for around Au$40 including a nice PCB, solder it together, and it works. However if you want to do it yourself, you can modify it to no end, and have some fun learning and experimenting along the way. So let’s go!

The feature requirements are few. The system must be able to learn and remember up to eight RFID access tags/cards, etc – which must be able to be altered by a non-technical user. Upon reading a card, the system will activate a relay for a period of time (say 1 second) to allow operation of a door strike or electric lock. Finally, the RFID tag serial numbers are to be stored in an EEPROM in case of a power outage. When a tag is read, a matching LED (1~8) will show which tag was read. There are also two LEDs, called “Go” and “Stop” which show the activation status. The original kit has some more LEDs, which I have made superfluous by blinking existing LEDs.

This is a simple thing to make, and the transition from a solderless breadboard to strip board will be easy for those who decide to make a permanent example. But for now, you can follow with the prototype. First is the parts list:

  • Atmel ATmega328 with Arduino bootloader;
  • 16 MHz resonator (X1 in schematic);
  • ten LEDs of your choice;
  • two normally-open push buttons;
  • two 560 ohm resistors (all resistors 1/4 watt);
  • one 1k ohm resistor;
  • three 10k ohm resistors;
  • one BC548 transistor;
  • three 0.01 uF monolithic capacitors;
  • one 100 uF electrolytic capacitor;
  • one 1N4004 diode;
  • Microchip 24LC256 EEPROM;
  • 125 kHZ RFID module;
  • 125 kHz RFID tags/cards;
  • connecting wire;
  • large solderless breadboard;
  • LM7805 power regulator;
  • relay of your choice with 5V coil (example).

When selecting a relay, make sure it can handle the required load current and voltage – and that the coil current is less than 100mA.

If attempting to switch mains voltage/current – contact a licensed electrician. Your life is worth more than the money saved by not consulting an expert.

And here is the schematic (large version):

simplerfidschematic

Here is the prototype on the solderless breadboard. For demonstration purposes an LED has been substituted for the transistor/relay section of the circuit, the power regulator circuitry has not been shown, and there are superfluous 4.7k resistors on the I2C bus. To program the software (Arduino sketch) the easiest way is by inserting the target IC into an Arduino-compatible board, or via a 5V FTDI cable and a basic circuit as described here.

rfidbboardss

The Arduino sketch is also quite simple. The main loop calls the procedure readTags() to process any RFID tag read attempts, and then monitors button A – if pressed, the function learnTags() is called to allow memorisation of new RFID tags. Each tag serial number consists of 14 decimal numbers, and these are stored in the EEPROM sequentially. That is, the first tag’s serial number occupies memory positions 0~13, the second tag’s serial number occupies memory position 14~28, and so on. Two functions are used to read and write tag serial numbers to the EEPROM – readEEPROMtag() and writeEEPROMtag().

The EEPROM is controlled via the I2C bus. For a tutorial about Arduino, I2C bus and the EEPROM please read this article. For a tutorial about Arduino and RFID, please read this article. The rest of the sketch is pretty self-explanatory. Just follow it along and you can see how it works. You can download the sketch from hereAnd finally, a quick video demonstration:

So there you have it. I hope you enjoyed reading about this small project and perhaps gained some use for it of your own or sparked some other ideas in your imagination that you can turn into reality.

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 hardware hacking, learning electronics, microcontrollers, projects, RDM630, RDM6300, rfidComments (12)

Kit Review – MDC Bare-bones Board Kit (Arduino-compatible)

Hello readers

Today we continue to examine Arduino-compatible products by assembling an interesting kit from Modern Device Company – their “Bare Bones Board” (to be referred to as BBB). The BBB kit is an inexpensive way to take advantage of the Arduino Duemilanove-compatible platform, and also fills some gaps in the marketplace. Unlike the usual Arduino and compatible boards, the BBB does not maintain the recognisable form factor – that is, you cannot use the variety of Arduino shields. However, the BBB does have all the input and output connections, just in different positions.

So why would you use this kit? If you are looking to create a more permanent Arduino-based project that did not require a shield, and you are in a hurry – the BBB could be easily integrated into your design. Money is saved by not having the usual USB connection, so uploading your sketch is achieved using a 5V FTDI cable or using another Arduino board as the programmer.

Furthermore, the PCB is designed in a way that allows you to plug the BBB into the side of a solderless breadboard, which allows prototyping more complex Arduino-based circuits very easy. But more about that later. For now, let’s have a look at construction. An excellent set of instructions and a guide to use is available for download here.

In the spirit of saving money, the kit arrives in a plastic bag of sorts:

packagingss1

And upon emptying the contents, the following parts are introduced:

partsss2

Regular readers would know that the inclusion of an IC socket makes me very happy. The PCB is thicker than average and has a great silk-screen which makes following instructions almost unnecessary. One of the benefits of this kit is the ability to connect as little or as many I/O or programming pins as required.

And for the pins A0~A5, 5V, GND and AREF you are provided with header pins and a socket, allowing you to choose. Or you could just solder directly into the board. These pins are available on the bottom-left of the PCB. However there was one tiny surprise included with the parts:

rawinductor

This is a 15uH SMD inductor, used to reduce noise on the analog/digital section. According to the instructions, this was originally required with Arduino-style boards that used the ATmega168 microcontroller – however the BBB now includes the current ATmega328 which does not require the inductor. However, it is good to get some SMD practice, so I soldered it in first:

solder1ss1

Well it works, so that was a success. Soldering the rest of the main components was quite simple, thanks to the markings on the PCB. The key is to start with the lowest-profile (height) components (such as that pesky inductor) and work your way up to the largest. For example:

solder2ss1

As you can see from the PCB close-up above, you can have control over many attributes of your board. Please note that the revision-E kit does include the ATmega328 microcontroller, not the older ‘168. For more permanent installations, you can solder directly into I/O pins, the power supply and so on.

Speaking of power, the included power regulator IC for use with the DC input has quite a low current rating – 250 mA (below left). For my use, this board will see duty in a breadboard, and also a 5V supply for the rest of the circuit, so more current will be required. Thankfully the PCB has the space and pin spacing for a 7805 5V 1A regulator (below right), so I installed my own 7805 instead:

regulators

Finally, to make my Arduino-breadboarding life easier I installed the sockets for the analogue I/O, the DC socket and a row of header pins for the digital I/O. Below is my finished example connected into a breadboard blinking some LEDs:

finishedonbbss

In this example, the board is being powered from the 5V that comes along the FTDI cable. If doing so yourself, don’t forget that there is a maximum of 500 mA available from a USB port. If you need more current (and have installed the 7805 voltage regulator) make use of the DC socket, and set the PCB power select jumper to EXT. For a better look at the kit in action, here is a short video clip:

As you can see from the various angles shown in the video, there are many points on the PCB to which you can use for power, ground, I/O connection and so on. As illustrated at the beginning of this article, a variety of header pins are included with the kit. And please note that the LED on the board is not wired into D13 as other Arduino-type boards have been… the BBB’s LED is just an “on” indicator.

However if you are using this type of kit, you most likely will not need to blink a solitary LED. However some people do use the D13 LED for trouble-shooting, so perhaps you will need it after all. Each to their own!

In conclusion, the BBB is another successful method of prototyping with the Arduino system. The kit was of a good quality, included everything required to get working the first time, and is quite inexpensive if you have a 5V FTDI cable or an Arduino Duemilanove/Uno or compatible board for sketch uploading.

Once again, thank you for reading this kit review, and I look forward to your comments and so on. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, and if you have any questions – why not join our Google Group? It’s free and we’re all there to learn and help each other.

High resolution photos are available on flickr.

[Note – this kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, bare bones board, kit review, learning electronics, microcontrollers, modern devicesComments (4)

Kit review: Freetronics KitTen Arduino-compatible board

Hello everyone

Within this article we are going to examine another new kit available from Freetronics, a company formed to provide many interesting Arduino-based products after the publication of the book “Practical Arduino” by Jonathan Oxer and Hugh Blemings – which in itself is a good read, there are many interesting projects to make and learn from.

Today we examine their answer to “is there a kit version of the TwentyTen Arduino Duemilanove-compatible board?” – by assembling their KitTen. Some people may be wondering why one would want to build a KitTen instead of an assembled unit. Personally I could think of the following reasons:

  • It’s fun to make something and see it work;
  • You can save over Au$10;
  • There are a lot more smoothing capacitors in the KitTen design than normal boards;
  • There is a dedicated 3.3V 100 milliamp power regulator (twice the current of the usual board’s 50mA supply)  – ideal for running thirsty shields that need a native 3.3V;
  • The board is for a project that needs to use a modified version of the TwentyTen/Duemilanove;
  • You want a board with a native serial instead of USB interface;
  • All that lovely prototyping area above the microcontroller;
  • The power light and LED for D13 are always visible due to their location on the edge of the PCB;
  • You could solder in your microcontroller to avoid theft – great for school and public use (Yes, this has happened)…

And so on. Moving forward, opening the KitTen package reveals the following:

contents1ss

Once again with a Freetronics kit, all instructions are included in colour, as well as the circuit schematic and another sheet explaining how the KitTen will work with Arduino systems and the specifications. The PCB is solder-masked and silk-screened with a very informative layout:

pcbss1

The rest of the included components shipped in an anti-static bag, including labelled resistors and an IC socket for the microcontroller:

contents2ss

By following the included detailed instructions, everything went well. The layout on the PCB is detailed with all component values, which makes life easier. Starting with the low-profile components:

solder1ss

… followed by higher-profile components such as the IC socket and capacitors:

solder2ss

… and finally the shield sockets. Instead of trying to balance them, it is a lot quicker to place the sockets on an existing Arduino shield, turn it over, drop the KitTen on top then solder the pins in:

solder3ss

Then finally we are finished:

finishedss1

There are a couple of things to watch out for when using your KitTen. The first is to make sure you have the power-select jumper fitted correctly:

powerselectjumperss

Place it on the left pins (as above) to power your KitTen from the FTDI cable; place the jumper on the right pins to power from the DC socket. You should use a power supply of between 9 to 12 volts DC at one amp. The second item to take care with is the blue power LED. The supplied model was so bright it was like staring into the sun. You may wish to test your own one and possibly replace it for a duller version, or use some fine sandpaper to reduce the brightness of the included LED. To upload sketches to your KitTen you will need a 5 volt FTDI cable. As mentioned above, this can also power your board as well.

Overall, this is an excellent kit, and considering the price of doing it yourself – good value as well. To get your hands on this product– visit Freetronics’ website, or your local reseller.

Remember, if you have any questions about these modules please contact Freetronics via their website.

Higher resolution images available on flickr.

[Note – the kit assembled in this article was received from Freetronics for review purposes]

Posted in arduino, kit reviewComments (0)

January 2011 Competition

Competition over. 🙂

Posted in arduino, competition

Kit Review – Sparkfun “Simon Game”

Hello everyone

Time for a fun kit review. Aren’t all kit reviews fun? I think so, however sometimes kits can be very practical in use and perhaps not fun – unlike this little monkey. Some of you, including myself, may have childhood memories of the computer game unit from Milton-Bradley called the “Simon”. As demonstrated by the children in this video clip, Simon was a noisy game with four illuminated buttons, your task being to mimic the ever-increasing pattern of flashing buttons and matching sounds:

At first it looks easy, and it is –  however after a few repetitions the length of pattern increases and becomes more complex, forcing you to use your brain and take notice. Some would say it is useful for brain training as well.  This can only be a good thing… which brings me to this kit. The packaging is very good for a change, something you could give as a gift to a non-technical person. That is,  you could give a geek a kit in an anti-static bag, and they would understand, however a beginner may not:

boxss

The contents reveal several pleasant surprises:

partsss1

Finally – a battery-powered kit that actually includes the required power source; and not yum-cha cells, actual Duracells. Nice one Sparkfun. (If you haven’t seen that type of Duracell before, they are “trade-only” versions, generally used to deter theft). The other surprise was the inclusion of an ATmega328-PU microcontroller …

mcuss

… the exact same model as the Arduino Uno and compatible boards. Simon was starting to become more interesting every minute. But more about that later. The final object of interest is a real, live, instruction book. (You can download a copy from here). At this point you can tell this kit is made for beginners (of all ages). There is also a surface-mount component version, which people tell me is great for learning SMD work. Not for me! Good packaging, simple instructions, and a PCB that is solid and well marked out:

pcbrearss

Again, some more interesting things – what looks to be holes that would match up to an FTDI cable, in-circuit programming interface as well as some pinouts for the ATmega328.

[Update – if you’re the hacking type, it would pay to mount the IC in a socket, just in case]

However I will move forward and start the soldering. This was quite simple, just follow the guide and all is well. The instructions make a good note when a component is polarised or needs to be inserted in a certain way, very helpful for the beginner:

bottom-solderedss

and the other side was equally as simple:

top-solderedss

On this side you also need to get those AA cell clips installed. The push into their respective holes on the PCB easily, however they can be a trap to solder. Consider the following photo of one of the clips:

batt-clipss

Although the large hole in the PCB is necessary, it has left quite a gap around the wide pin. The inexperienced may end up melting lots of solder and watching it fall through to the other side; to prevent this, place the tip of your soldering iron under the acute side of the pin, and apply solder on the other side. This will force the solder to melt back onto the exposed ring on the PCB and make a good connection, instead of allowing gravity to take over the situation.

After the soldering was finished, the next task is to place the rubber button-mould over the LEDs, and then the black plastic bezel on top. The included screws go through each corner of the bezel, through the white moulding and PCB, and finally break through to the other side – where you can attach the stand-offs. Which leaves us with the final product:

finishedss1

After inserting the AA cells into their new homes, the power was turned on and the unit blinks the LEDs in a sequence until you press a button to start the game. However at this point one of the LEDs did not come on at at all. A quick check with the meter showed it was being fed almost 2.8 volts, but alas – no blinkiness. After a quick desolder/resolder job a green LED from my stock made a replacement. This would have been the only downfall for a beginner, not everyone has boxes of electronics components laying about – nor the high-intensity versions used in this kit.

However life goes on, and Simon still works just as the originals did all those years ago. Here is an example of him in action:


This is something I will need some practice on. Furthermore, the ability to control the sounds is a bonus as well; however if this Simon is aimed for small children, one could be tempted to not install the piezo transducer at all (mini speaker)! So at this stage we have an easy-to-assemble kit that is colourful, noisy and fun – a good start to help introduce another person to our fascinating world of electronics.

But wait – there’s more! Now it is time to revisit those programming holes and see what other secondary uses we can find for Simon. Seeing one of the LEDs isn’t the brightest, I will keep this one for myself, and experiment further. Therefore, the next thing to do to is solder in some header pins to allow connection to an FTDI cable:

simonftdiss

This cable converts the USB interface down to serial line levels suitable for our Simon, in the same way as the FTDI chip does for the Arduino boards (except the Uno). At this point please note you’re on your own, so if you fritz your Simon don’t take it out on me! With hindsight it would be a good idea to use an IC socket for the microcontroller.

Looking at the schematic, we can determine the pins for the LEDs, buttons and so on. The included ATmega328 has the serial bootloader for Arduino programming, so we can have a lot of easily-generated fun with it. However, note that the board does not have an external crystal or oscillator, so timing may not be as accurate as expected.

Disclaimer  – this worked for me, however your experience may vary. Alter your Simon at your own risk!

Anyhow, to use with the Arduino environment, insert the AA cells, plug in your FTDI cable, and select the board type in the environment:

arduinosetupss

Select the second option Arduino Duemilanove or Nano w/ ATmega328. Now you can upload sketches as you would a normal board. The setup functions for the LEDs are:

and for the buttons:

So armed with that knowledge you could create some  custom interactivity with your Simon hardware. If you are unsure about Arduino programming, there is a small tutorial over here that you will find helpful.

Update – New post from Sparkfun about modding your Simon. High resolution images are available on flickr. You can purchase the kit directly from Sparkfun and their resellers. As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts. Or join our Google Group.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, games, kit review, KIT-10547, KIT-10935, learning electronics, microcontrollers, simonComments (2)

Project – Let’s make Electronic Dice

In this project we make electronic dice.

Updated 18/03/2013

In this article you can learn how to make an electronic die (die is the singular of dice), using an ATmega328 with Arduino bootloader and a few inexpensive components. The reason for doing this is to introduce another object that you can build, learn from and be proud of. It is a fairly simple procedure, and at the end you will have something that is useful for a long time to come. Again this article will be a design-narrative, so please read it in full before making a die yourself.

First of all, here is a photo of my finished product.

finishedssss1

Naturally the cosmetic design is up to you, I have used this box, LEDs and switches as they were already in my stock of parts. The die is quite a simple design – with a twist. Inside the unit is a mercury switch. This consists of a small glass tube with two wires at one end and a small amount of mercury. When the mercury rolls over the wires, they are shorted out. Just like a push button when it is pushed, for example:

tiltdemoss

 

We will make use of this switch to start the die “rolling” – to simulate the use of a non-electronic, under-engineered wooden die. For safety, I will be using a mercury switch that is enclosed with plastic:

tiltswitchss

Over the last few years several people have contacted me saying “don’t use mercury switches”. Fair enough, if you don’t want to either, use element-14  part number 540614.

First of all, the circuit is assembled on a breadboard using our Eleven Arduino-compatible board. There is no need to build the complete independent circuit yet, as we just want to test the aspects of the sketch, and try various LEDs out. I have some bright blue ones which match with the blue housing:

bboard1ss

There is a function in the sketch (below) called

which is used to display the numbers 1 to 6. The following video is a demonstration of this:

The sketch is quite simple – you can download it from here. Once the behaviour of the die met my expectation, I used my ZIF-socket programming board to upload the sketch into a nice fresh ATmega328 with bootloader. One could also add a piezo buzzer for sound effects, as described in sketch. This will end up being a birthday present for a young niece, so I have omitted the sound effects.

Next,  time to rebuild the circuit on the breadboard – using the bootrom and not our Eleven. Here is the schematic:

dieschematicss

and the resulting layout:

prototypess

And it works! Things are starting to come together now. As usual I was curious about the current draw, as this helps me determine how long the battery will last. On standby it draws between 10 and 20 milliamps, and between 30 and 40 milliamps when displaying numbers.

By now you probably would like to see it work, so here is the prototype demonstration:

Now it is your turn… from a hardware perspective, we will need the following:

  • IC1 – ATmega328 with Arduino bootloader programmed with the sketch
  • IC2 – LM78L05 voltage regulator – note that with the front facing you, pins are 1-output, 2-GND, 3-input
  • D1-D7 – LEDs of your choosing
  • R1, R9: 10 kilo ohm resistors
  • R2-R8: 560 ohm resistors
  • X1 – 16 MHz resonator – centre pin to ground, outside pins to IC1 pins 9 and 10
  • small piece of protoboard
  • SW1 – on/off button
  • SW2 – mercury tilt switch
  • 9V PP3 battery and snap
  • optional – 28-pin IC socket
  • a nice case, but not too large
  • some thin heatshrink
  • some sponge or insulating foam which has a width and length slightly larger than the protoboard

The ideal housing would be one that fits in the palm of your hand. However, such miniaturisation levels are quite difficult in the home workshop. The biggest problem (literally) was the power supply. The only battery with the voltage and a decent amp-hour rating was the 9V PP3. Alkaline models are usually good for 500 to 625 mAh, and should power the die for about ten hours of continuous use. Furthermore, whilst running the prototype on the breadboard, it would function down to 6 volts, however the LEDs were a little dim – but still perfectly usable. However I managed to squeeze it all in – sans the IC socket.

So if you are like me, and soldering the IC in directly – make sure you are happy with your sketch!

Anyhow, time to start the hardware work of assembly. Using veroboard/protoboard is easy if you plan things out first.

Remember – to fail to plan is to plan to fail

So in this case, I like to get some graph paper and draw out the tracks with a highlighter, such as:

templatess

My diagram shows the tracks as they would be on the rear of the veroboard. With this, using a pencil one can mark out component placement, links, and where to cut tracks if necessary. Those long lines are great for +5V and ground. Etcetera. When you have laid out the parts, go and have a break. Return and check your work, then fire up your iron and go!

Once completed you then have an easy to follow plan to solder along with. Here is the above example after I finished soldering:

after

After the soldering was completed, and the board checked for any shorts or poor-quality joints – it was time to have a clean-up and clear the mess away. Now it was time to stuff the whole lot into the housing… but it would be prudent to test the circuit beforehand. So I soldered in the tilt switch, and the battery snap, connected the battery – and it worked. Notice in the image below the placement of the centre LED – I have used some heatshrink over the legs to totally insulate them, and have it at the centre of the board:

almostdoness

Now to focus on the enclosure. In order to keep the costs down I used a box (and almost everything else) from my existing stock. It turned out to be a little small, but with some creative squeezing everything would fit. The PCB and battery are separated by a thin layer of anti-static foam, to prevent the possibility of the sharp edges of the PCB underside scratching the label of the battery and causing a short.

The final messy task was to drill the holes for the LEDs and the power switch. The switch was easy enough, just knock a small hole in then use a tapered reamer to get the exact size:

switchholess

Then to drill the holes in the lid for the LEDs to poke through. Easily done, just be sure to mark where you want the holes to be before drilling. Furthermore, you need to get the LEDs as far through the holes as possible:

ledsholess

Then the final step before sealing the lot up is to get the power wires soldered to the switch and the battery snap:

beforelidss

When you are putting everything in the box, make sure the tilt switch is tilted so that when the die is at rest, the tilt switch is laying in the off position. Otherwise the die will just merrily repeat forever until you turn it off.

finishedssss1

And of course, an action video:

Once again I hope that this demonstration has shown how easy it is for anyone with some spare time and the knowledge from my Arduino tutorials can create something from scratch.

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, atmega328, dice, games, projects, tutorialComments (4)

Project – ZIF socket Arduino-compatible board

In this tutorial we make an Arduino-compatible board that holds the microcontroller in a ZIF socket.

Updated 18/03/2013

Today we are going to make a different type of Arduino-compatible board, one that has a ZIF (“zero insertion force”) socket. Our reason for making this is simple – now and again you may need to program more than one bootrom with a sketch, for example if you were planning to make your own electronics kits that were based on the Arduino system. Your alternative would be to use a chip puller and constantly insert and remove microcontrollers from your usual Arduino or compatible board – which is bad for the board, bad for the chips (the friction and pressure on the legs, as well as possible static build-up), and bad for your wrist.

So here is our problem – we need a board with a ZIF socket:

1s

The Eleven board is great, but we just cannot squeeze in the socket. So instead, let’s make our own. Like any project, the first thing to do is plan the circuit and make a schematic:

schematicss

You have to hand it to the Arduino team, they have made things very easy for us. As we are not using this board for day to day use, all we need is enough circuitry to enable programming. In this case, the connection between the board and the PC will be made with an FTDI cable (these offer an interface between serial and the USB port):

ftdicabless

Furthermore, we will use the 5 V power supply from the USB port via the FTDI cable as well. Easy! So now it is time to collect the required parts:

3s

You will notice in the photo above there is a button, originally I was going to have a reset button, but after testing it proved unnecessary. Our required parts consist of:

  • one 28-pin ZIF socket, 0.3″ width (don’t fall into the trap of ordering the wide one)
  • An Arduino bootrom for testing, etc
  • one 16 MHz ceramic resonator (easier than using a crystal and two capacitors, timing is not critical as this is only a programming board)
  • 6-pin header strip to connect the FTDI cable to the board
  • an FTDI cable (the 5v one)
  • two 0.1uF ceramic capacitors
  • one 10k ohm resistor
  • some rubber feet (to protect your desk when using the board
  • some veroboard
  • hookup wire, some solder, and the usual tools

Before soldering away, it pays to test the circuit on a breadboard. At this stage you can test the operation, program the microcontroller, and test that microcontroller in another board:

2s1

Again, you can ignore the button. For testing purposes, I uploaded the “blink” sketch to the microcontroller, then tested that unit in the Eleven. The LED blinked as expected, so all was good. I repeated the process a few times, but uploaded a different sketch every second time, and re-inserted the bootrom between every upload. After ten cycles of doing this, I was confident with the design, so transferred the lot to the permanent veroboard:

4s1

The black marks on the board are to help me navigate, for example the arrow means the 5 V rail, etc. Now for the rear end:

5s1

There are high-resolution photos in flickr if you want to follow this design exactly.

Before using the veroboard, experience has taught me that they are always dirty and solder doesn’t take too well. If possible, try and clean your veroboard first with some cleaning spray, usually an aerosol package available from most electronics retailers. Or even just a damp cloth, then dry the board afterwards with a dry cloth. Moving on…

Before testing the completed board, please double check the routing and that you have cut the correct PCB tracks. If you are unsure about some solder joints, use the continuity function or resistance function of a multimeter to check for shorts between tracks.

After the board passed those tests, I stuck on the feet – and admired the finished product:

6s1

However, it was time to repeat the testing. If I may make a general observation, try and test things as you move along, step by step. For example, with this project, don’t skip the breadboarding step. It is important to check the design works. Don’t skip checking for solder bridges, or not double-check your routing. It is always much easier to fix a mistake when it has been made, then to have to troubleshoot a ‘completed’ project.

But at the end of the day, I now have something that is useful and will save me time during kit production (still in design stage people), making a few blinky offspring,  and prevent damaging my regular boards. High resolution images are available from flickr.

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, atmega328, COM-09420, freetronics, microcontrollers, projects, PRT-09175, tutorial, zif socketComments (6)

Kit review – Evil Mad Science Diavolino

[Updated 17/01/2013]

In this review we examine a kit from the people at Evil Mad Scientist Laboratories – their Diavolino. In English this means “little devil”. This little devil is a low-cost Arduino Duemilanove compatible board – with a few twists.

This is sold as a bare-bones kit, so you really need to plan ahead with regards to how you want to use it. It does not include a USB interface, nor power socket, header sockets, IC socket, nor a voltage regulator. This may sound like a bad thing – but it is not 🙂 This kit is perfect for those who wish to make a permanent project using the Arduino system, without spending the extra on a whole board, and without the hassles of making your own barebones PCB version. So let’s have a look… the kit ships in a nice reusable anti-static bag:

bagsss

and upon turfing out the contents, one receives:

partsss

Which is just enough to have a basic setup. The instructions on their web site mention the inclusion of some zero-ohm resistors to be used as jumpers, but these were not included. However that is a non-issue, some resistor lead clippings will do the job. EML have gone to a lot of trouble with the printed-circuit board. It certainly is different to the normal green or blue ones out there. It is very well detailed with component position labels, and all components are through-hole. The other side of the board is also printed this way:

rearpcbsss

There is also a nice instruction laminated card included in the bag which has enough information to get your started. Furthermore, there is an excellent instruction manual available for download here (10 MB). Finally, this is an open-source hardware product, so the designers have also made available the gEDA CAD files.

Now for assembly. Normally I would photograph each step, however the instructions available for download are so good, I won’t need to 🙂 Eleven out of ten for the instructions. Soldering it together is quite easy, however I did supply my own IC socket – I am just not a fan of soldering expensive parts (I get the shakes sometimes), however if you are confident, go for it.

Before deciding to permanently solder in that microcontroller, you will first need to take into account how you will be programming it. As the board does not support the usual native USB interfacing, you can’t just plug in the cable like a normal board. The Diavolino does have an interface for a TTL-level cable – so if you have (for example) a USB FTDI cable, you can program it via the USB port. But considering an FTDI cable is around $20, you might as well just buy a normal board like an Eleven instead. It only took around fifteen minutes to get to this stage:

almostsss

For my personal use as another bench-based board  (that sounds a little odd…) I will power it from the FTDI cable, so a link is required behind the TTL input pins – as well as adding the  6-pin and 8-pin header sockets. The easiest way to solder those in is to turn the whole thing upside down and plug it on top of an existing shield, as such:

socketsss

However if you don’t want to buy an FTDI cable – and you already have another Duemilanove board, the cheapest way to program the microcontroller is to just insert it into a  Duemilanove-type board, upload the sketch, then drop the chip into the Diavolino.

You also need to decide on how to power the board. If you supply 4.5~5.5V, all you need is to feed in the power wires. If you are going to use more than 7V, you will need a 78L05 power regulator, 10uF electrolytic capacitor and a DC socket to use a plug-pack if necessary (see the instructions). However, a 78L05 can only supply 100 mA of current (see the data sheet.pdf), so you won’t be able to use some products like a MAX7219 LED driver and many LEDs.

Unfortunately there isn’t enough space for a TO-220 sized 7805 1 amp regulator, so you will need to introduce 5V using an external supply hard-wired into the board if you need more than 100mA of current. Or you can power it from the USB FTDI cable for desktop use.

finishedss

 

So there you have it – another successful kit build. This was an interesting alternative to the Duemilanove, and a great solution for a permanent project, or for someone who wants another board on the cheap. If you can work with the power supply current restrictions, all is well. So get one or more, have fun with it, and give one  to someone else to get them cooking as well.

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.
[Note – this kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, diavolino, evil mad science, kit reviewComments (0)

Getting Started with Arduino – Chapter Ten

This is part of a series titled “Getting Started with Arduino!” by John Boxall – A tutorial on the Arduino universe. The first chapter is here, the index is here.

In this tutorial we’ll minimise an Arduino Uno board, use time to control – and then find some synergy between the two.

As time goes by, you will want to build projects to use away from the bench, or that are permanent. Although doing so is infinitely fun, it can become expensive if you keep buying Arduino boards for each project or proof-of-concept prototype, or even finished products. However, as always, the Arduino team have solved this problem for us as well. The actual microcontroller integrated circuit (e.g. ATmega328P-PU) can operate with a lot less circuitry than that is contained on your Uno or compatible board. In fact, you can have a functioning Arduino system with three components and a 5V power supply.

How?

To start, please download the Uno schematic from here. Upon glancing at it for the first time, there seems to be a lot of things required. However if you just want to use the digital and analogue pins, you can cut that schematic down to a lot less, however you need to make a couple of changes to how you upload the sketch. Here is what you can get away with:

example10p1schematicsmall

X1 is the 16 MHz resonator. Using only the main circuit on the left, to upload your sketch you need to place the ATmega chip in your Arduino board, upload the sketch, then very carefully remove the chip and place it into your circuit, breadboard, etc. Please make sure to observe anti-static precautions, and always use a chip puller (below):

pullersmall

Furthermore, if you only have one chip, it would be very wise to have a second or third as a backup. A programmed ATmega with the Arduino bootloader can be had for less than US$6. Below is a shot of my barebones Arduino system at work. It is setup to run this basic example:

worksbarebonessmall

The blue and yellow wires run off to a 5 volt power supply. And here is it working:

To recreate this at home, you will need:

  • One ATmega328P-PU microcontroller with Arduino bootrom
  • solderless breadboard
  • 10k ohm resistor
  • 16 MHz resonator
  • (optional – for USB cable) 6-pin header pin
  • (optional – for USB cable) 0.1 uF ceramic capacitor
  • (optional – for USB cable) FTDI cable (the 5 volt version!)

A note about the resonator. Your Arduino board will most likely have a metal crystal, however a resonator is a little cheaper and easier to use, as it has the capacitors in built. If you look at the Arduino schematic, they use a crystal and two 22 picofarad capacitors. So if you use the resonator, pins 1 and 3 go to chip pins 9 and 10, and resonator pin 2 goes to GND. Here is the data sheet for the resonator. They should be easily available, for example from here. The USB cable option will make life a lot easier. The cable is called an FTDI cable, and contains the electronics within to interface between the USB port on your computer and the TX/RX pins on the microcontroller. The wiring details are in the schematic above.

The cable also supplies power whilst programming, or leaving the cable plugged in. Here is my board with the extra wiring connected:

worksftdismall

So if you have this kind of setup, you can just plug the cable into the computer USB port and upload sketches as normal. However there are some modifications that may need to be done with your computer’s operating system to make it work. If you are running Linux or MacOS, please visit here; if you are running windows of some sort, go to device manager, right click the USB serial port you are using, select properties, port-settings tab, advanced, and turn on set RTS on Close.

When purchasing an FTDI cable – make sure you get the 5 volt version!

So now you can integrate the Arduino chip into your prototypes much easier and cheaper. However, if you are going to use SPI or I2C devices, more circuitry will be required. We will examine creating these interfaces in more detail later. A good compromise in this situation is a miniature Arduino-compatible board such as the Freetronics LeoStick.

If you are interested in a project using such a barebones setup, please have a look at blinky the clock.

ic-border

Next on the agenda is a small project to consolidate some previous learning. At the end of chapter nine, we made a (relatively) user friendly clock with an alarm. And in chapter three, we controlled a relay with our arduino. So now we have the ability to create our own on/off timer of which possible uses could be limitless.

In doing so, we can start by modifying the sketch from exercise 9.3. It has the ability to set an alarm time (let’s call it a start time from now on), so we can add the ability to set an end time – it just requires some more variable to store the end time data, and another menu function to set these. Finally, another function is required to check if it is time to turn off (basically identical to the checkalarm() function.

The hardware side of things for the example will be quite simple as well, below is my schematic, and the basic board:

example10p2

example10p2boardsmall

 

 

I am using 12v relays as currently that is all I have in stock. The 12V power supply is just an LM7812 regulator from a 20V DC plugpack. For demonstration purposes any low-voltage relay would be fine. A 5V relay would be perfect as you could run it from the Arduino’s 5V rail.

Note: From here on you understand that one can use an Arduino to switch a very high current and/or voltage with some relays. Please exercise care and consult a qualified, licensed person if you are working with mains voltage (100~250V AC… the stuff that comes out of power points/outlets). They can KILL you!

So for this example, I have modified the sketch as described earlier to accept a start time, end time, and display relevant data on the screen. It will switch on and off the relay, which controls a light globe drawing 100mA – 5 times the current an Arduino digital out pin can deliver. It only operates using 24-hour time, to save user confusion. You could control anything as long as you do not exceed the current and voltage maximums for your particular relay.

So here it is in action. The time has already been set previously, so you can watch the setting of the on/off time, and watch it in action. You can skip ahead from 01:03s to 01:48s to save time.

and here is the sketch for your perusal.

As as example the user interface wasn’t that flash, but naturally it can be worked on to be more intuitive. So now it is your chance to do so, with…

Exercise 10.1

Create a timing system for a hypothetical lighting system that controls two independent circuits. Each timer can turn on or off at a specified time, either daily, only on weekdays, only on a certain day of the week (e.g. only Fridays) or only on weekends. The menu system should be easy and quick to use.

For the purpose of the exercise, you can switch on or off an LED to represent each lighting circuit – you already know how to use the relays.

You will need:

  • Your standard Arduino setup (computer, cable, Uno or compatible)
  • Two usual LEDs of your choice
  • 2 x 560 ohm 0.25 W resistors. For use as current limiters between the LEDs and ground
  • 1 x 10k resistor
  • one push button
  • a breadboard and some connecting wire
  • some water
  • DS1307 timer IC circuit components (see this schematic from chapter seven) or a pre-built module
  • one 10k linear potentiometer
  • LCD module as per chapter two

Here are some videos of my interpretation. To save time I have not connected the LEDs, however timer running status is indicated on the second line of the display – an “!” is shown when a circuit has been activated. The first video shows setting the real time, timer data and displaying the results:

and the sketch.

How did you go? With a little more hardware this exercise could become a real product – you could control sprinkler systems instead of lights, thermostats, anything is really possible. Having a larger LCD screen would help with the user interface, perhaps a 20 character by 4 line unit. As long as such a screen has the standard HD44780 interface, you would be fine. Now on to Chapter Eleven

LEDborder

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, or join our 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, barebones, breadboard, education, microcontrollers, relayComments (17)


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: