Today we are going to examine the Macetech Shiftbrite modules. These are high-powered RGB LEDs that are mounted on a small PCB with a controller IC that you can control easily with an AVR or Arduino system, with a brightness of 8800 mcd per colour, and a viewing angle of 140 degrees. Ouch! In this review we will be using the Arduino system, however there is AVR instructions and a demonstration available here. First of all, here is one example:
You can order Shiftbrites with and without header pins. The IC on the bottom of the unit is an Allegro A6281 three-channel constant current LED driver with programmable pulse-width modulation control. For interest, here is the data sheet: Allegro 6281.pdf In other words, it takes care of which LED segment(s)to illuminate, their brightness, and for how long. It sounds like a lot but is easy to understand.
The name Shiftbrite is a bit of a giveaway to how it actually works. It is very bright – looking at it directly during operation is dangerous, and the shift relates to how the control data is used by the modules. To put it simply they are 32-bit shift registers with an RGB LED attached… so all you need to do is have 32 bits of data sent to them – in a similar method just like a 74HC595 shift register. The good thing about this is you can control more than one Shiftbrite using a daisy-chain method – with a catch. If you have, say, three in a row and you only want to change the second Shiftbrite, you need to send out data to refresh all three of them. But don’t panic, doing so is quite easy.
There are two concepts to understand to effectively use a Shiftbrite – pulse width modulation and how colours are represented digitally. PWM is quite easy with LEDs, it is a method of controlling the brightness by switching them on and off rapidly to give the illusion of brightness. For example, at full PWM, the LED is on… at 50 % the LED is on for 50% of the time, and off for 50% of the time. Below is a demonstration of PWM from another article:
Representing colours digitally is also easy. As you may know, colours can be created by mixing the primary colours red, green and blue. With the Shiftbrite each primary colour can have a value of between zero (off) and 1023 (full). Say for example, you only want red – so you set the data to be: red – 1023, green – zero, blue zero. And so on. For a very good explanation on how this works please visit this site. The Shiftbrite uses 10 bits of data for each colour, allowing a range of resulting colours in the billions. So let’s get blinking…
Here is an example sketch from the Macetech website: demo1.pdf. Connection to the board is very easy, just 5V and GND, and the four data lines:
The only concern when running Shiftbrites is their power consumption. One unit will use 20 mA per primary colour, which is fine for an Arduino or compatible board. However if you are using two or more, you will need to supply an external power supply to the Shiftbrites, between 5.5 and 9 volts, and 60 mA per module. Moving on, here is a video of one Shiftbrite in action, just rotating between red, green and blue:
That is bright. The only thing better than one Shiftbrite is two, so here you are. In the second demonstration, we are using the same sketch as in the first. So the second Shiftbrite is reacting to the data as shifted out by the first when it receives new data:
So now for some more colours. Using the following sketch demo 2.pdf the Shiftbrite generates shades of primary colours, then all the colours randomly. This time to save my eyesight it uses the ping-pong ball diffuser from the blinky project:
Well I hope you found this review interesting, and helped you think of something new to make. In conclusion I would consider the Shiftbrite great for use in projects where you need the blinking and display fun of RGB LEDs, but with a greater brightness. You can purchase Shiftbrites and a range of fun stuff from Little Bird Electronics.
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 new Google Group.
[Note - The Shiftbrites were purchased by myself personally and reviewed without notifying the manufacturer or retailer]
Otherwise, have fun, be good to each other – and make something!
In this review we examine an easy to build kit from adafruit industries that offers literally hours and hours of fun, if you like to get up to some mischief – the TV-B-Gone. This fascinating little device is basically an infra-red remote control for televisions and some monitors. It has a microcontroller programmed with the “off” code for a wide range of display brands, and four very strong infra-red transmitting LEDs, two with a wide beam, and two with a narrow but longer beam.
Here is the little culprit in standard assembled form:
It is a very easy kit to assemble, once again the team at adafruit have published an extensive amount of information, from assembly tutorials to how it works, and even the design itself as the kit is open-source hardware. So in this article you can follow the assembly, and use of this bag of fun.
As usual, this kit arrives in a resealable, anti-static bag. After ensuring I had the correct parts, from the documentation on the adafruit website, it was time to follow the simple instructions and start getting it together. Now this will be the second time I have built a TV-B-Gone… the first one is in the photo above, and had me removed from a department store (thanks Myer…) – so this time I am rebuilding it to fit inside a typical baseball cap.
Soldering it was quite simple, the PCB is solder-masked and has a very well detailed silk-screen:
Just following the instructions, and being careful not to rush is the key. Another feature of adafruit kits is that the are designed very well with regards to troubleshooting. For example, you have the opportunity to test it before finishing. So at this stage you can fit the AA cells and power it up, if the LED blinks you’re all good:
And we’re done… almost.
For installation into the hat, the button and the LEDs will need to be a distance away from the PCB. At this stage I was not sure where to put the button, so for now it can stay on the side of the cap:
Naturally you can use any momentary push button, however I will use the included example (above) with a length of wire. With this style of hat, especially a black one, slight bulges underneath the surface do not seem that apparent, however it is wiser to spread out the entire unit:
Although thinner AAA cells could be used for the power supply, for a good day’s action you will want the extra capacity of AA cells, so we’ll stick with them for now. The next step was to wire up the LEDs. They were connected individually to the PCB with lengths of wire, and heatshrink was used to insulate and darken the legs:
And finally the finished product, ready for insertion into a piece of clothing, or in our case – a cap:
At this point it was time to take it for a test toast. The quickest way to test an infra-red transmitter is to look at the LEDs through a digital camera – it can display the infra-red wavelengths whereas the human eye cannot see them. For example:
Those LEDs can get very bright (in infra-red terms), and is also how night-illumination for digital security cameras work. If you had a lot of those LEDs pointing at a security camera at night, you could blind it. That gives me an idea…
Assembling the kit in this format gives you lots of options for hiding it. For example, you could:
- put the PCB and power in a jacket’s inside pocket, and have the LEDs poke out the neck;
- place them in a cap as we are;
- use a large ladies’ handbag, with the LEDs out the top, and the button underneath a handle;
- sew the LEDs into the head-cover of a hooded jacket (with some longer leads) and have the PCB, power and button in the pockets
So here are the LEDs mounted under the brim of the cap.
If you are going to staple them in, be careful not to puncture the wires. The ends of the staple should come through to the top of the brim – in this case I covered them with black ink from a felt pen so they would blend in. The button lead’s position is down to personal preference, in my case the button is just poking out next to the strap on the back of the cap. So all I need to do is appear to scratch the back of my head to activate the TV-B-Gone.
And here is the finished product, with an unfinished author:
Well by now you want to see it working. So here you are… I went on a field trip wandering about the central business district of Brisbane, Australia:
My apologies for the shaky footage, doing this isn’t something you can really capture with a camera and a tripod. The problem was getting close enough, or most places had either covered their IR receiver, had a brand of TV not recognised by the TV-B-Gone, or used a large monitor instead of a television. But it was fun nevertheless.
In conclusion, this is an easy to assemble kit which is fun and certainly will get you into harmless trouble. Again, this is the type of kit that would be good for those who are being introduced to the fascinating world of electronics (etc) as it is quick to build, and does something with the “real world” that young people love so much. Or anyone else for that matter.
As much fun as it is to switch off televisions and advertising monitors, I would hope that end users will still be responsible with their TV-B-Gone use. Please head into a department store, your favourite eatery, coffee shop or mall and switch off the TVs. However, please do not turn off displays in railway stations, airports or other places where the authorities will take offence. You will get in real trouble. Or if you’re feeling suicidal, go switch off the TVs at the OTB.
Today we are going to explore the use of the Inductor. This is a continuation from the series of articles on alternating current. An inductor is a component that can resist changes in AC current, and store energy in a magnetic field from a current that passes through it. A changing current (AC) causes a changing magnetic field which induces a voltage that opposes the current produced by the magnetic field. This is known as the inductance. One could think of an inductor as an AC resistor. But first of all, what is an inductor comprised of?
In simple terms an inductor is a coil of wire, wrapped around a core. The core forms a support for the coil of wire – such as ceramic cores, or in some cases can affect the properties of the magnetic field depending on the chemical composition of the core. These may include cores formed from ferrite (usually zinc and manganese, or zinc and nickel) or powdered iron (which has a tiny air gap allowing the core to store a higher level of magnetic flux (the measure of magnetic field strength)- allowing a higher level of DC current to flow through before becoming saturated.
So, the amount of inductance is influenced by several factors – the core material (as above), the size and shape of the core, as well as the number of turns of wire in the coil and its shape. The unit of inductance is the henry (H), however common values are usually in the millihenry (mH) or microhenry (uH) range.
Furthermore, there is an amount of DC resistance due to the properties of the coil wire, however this is usually negligible and kept to a minimum. For example, looking at a data sheet for a typical line of inductors – inductors.pdf – the DC resistance of a 10uH inductor is a maximum of 0.05 ohms. With inductors of higher values, the DC resistance will need to be taken account of. But more about that later.
However this may also be used:
And here is a variety of inductors in the flesh:
All of the pictured inductors have an inductance of 10 uH.
Now let’s examine how inductors work with alternating current. Consider the following circuit:
Just like capacitors in AC circuits, an inductor has a calculable reactance. The formula for the reactance (X, in ohms) of an inductor is:
where f is the frequency of the AC and L is the value of the inductor in Henries (remember that 1uH is 10 to the power of -6).
Question – What value is the inductor sold by Little Bird Electronics?
The formula to calculate the impedance of the above circuit is:
where Z is in ohms. And finally, the formula for AC Vout is
The formula for DC Vout is the usual voltage dividing formula. In this case, as we consider the inductor to not have any resistance, DC Vout = DC Vin.
So, let’s work through an example. Our DC Vin is 12 volts, with a 2V peak to peak AC signal, at a frequency of 20 kHz. The resistor R has a value of 1 kilo ohm, and the inductor L is 10 millihenries (0.01 H). A quick check of the data sheet shows that the 10 mH inductor has a resistance that cannot be ignored – 37.4 ohms. So this must be taken into account when calculating the DC Vout. Therefore we can consider the inductor to be a 37.4 ohm resistor when calculating the DC Vout, which gives us a result of 11.56 volts DC.
Substituting the other values gives us a reduced AC signal voltage of 1.24 volts peak to peak.
Another interesting fact is that there is a relationship between AC Vout and the frequency of the AC signal. In the video below, I have used a 10k ohm resistor and a 10 uH inductor in the circuit described above. The frequency counter is measuring the frequency of AC Vin, and the multimeter is measuring the AC Vout:
This is an interesting relationship and demonstrates how an inductor can resist alternating current, depending on the frequency.
Thus ends our introduction to the inductor. We will continue with the inductor in the near future. I hope you understood and can apply what we have discussed today. 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, you can either leave a comment below or email me – john at tronixstuff dot com.
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 and post your questions there.
Otherwise, have fun, be good to each other – and make something!
Learn how to use XBee wireless data transceivers with Arduino. This is part of a series originally titled “Getting Started with Arduino!” by John Boxall – A tutorial on the Arduino universe. The first chapter is here, the complete series is detailed here.
We will examine the Series 1 XBee wireless data transceivers from Digi in the USA. Although in the past we have experimented with the inexpensive 315MHz transmit/receive pair modules (chapter 11), they have been somewhat low in range and slow with data transmission. The XBee system changes this for the better.
First of all, what is an Xbee module? It is a very small piece of hardware that can connect wirelessly with another using the Zigbee communication protocols. There are many different models, including aerial types and power outputs. In this tutorial we’re using Series One XBees.
From Wikipedia, Zigbee is:
ZigBee is a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4-2003 standard for wireless home area networks (WHANs), such as wireless light switches with lamps, electrical meters with in-home-displays, consumer electronics equipment via short-range radio. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that require a low data rate, long battery life, and secure networking.
Phew. For this chapter I will try and keep things as simple as possible to start off with. Here is an image of a typical Xbee unit:
Note that the pin spacing is small than 2.54mm, so you cannot just drop these into a breadboard. However for the purposes of our experimenting more equipment is needed. Therefore I am making use of this retail package from Sparkfun retailers:
This bundle includes two Xbee modules, an Xbee shield to connect one of the modules to an Arduino Uno-style board. When it comes time to solder the sockets into your shield, the best way is to insert them into another shield that is upside down, then drop the new shield on top and solder. For example:
Finally, the bundle also includes a USB Explorer board, which allows us to connect one Xbee to a personal computer. This allows us to display serial data received by the Xbee using terminal software on the PC. One can also adjust certain Xbee hardware parameters by using the explorer board such software.
Let’s do that now. You will need some terminal software loaded on your computer. For example, Hyperterminal or Realterm. Plug an Xbee into the explorer board, and that into your PC via a USB cable. Determine which port (for example COM2:) it is using with your operating system, then create a new terminal connection. Set he connection to 9600 speed, 8 bits, no parity, 1 stop bit and hardware flow control. For example, in Hyperterminal this would look like:
Once you have established the connection, press “+++” (that is, plus three times, don’t press enter) and wait. The terminal screen should display “OK”. This means you are in the XBee configuration mode, where we can check the settings and change some parameters of the module. Enter “ATID” and press enter. The terminal window should display a four-digit number, which is the network ID of the module. It should be set by default to 3332. Unless you plan on creating a huge mesh network anytime soon, leave it be. To be sure your modules will talk to each other, repeat this process with your other XBee and make sure it also returns 3332. However as this is the default value, they should be fine.
Now for our first example of data transmission, insert one Xbee into the explorer module, and the other into the Xbee shield. With regards to the Xbee shield – whenever it is connected to an Arduino board and you about to upload a sketch, look for a tiny switch and change it to DLINE from UART. Don’t forget to change it back after uploading the sketch. See:
We are going to use the two Xbee modules as a straight, one-way serial line. That is, send some data out of the TX pin on the transmit board, and receive it into the terminal on the PC. Now upload this sketch into your Arduino board. This is a simple sketch, it just sends numbers out via the serial output. Then set the switch on the shield back to UART, and reset the board. If you can, run this board on external power and put it away from the desk, to give you the feeling that this is working
Note: More often that not one can purchase AC plug packs that have USB sockets in them, for charging fruity music players, and so on.
Or you might have received one as a mobile phone charger. These are great for powering Arduino boards without using a PC.
Now ensure your explorer module is plugged in, and use the terminal software to connect to the port the explorer is plugged into. After connecting, you should be presented with a scrolling list of numbers from 0 to 99, as per example 14.1 sketch:
How did you go? Sometimes I used to get the COM: ports mixed up on the PC, so that is something to keep track of. If you are powering both Xbees from your PC using USB cables, double-check the terminal software is looking at the explorer board, as an Arduino transmitting serial data through an Xbee shield will still send the same data back to the PC via USB.
Now that we have sent data in one direction, we can start to harness the true power of Xbees – they are transceivers, i.e. send and receive data.
We will create an on-demand temperature and light-level sensor. Our arduino board will have a temperature sensor and a light-dependent resistor, and using the terminal on the computer, we can request a temperature or light-level reading from the remote board. More about temperature sensors in chapter two. First of all, the remote board hardware setup:
… and the schematic:
It never hurts to elevate your other Xbee:
For the PC side of things, use the explorer board and USB cable. Here is the sketch. It is quite simple. The remote board ‘listens’ to its serial in line. If it receives a “1″, it reads the temperature, converts it to Celsius and Fahrenheit, and writes the result to its serial out line, which is sent over our Xbee data bridge and received by the host computer. A “2″ will result in the analogue value of the photocell to be sent back as a “light level”. Once again we use the terminal software to control the system. Here is a quick video of the terminal in action:
The speed is quite good, almost instantaneous. By now hopefully you can see how easy it is to end some data backwards and forwards over the ether. The range is only limited by the obstacles between the Xbee transceivers and the particular power output of each model. With example 14.2, there were two double-brick walls between them. Furthermore, we can build fully computer-independent systems that can talk to each other, such as more portable remote controls, or other data-gathering systems. In the next few chapters, sooner rather than later.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, 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.
Winner for August is Neil S. who won the major prize! You have been emailed.
During July there was another competition which was quite fun, so from August and onwards we shall do it again. The winner ‘S.R.’ won the minor prize so the major prize jackpots into this month. Running these competitions are a way of saying thank you to my readers, and to generate some interaction. So …
All you have to do for a chance to win is the following:
- Read the blog posts and articles in August, as there will be four questions you will need to answer placed randomly amongst the posts. To keep track, subscribe using one of the methods on the right hand side of this page
- When you have answers for all four questions, email them to email@example.com
- If you follow me on twitter (@tronixstuff) and retweet one post in August, you will receive two entries, so put your twitter address in your email.
- On September the 1st, all the email addresses will be placed in a random draw and one selected. If the entry drawn has all four questions correct, they will win the major prize!
- If the first entry drawn does not have four correct answers, they will win the minor prize, and the major prize will carry over until September, to be combined with the new major prize.
The major prize for August consists of the following:
- One assembled, used JYE Tech Digital Storage Oscilloscope – from the kit review;
- One new pair of 315 MHz wireless data modules, as used in Getting Started with Arduino – Chapter Eleven;
- And something different, the new Texas Instruments MSP430 Launchpad kit, including evaluation board, two MCUs and the USB cable.
The minor prize for August is John’s Fun with LEDs! pack, consisting of:
- ten each of red, green, yellow and orange 5mm LEDs;
- four RGB 10mm diffused LEDs
- three 74HC595 shift registers
- two Texas Instruments TLC5940 16-channel LED driver ICs
- two LM3914 bar graph/dot driver ICs
- 20 x 560 ohm 1% resistors (they missed the photo call)
Hopefully everyone can have some fun reading about electronics and learning along the way. As with any competition, there are a few rules:
- If you have won a previous competition, you cannot enter
- If you know me personally, you cannot enter
- The prizes carry no warranty, we accept no liability for anything at all that they may cause
- Prizes only include what is in the photograph, and will be sent via standard airmail free of charge
- My decision is final
- You can witness the draw in person with prior arrangement
- The time used is Australian Eastern Standard Time (GMT: +10)
Congratulations to Neil S. who is the winner of the major prize!
The minor prize will jackpot into September, details to be posted shortly.