Archive | electronics

Learn electronics with Chris Gammell and “Contextual Electronics”

Electrical engineer Chris Gammell has spent almost a year creating his new online electronics program called “Contextual Electronics“, and we’re excited to share this with our readers. You may have heard of Chris from his regular successful podcast with Dave Jones  – “The Amp Hour“.

Chris has the knowledge and expertise to take electronic ideas from simply that – an idea, right through to production. And by participating in his Contextual Electronics program you can learn the required skills to do this as well. Chris gives us a quick introduction in this video.

Contextual Electronics is a new program aimed at electronics enthusiasts who are ready to take their Arduino (or similar platform) skills to the next level. The first session of the course is an 8 week program that will teach you how to design a large, multi-function Arduino shield using KiCad, the open source CAD software.

It will also show you all of the design decisions that go into making the project. Here are some of the sub-circuits included in the 4-layer PCB design:

  • High level signals measurement using op-amps
  • Power supply output
  • Relay control
  • LED driver circuitry
  • Current source output

The course has a large community component, so you will be grouped with others learning at the same time, regardless of where you’re located in the world. The goal of the course and the community aspect is to make you more confident designing a project so you can go and design your own.

Future sessions of the course will also go over building, troubleshooting and coding for the shield described above. There is also a free short course that you can review to give you an idea of Chris’ methods and what the Contextual Electronics program will be like.

Additional courses will be developed using other popular development boards, including the Raspberry Pi and BeagleBone. For a more in-depth introduction, check out this video.

Frankly the program will help all of you who are ready to take your ideas and projects off the breadboard and into finished products, and with the guidance available with the program and the use of open-source tools you’ll be up and making things you can be proud of showing to friends or even potential employers. For more information about the program, and to sign up – visit the Contextual Electronics program website.

And if you enjoyed this article, or want to introduce someone else to the interesting world of Arduino – check out my book (now in a third printing!) “Arduino Workshop”.

visit tronixlabs.com

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 forum – 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 chris gammell, contextual, education, electronics, kicad, PCB

Old Kit Review – Talking Electronics Fluorescent Simulator

Introduction

Slowly we’re working through the stock of old kits, and in this article we have the “Fluorescent Lamp” simulator from Talking Electronics. To save repeating myself you can read more about Talking Electronics here and watch interviews of the founder Colin Mitchell here.

So why would you want to simulate a fluoro’ tube anyway? Model railways! When your model world moves from day to night, it’s neat to have street lights and so on “flicker” on just like the real thing. And thus you can create this effect as well. It can drive incandescent lamps up to 12V, and allowing it to be powered easily from most layouts.

The kit was originally described in the Talking Electronics book “Electronics for Model Railways” (volume 1) which was full of useful and interesting electronics to liven up any layout. The book may now out of print however at the time of writing this you can download or view most of the projects from the index column of the Talking Electronics website… or contact Talking Electronics if they have any copies of the book (or kit) to sell.

Assembly

Time was not kind to the kit, to be frank it was surprising to find one at all:

Talking Electronics Fluorescent Simulator kit

(Just a note for any over-enthusiastic readers, Talking Electronics is no longer at the address on the bag shown above). However it was complete and ready for assembly. The PCB has a silk-screen with the required component placement information, polarities and so on – a first for the time:

Talking Electronics Fluorescent Simulator PCB top

Talking Electronics Fluorescent Simulator PCB bottom

The instructions and “how it works” are not included with the kit as you were meant to have the book, however TE have made them available as a separate download (.pdf) The kit included everything required to get started, and there’s an LED which replicates the effect so you can test the board without having to watch the connected bulb (which may be a distance away). Finally an IC socket is included 🙂

Talking Electronics Fluorescent Simulator parts

The actual assembly process was very straight forward, which simply required starting with the low-profile components and working up to the large ones:

Talking Electronics Fluorescent Simulator assembly 1

The only problem with the PCB was the holes – looks like only one drill size had been used (apart from the mounting holes) which made getting that rectifier diode in a little tricky. Otherwise it was smooth sailing.

Talking Electronics Fluorescent Simulator finished 2

Not having a model railway at the moment left me with the simple example of the onboard LED and a small incandescent globe to try with the circuit. You can see the kit working in this video.

John – Why do you publish these “Old Kit Reviews”?

They’re more of  a selfish article, like many electronics enthusiasts I have enjoyed kits for decades – and finding kits from days gone by is a treat. From various feedback some of you are enjoying them, so they will continue for fun and some nostalgia. If you’re not interested, just ignore the posts starting with “Old”!

Conclusion

For a kit from the mid-1980s, this would have solved the problem neatly for model railway enthusiasts. By using two or more of the kits with different capacitor values, many model lights could blink on with seemingly random patterns. However it’s 2014 so you could use a PIC10F200 or ATtiny45 and reduce the board space and increase the blinking potential.

Nevertheless, it was an interesting example of what’s possible with a digital logic IC. Full-sized images and a lot more information about the kit are available on flickr. And if you enjoyed this article, or want to introduce someone else to the interesting world of Arduino – check out my book (now in a third printing!) “Arduino Workshop”.

visit tronixlabs.com

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 forum – 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 electronics, kit review, talking electronics, tronixstuff

Tutorial – LM3915 Logarithmic Dot/Bar Display Driver IC

Introduction

This is the second of three articles that will examine the LM391x series of LED driver ICs. The first covered the LM3914, this will cover the LM3915 and the LM3916 will follow. The goal of these is to have you using the parts in a small amount of time and experiment with your driver ICs, from which point you can research further into their theory and application.

Although these parts have been around for many years, the LM3915 isn’t used that much however for the sake of completeness we’re writing the tutorial. The LM3915 offers a simple way to display a logarithmic voltage level using one or more groups of ten LEDs with a minimum of fuss. If you’re wanting to make a VU meter, you should use the LM3916 which we will cover in the final instalment of this trilogy.

Instead of having each LED represent a voltage level as with the LM3914, each LED connected to the LM3915 represents a 3 dB (decibel) change in the power level of the signal. For more on decibels, check out Wikipedia.

To display these power level changes we’ll run through a couple of examples that you can use in your own projects and hopefully give you some ideas for the future. Originally by National Semiconductor, the LM391X series is now handled by Texas Instruments.

LM3915

Getting Started

You will need the LM3915 data sheet, so please download that and keep it as a reference. First – back to basics. The LM3915 controls ten LEDs. It controls the current through the LEDs with the use of only one resistor, and the LEDs can appear in a bar graph or single ‘dot’ when in use. The LM3915 contains a ten-stage voltage divider, each stage when reached will illuminate the matching LED (and those below it in level meter mode).

Let’s consider the most basic of examples (from page two of the data sheet) – a simple logarithmic display of voltage between 0 and 10V:

LM3915 demo board circuitAfter building the circuit you can connect a signal to measure via pin 5, and the GND to pin 2. We’ve built the circuit exactly as above on some stripboard for demonstration purposes, with the only difference being the use of an 8.2kΩ resistor for R2:

LM3915 demo board

To show this in action we use a signal of varying AC voltage – a sine wave at around 2 kHz. In the following video, you can see the comparison of the signal’s voltage against the LEDs being illuminated, and you will see the logarithmic voltage increase represented by the LEDs:

We used the bar display mode for the voltage increase, and the dot display mode for the voltage decrease. Did you notice that during the voltage decrease, the LEDs below the maximum level being displayed were dim? As the signal’s voltage was varying very quickly, the change in the LED’s location is a blur due to the speed of change. In the video below, we’ve slowed the frequency right down but kept the same maximum voltage.

Well that was a lot of fun, and gives you an idea of what is possible with the LM3915.

Displaying weaker signals

In non-theoretical situations your input signal won’t conveniently be between 0 and 10 V. For example the line level on audio equipment can vary between 1 and 3V peak to peak. For example, here’s a random DSO image from measuring the headphone output on my computer whilst playing some typical music:

audio signal LM3915 PC sound

Although it’s an AC signal we’ll treat it as DC for simplicity. So to display this random low DC voltage signal we’ll reduce the range of the display to 0~3V DC. This is done using  the same method as with the LM3914 – with maths and different resistors.

Consider the following formulae:

LM3915 reference voltage formula

As you can see the LED current (Iled) is simple, however we’ll need to solve for R1 and R2 with the first formula to get our required Vref of 3V. For our example circuit I use 2.2kΩ for R2 which gives a value of 1.8kΩ for R1. However putting those values in the ILED formula gives a pretty low current for the LEDs, about 8.3 mA. Live and learn – so spend time experimenting with values so you can match the required Vref and ILED.

Nevertheless in this video below we have the Vref of 3V and some music in from the computer as a sample source of low-voltage DC. This is not a VU meter! Wait for the LM3916 article to do that.

Again due to the rapid rate of change of the voltage, there is the blue between the maximum level at the time and 0V.

Chaining multiple LM3915s

This is covered well in the data sheet, so read it for more on using two LM3915s. Plus there are some great example circuits in the data sheet, for example the 100W audio power meter on page 26 and the vibration meter (using a piezo) on page 18.

Conclusion

As always I hope you found this useful. Don’t forget to stay tuned for the final instalment about the LM3916. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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 electronics, LM3915, TI, tronixstuff, tutorial0 Comments

Kit Review – “Short Circuits” 3 Digit Counter

Introduction

Time for another kit review and in this instalment we have a look at the “3 digit counter” kit from Tronixlabs. This is part of a much larger series of kits that are described in a three volume set of educational books titled “Short Circuits”.

Aimed at the younger readers or anyone who has an interest in learning electronics, these books (available from Tronixlabs) are well written and with some study and practice the reader will make a large variety of projects and learn quite a bit. They could be considered as a worthy 21st-century replacement to the old Dick Smith “Funway…” guides.

The purpose of this kit is to give you a device which can count upwards between zero and 999 – which can be used for various purposes and also of course to learn about digital electronics.

Assembly

The kit arrives in typical retail fashion:

Jaycar Short Circuits Counter Kit packaging

Everything you need to make the counter is included except for the instructions – which are found in the “Short Circuits” volume two book – and IC sockets. Kits for beginners with should come with IC sockets.

Jaycar Short Circuits Counter Kit contents

The components are separated neatly in the bag above, and it was interesting to see the use of zero ohm resistors for the two links on the board:

KJ8234 Jaycar Short Circuits Counter Kit components

The PCB is excellent. The silk screening and solder-mask is very well done.

KJ8234 Jaycar Short Circuits Counter Kit PCB top

Jaycar Short Circuits Counter Kit PCB bottom KJ8234

Furthermore I was really, really impressed with the level of detail with the drilling. The designer has allowed for components with different pin spacing – for example the 100 nF capacitor and transistors as shown below:

Jaycar Short Circuits Counter Kit PCB detail KJ8234

The instructions in the book are very clear and are written in an approachable fashion:

Jaycar Short Circuits Counter Kit instructions KJ8234

Jaycar Short Circuits Counter Kit instructions two KJ8234

There’s also a detailed explanation on how the circuit works, some interesting BCD to decimal notes, examples of use (slot cars!) and a neat diagram showing how to mount the kit in a box using various parts from Jaycar – so you’re not left on your own.

Construction went well, starting with the low-profile parts:

Jaycar Short Circuits Counter Kit assembly 1 KJ8234

… then the semiconductors:

Jaycar Short Circuits Counter Kit assembly 2 KJ8234

… then the higher-profile parts and we’re finished:

Jaycar Short Circuits Counter Kit assembly finished KJ8234

There wasn’t any difficulty at all, and the counter worked first time. Although I’m not a new user, the quality of PCB and instructions would have been a contributing factor to the success of the kit.

How it works

The input signal for the counter (in this case a button controlling current from the supply rail) is “squared-up” by an MC14093 schmitt-trigger IC, which then feeds a MC14553 BCD counter IC, which counts and then feeds the results to a 4511 BCD to 7-segment converter to drive the LED digits which are multiplexed by the MC14553. For the schematic and details please refer to the book. Operation is simple, and demonstrated in the following video:

However you can feed the counter an external signal, by simply applying it to the input section of the circuit. After a quick modification:

Jaycar Short Circuits Counter Kit counter input KJ8234

… it was ready to be connected to a function generator. In the following video we send pulses with a varying frequency up to 2 kHz:

Conclusion

This is a neat kit, works well and with the accompanying book makes a good explanation of a popular digital electronics subject. There aren’t many good “electronics for beginners” books on the market any more, however the “Short Circuits” range fit the bill.

And finally a plug for our own store – tronixlabs.com – which along with being Australia’s #1 Adafruit distributor, also offers a growing range and Australia’s best value for supported hobbyist electronics from Altronics, Jaycar, DFRobot, Freetronics, Seeedstudio and much much more.

visit tronixlabs.com

As always, 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 forum – dedicated to the projects and related items on this website.

Posted in education, electronics, kit, kit review, KJ8234, tronixlabs, tronixstuff6 Comments

Old Kit Review – Diesel Sound Simulator for Model Railroads

Introduction

In this review of an older kit (circa 1993~1997) we examine the Diesel Sound Simulator for Model Railroads kit from (the now defunct) Dick Smith Electronics, based on the article published in the December 1992 issue of Silicon Chip magazine.

The purpose of this kit is to give you a small circuit which can fit in a HO scale (or larger) locomotive, or hidden underneath the layout – that can emulate the rumbling of a diesel-electric locomotive to increase the realism of a train. However the kit is designed for use with a PWM train controller (also devised by Silicon Chip!) so not for the simple direct-DC drive layouts.

K3030 diesel sound simulator kit

Assembly

The diesel sound kit was from the time when DSE still cared about kits, so you received the sixteen page “Guide to Kit Construction” plus the kit instructions, nasty red disclaimer sheet, feedback card, plus all the required components and the obligatory coil of solder that was usually rubbish:

K3030 diesel sound simulator kit contents

Everything required to get going is included, except IC sockets. My theory is it’s cheaper to use your own sockets than source older CMOS/TTL later on if you want to reuse the ICs, so sockets are now mandatory here:

K3030 diesel sound simulator kit parts

The PCB is from the old school of “figure-it-out-yourself”, no fancy silk-screening here:

K3030 diesel sound simulator kit PCB

K3030 diesel sound simulator kit PCB bottom

Notice the five horizontal pads between the two ICs – these were for wire bridges in case you needed to break the PCB in two to fit inside your locomotive.

Actual assembly was straight-forward, all the components went in without any issues. Having two links under IC2 was a little annoying, however a short while later the PCB was finished and the speaker attached:

K3030 diesel sound simulator kit finished

How it works

As mentioned earlier this diesel sound kit was designed for use with the Silicon Chip train PWM controller, so the design is a little different than expected. It can handle a voltage of around 20 V, and the sound is determined by the speed of the locomotive.

The speed is determined by the back EMF measured from the motor – and (from the manual) this is the voltage produced by the motor which opposes the current flow through it and this voltage is directly proportional to speed.

Not having a 20V DC PWM supply laying about I knocked up an Arduino to PWM a 20V DC supply via an N-MOSFET module and experimented with the duty cycle to see what sort of noises could be possible. The output was affected somewhat by the supply voltage, however seemed a little higher in pitch than expected.

You can listen to the results in the following video:

I reckon the sound from around the twenty second mark isn’t a bad idle noise, however in general not that great. The results will ultimately be a function of a lower duty-cycle than I could create at the time and the values of R1 and R2 used in the kit.

 Conclusion

Another kit review over. With some time spent experimenting you could generate the required diesel sounds, a Paxman-Valenta it isn’t… but it was a fun kit and I’m sure it was well-received at the time. To those who have been asking me privately, no I don’t have a secret line to some underground warehouse of old kits – just keep an eye out on ebay and they pop up now and again. Full-sized images and much more information about the kit are available on flickr.

And while you’re here – are you interested in Arduino? Check out my new book “Arduino Workshop” from No Starch Press.

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 DSE, electronics, K3030, kit, kit review, model railway, tronixstuff2 Comments

Tutorial – LM3914 Dot/Bar Display Driver IC

Introduction

This is the first of three tutorials that will examine the LM391x series of LED driver ICs. In this first tutorial we cover the LM3914, then the LM3915 and LM3916 will follow. The goal of these tutorials is to have you using the parts in a small amount of time and experiment with your driver ICs, from which point you can research further into their theory and application.

Although these parts have been around for many years, the LM3914 in particular is still quite popular. It offers a simple way to display a linear voltage level using one or more groups of ten LEDs with a minimum of fuss.

With a variety of external parts or circuitry these LEDs can then represent all sorts of data, or just blink for your amusement. We’ll run through a few example circuits that you can use in your own projects and hopefully give you some ideas for the future. Originally by National Semiconductor, the LM391X series is now handled by Texas Instruments.

LM3914

Getting Started

You will need the LM3914 data sheet, so please download that and keep it as a reference. So – back to basics. The LM3914 controls ten LEDs. It controls the current through the LEDs with the use of only one resistor, and the LEDs can appear in a bar graph or single ‘dot’ when in use. The LM3914 contains a ten-stage voltage divider, each stage when reached will illuminate the matching LED (and those below it in level meter mode).

Let’s consider the most basic of examples (from page two of the data sheet) – a voltmeter with a range of 0~5V:

 LM3914 5V voltmeter circuit

The Vled rail is also connected to the supply voltage in our example. Pin 9 controls the bar/dot display mode – with it connected to pin 3 the LEDs will operate in bar graph mode, leave it open for dot mode. The 2.2uF capacitor is required only when “leads to the LED supply are 6″ or longer”. We’ve hooked up the circuit above, and created a 0~5V DC source via a 10kΩ potentiometer with a multimeter to show the voltage – in the following video you can see the results of this circuit in action, in both dot and bar graph mode:

Customising the upper range and LED current

Well that was exciting, however what if you want a different reference voltage? That is you want your display to have a range of 0~3 V DC? And how do you control the current flow through each LED? With maths and resistors. Consider the following formulae:

LM3914 formulae

As you can see the LED current (Iled) is simple, our example is 12.5/1210 which returned 10.3 mA – and in real life 12.7 mA (resistor tolerance is going to affect the value of the calculations).

Now to calculate a new Ref Out voltage – for example  we’ll shoot for a 3 V meter, and keep the same current for the LEDs. This requires solving for R2 in the equation above, which results with R2 = -R1 + 0.8R1V. Substituting the values – R2 = -1210 + 0.8 x 1210 x 3 gives a value of 1694Ω for R2. Not everyone will have the E48 resistor range, so try and get something as close as possible. We found a 1.8 kΩ for R2 and show the results in the following video:

You can of course have larger display range values, but a supply voltage of no more than 25 V will need to be equal to or greater than that value. E.g. if you want a 0~10 V display, the supply voltage must be >= 10V DC.

Creating custom ranges

Now we’ll look at how to create  a lower range limit, so you can have displays that (for example) can range from a non-zero positive value. For example, you want to display levels between 3 and 5V DC. From the previous section, you know how to set the upper limit, and setting the lower limit is simple – just apply the lower voltage to pin 4 (Rlo).

You can derive this using a resistor divider or other form of supply with a common GND. When creating such circuits, remember that the tolerance of the resistors used in the voltage dividers will have an affect on the accuracy. Some may wish to fit trimpots, which after alignment can be set permanently with a blob of glue.

Finally, for more reading on this topic – download and review the TI application note.

Chaining multiple LM3914s

Two or more LM3914s can be chained together to increase the number of LEDs used to display the levels over an expanded range. The circuitry is similar to using two independent units, except the REFout (pin 7) from the first LM3914 is fed to the REFlo (pin 4) of the second LM3914 – whose REFout is set as required for the upper range limit. Consider the following example schematic which gave a real-world range of 0~3.8V DC:

LM3914

The 20~22kΩ resistor is required if you’re using dot mode (see “Dot mode carry” in page ten of the data sheet). Moving on, the circuit above results with the following:

Where to from here?

Now you can visually represent all sorts of low voltages for many purposes. There’s more example circuits and notes in the LM3914 data sheet, so have a read through and delve deeper into the operation of the LM3914. Furthermore Dave Jones from eevblog.com has made a great video whcih describes a practical application of the LM3914:

Conclusion

As always I hope you found this useful. Don’t forget to stay tuned for the second and third instalments using the LM3915 and LM3916. Full-sized images are on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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 electronics, LED, LM3914, TI, tronixstuff, tutorial, voltmeter0 Comments

Australian Electronics Nostalgia – Talking Electronics Kits

Introduction

From 1981, Australian electrical engineer Colin Mitchell started publishing his home-grown electronics magazine “Talking Electronics”. His goal was to get people interested and learning about electronics, and more so with a focus on digital electronics. It was (and still is) a lofty goal – in which he succeeded. From a couple of rooms in his home the magazine flourished, and many projects described within were sold as kits. At one stage there were over 150 Talking Electronics kits on the market. You could find the books and kits in retail outlets such as Dick Smith Electronics, and for a short while there was a TE store in Moorabbin (Victoria). Colin and the team’s style of writing was easy to read and very understandable – but don’t take my word for it, you can download the magazines from his website (they’re near the bottom of the left column). Dave Jones recently interviewed Colin, and you can watch those for much more background information.

Over fifteen issues you could learn about blinking LEDs all the way to making your own expandable Z80 board computer, and some of the kits may still be available. Colin also published a series of tutorial books on electronics, and also single-magazine projects. And thus the subjects of our review … we came across the first of these single-issue projects from 1981 – the Mini Frequency Counter (then afterwards we have another kit):

cover

How great is that? The PCB comes with the magazine. This is what set TE apart from the rest, and helped people learn by actually making it easy to build what was described in the magazine instead of just reading about it. For 1981 the PCB was quite good – they were silk-screened which was quite rare at the time:

pcb

pcbrear

And if you weren’t quite ready, the magazine also included details of a square-wave oscillator to make and a 52-page short course in digital electronics. However back to the kit…

Assembly

The kit uses common parts and I hoard CMOS ICs so building wasn’t a problem. This (original) version of the kit used LEDs instead of 7-segment displays (which were expensive at the time) so there was plenty of  careful soldering to do:

LEDsin

And after a while the counter started to come together. I used IC sockets just in case:

almostthere

The rest was straight-forward, and before long 9 V was supplied, and we found success:

powerup

To be honest progress floundered for about an hour at this point – the display wouldn’t budge off zero. After checking the multi-vibrator output, calibrating the RC circuits and finally tracing out the circuit with a continuity tester, it turned out one of the links just wasn’t soldered in far enough – and the IC socket for the 4047 was broken So a new link and directly fitting the 4047 fixed it. You live and learn.

Operation

So – we now have a frequency counter that’s good for 100 Hz to the megahertz range, with a minimum of parts. Younger, non-microcontroller people may wonder how that is possible – so here’s the schematic:

schematic

The counter works by using a multi-vibrator using a CD4047 to generate a square-wave at 50, 500 and 5 kHz, and the three trimpots are adjusted to calibrate the output. The incoming pulses to measure are fed to the 4026 decade counter/divider ICs. Three of these operate in tandem and each divide the incoming count by ten – and display or reset by the alternating signal from the 4047. However for larger frequencies (above 900 Hz) you need to change the frequency fed to the display circuit in order to display the higher (left-most) digits of the result. A jumper wire is used to select the required level (however if you mounted the kit in a case, a knob or switch could be used).

For example, if you’re measuring 3.456 MHz you start with the jumper on H and the display reads 345 – then you switch to M to read 456 – then you switch to the L jumper and read 560, giving you 3456000 Hz. If desired, you can extend the kit with another PCB to create a 5-digit display. The counter won’t be winning any precision contests – however it has two purposes, which are fulfilled very well. It gives the reader an inexpensive piece of test equipment that works reasonably well, and a fully-documented project so the reader can understand how it works (and more).

And for the curious –  here it is in action:

[Update 20/07/2013] Siren Kit

Found another kit last week, the Talking Electronics “DIY Kit #31 – 9V siren”. It’s an effective and loud siren with true rise and fall, unlike other kits of the era that alternated between two fixed tones. The packaging was quite strong and idea for mail-order at the time:

kitbox

The label sells the product (and shows the age):

kitlabel

The kit included every part required to work, apart from a PP3 battery, and a single instruction sheet with a good explanation of how the circuit works, and some data about the LM358:

kitparts

… and as usual the PCB was ahead of its’ time with full silk-screen and solder mask:

pcbtop

sirenpcbbottom

Assembly was quite straight-forward. The design is quite compact, so a lot of vertical resistor mounting was necessary due to the lack of space. However it was refreshing to not have any links to fit. After around twenty minutes of relaxed construction, it was ready to test:

PCBfinished

finished

It’s a 1/2 watt speaker, however much louder than originally anticipated:

Once again, another complete and well-produced kit.

Conclusion

That was a lot of fun, and I’m off to make the matching square-wave oscillator for the frequency counter. Kudos to Colin for all those years of publication and helping people learn. Lots of companies bang on about offering tutorials and information on the Internet for free, but Colin has been doing it for over ten years. Check out his Talking Electronics website for a huge variety of knowledge, an excellent electronics course you can get on CD – and go easy on him if you have any questions.

Full-sized images available on flickr. This kit was purchased without notifying the supplier.

And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

LEDborder

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 australia, counter, digital, electronics, frequency, history, kit review, learning electronics, magazine, talking, talking electronics, test equipment, tronixstuff, vintage8 Comments

Kit review – Protostack ATmega32 Development Kit

Introduction

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

Assembly

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

packaging

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

pcbtop

pcbbottom

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

parts

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

igo

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

protoarea

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

lowpass

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

stacking

Moving forward

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

which (as all was well) resulted with:

avrdudetest2

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

Conclusion

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

LEDborder

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

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

Posted in atmega32, atmel, avr, competition, education, electronics, kit review, microcontrollers, protostack, review, tronixstuff, usbasp0 Comments

Tutorial – Arduino and PCF8591 ADC DAC IC

Learn how to use the NXP PCF 8591 8-bit A/D and D/A IC with Arduino in chapter fifty-two of my Arduino Tutorials. The first chapter is here, the complete series is detailed here.

Updated 17/06/2013

Introduction

Have you ever wanted more analogue input pins on your Arduino project, but not wanted to fork out for a Mega? Or would you like to generate analogue signals? Then check out the subject of our tutorial – the NXP PCF8591 IC. It solves both these problems as it has a single DAC (digital to analogue) converter as well as four ADCs (analogue to digital converters) – all accessible via the I2C bus. If the I2C bus is new to you, please familiarise yourself with the readings here before moving forward.

The PCF8591 is available in DIP form, which makes it easy to experiment with:

pcf8591

You can get them from the usual retailers. Before moving on, download the data sheet. The PCF8591 can operate on both 5V and 3.3V so if you’re using an Arduino Due, Raspberry Pi or other 3.3 V development board you’re fine. Now we’ll first explain the DAC, then the ADCs.

Using the DAC (digital-to-analogue converter)

The DAC on the PCF8591 has a resolution of 8-bits – so it can generate a theoretical signal of between zero volts and the reference voltage (Vref) in 255 steps. For demonstration purposes we’ll use a Vref of 5V, and you can use a lower Vref such as 3.3V or whatever you wish the maximum value to be … however it must be less than the supply voltage. Note that when there is a load on the analogue output (a real-world situation), the maximum output voltage will drop – the data sheet (which you downloaded) shows a 10% drop for a 10kΩ load. Now for our demonstration circuit:

pcf8591basic_schem

Note the use of 10kΩ pull-up resistors on the I2C bus, and the 10μF capacitor between 5V and GND. The I2C bus address is set by a combination of pins A0~A2, and with them all to GND the address is 0x90. The analogue output can be taken from pin 15 (and there’s a seperate analogue GND on pin 13. Also, connect pin 13 to GND, and circuit GND to Arduino GND.

To control the DAC we need to send two bytes of data. The first is the control byte, which simply activates the DAC and is 1000000 (or 0x40) and the next byte is the value between 0 and 255 (the output level). This is demonstrated in the following sketch:

Did you notice the bit shift of the bus address in the #define statement? Arduino sends 7-bit addresses but the PCF8591 wants an 8-bit, so we shift the byte over by one bit. 

The results of the sketch are shown below, we’ve connected the Vref to 5V and the oscilloscope probe and GND to the analogue output and GND respectively:

triangle

If you like curves you can generate sine waves with the sketch below. It uses a lookup table in an array which contains the necessary pre-calculated data points:

And the results:

sine

For the following DSO image dump, we changed the Vref to 3.3V – note the change in the maxima on the sine wave:

sine3v3

Now you can experiment with the DAC to make sound effects, signals or control other analogue circuits.

Using the ADCs (analogue-to-digital converters)

If you’ve used the analogRead() function on your Arduino (way back in Chapter One) then you’re already familiar with an ADC. With out PCF8591 we can read a voltage between zero and the Vref and it will return a value of between zero and 255 which is directly proportional to zero and the Vref. For example, measuring 3.3V should return 168. The resolution (8-bit) of the ADC is lower than the onboard Arduino (10-bit) however the PCF8591 can do something the Arduino’s ADC cannot. But we’ll get to that in a moment.

First, to simply read the values of each ADC pin we send a control byte to tell the PCF8591 which ADC we want to read. For ADCs zero to three the control byte is 0x00, 0x01, ox02 and 0x03 respectively. Then we ask for two bytes of data back from the ADC, and store the second byte for use. Why two bytes? The PCF8591 returns the previously measured value first – then the current byte. (See Figure 8 in the data sheet). Finally, if you’re not using all the ADC pins, connect the unused ones to GND.

The following example sketch simply retrieves values from each ADC pin one at a time, then displays them in the serial monitor:

Upon running the sketch you’ll be presented with the values of each ADC in the serial monitor. Although it was a simple demonstration to show you how to individually read each ADC, it is a cumbersome method of getting more than one byte at a time from a particular ADC.

To do this, change the control byte to request auto-increment, which is done by setting bit 2 of the control byte to 1. So to start from ADC0 we use a new control byte of binary 00000100 or hexadecimal 0x04. Then request five bytes of data (once again we ignore the first byte) which will cause the PCF8591 to return all values in one chain of bytes. This process is demonstrated in the following sketch:

Previously we mentioned that the PCF8591 can do something that the Arduino’s ADC cannot, and this is offer a differential ADC. As opposed to the Arduino’s single-ended (i.e. it returns the difference between the positive signal voltage and GND, the differential ADC accepts two signals (that don’t necessarily have to be referenced to ground), and returns the difference between the two signals. This can be convenient for measuring small changes in voltages for load cells and so on.

Setting up the PCF8591 for differential ADC is a simple matter of changing the control byte. If you turn to page seven of the data sheet, then consider the different types of analogue input programming. Previously we used mode ’00’ for four inputs, however you can select the others which are clearly illustrated, for example:

adcmodes

So to set the control byte for two differential inputs, use binary 00110000 or 0x30. Then it’s a simple matter of requesting the bytes of data and working with them. As you can see there’s also combination single/differential and a complex three-differential input. However we’ll leave them for the time being.

Conclusion

Hopefully you found this of interest, whether adding a DAC to your experiments or learning a bit more about ADCs. We’ll have some more analogue to digital articles coming up soon, so stay tuned. And if you enjoy my tutorials, or want to introduce someone else to the interesting world of Arduino – check out my new book “Arduino Workshop” from No Starch Press.

LEDborder

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 ADC, arduino, beginnner, dac, differential, education, electronics, I2C, lesson, NXP, PCF8591, tronixstuff, tutorial14 Comments

Kit Review – SC/Jaycar Garbage and Recycling Reminder

Introduction

Every month Australian electronics magazine Silicon Chip publishes a variety of projects, and in January 2013 they published the “Garbage Recycling Reminder” by John Clarke. Jaycar picked it up and now offers a kit, the subject of our review. This kit solves the old but recurring (for some) problem – which bin to put out, and when!

The kit offers a simple way of keeping track of the bin schedule, and is suitable for up to four bins. With a simple user-interface consisting of a button and LED for each bin – once setup the reminder can easily be used by anyone. It allows for weekly, fortnightly and alternate fortnights – which is perfect for almost every council’s schedule.

Assembly

The kit arrives in typical Jaycar fashion:

and includes everything you need, including an enclosure, front panel sticker and battery:

 The PCB is well done, and routed nicely to fit inside the enclosure:

Now to get started. The instructions included are a reprint of the magazine article, and as Jaycar have modified the kit a little, their notes and photos are also included. However there isn’t anything to worry about.

Assembly is straight-forward, the only annoying thing was the assumption that the constructor will use off-cuts for jumper links. Instead – use your own header pins:

Furthermore, when soldering in the resistors and 1N914 diodes next to the LEDs – leave them floating so you can move them a bit to make way for the LEDs:

This is also a good time to check the buttons line up with the holes drilled into the front panel (a template is included with the instructions):

At this point you can fit the LEDs to the PCB, and carefully match it up with the drilled lid. You are supplied with a red, green, yellow and blue LED – which generally match the bin lid colours from various councils. Screw the PCB into the lid then solder the LEDs in – after double-checking they protrude out of lid. Then insert the battery and make a final test:

If you made it that far, you can apply the sticker included to illustrate the front panel. To save time we cut the sticker up for a minimalist look. However you now need to set-up the jumpers before closing the box up. There is a set of three pins for each bin, and a jumper can bridge the first two or last two pins, or none. If you don’t bridge them – that bin is weekly. If you bridge the first two – that bin is fortnightly from the setup day. If you bridge the last two – that bin is fortnightly from the next week, for example:

So you can easily set it up for a weekly bin and an alternating-fortnight pair of bins. Once you’ve setup the jumpers, screw up the box and you’re done.

Operation

Once you’ve set the jumpers up as described earlier, you just need to execute the programming function at the time you want the reminders to start every week. For example, if your weekly collection is 4 AM on a Thursday – do the programming around 5pm Wednesday night – that will then be the time the LEDs start blinking. When you put out the appropriate bin, press the button below the matching bin LED to stop the blinking. You can control the number of bins – so if you only have two bins, only two LEDs will activate. The blinking period is eighteen hours, and you can adjust the start time via the buttons.

How it works

The circuit is based around a Microchip PIC16LF88 and has an incredibly low current draw, around 15 uA when the LEDs aren’t blinking. This allows the circuit to run for over two years on the included 3v coin cell battery. The internal clock is kept accurate to around 10 minutes per year using an external 32.768 kHz crystal. After a period of use the battery voltage may drop to a level insufficient to adequately power the LEDs, so each one has a voltage doubler by way of a diode and capacitor – very clever. This ensures LED brightness even with a low battery. For complete details purchase the kit or a copy of the January 2013 edition of Silicon Chip.

Now it sits next to the kettle, waiting for bin night…

Conclusion

Personally I needed this kit, so I’m a little biased towards it. However – it’s simple and it works. Kudos to John Clarke for his project. You can purchase it from Jaycar and their resellers, or read more about it in the January 2013 edition of Silicon Chip. Full-sized images available on flickr. This kit was purchased without notifying the supplier.

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

Posted in electronics, garbage bin reminder, jaycar, KC5518, kit review, pic, silicon chip, tutorial6 Comments

Australian Electronics – David Jones interviews Colin Mitchell

Welcome back

In this post I would like to share a series of interviews conducted by Dave Jones from eevblog.com. Dave interviews Colin Mitchell from Talking Electronics. Throughout the 1980s and onwards, Colin published a range of electronics magazines, tutorials and a plethora of electronics kits – of which many are still available today. Personally I was a great fan of the TE products, and sold many of his books through my past retail career with DSE. I hope you enjoy these interviews, and if not – stay tuned for upcoming articles. Furthermore, I’ve reviewed one of the classic TE kits.

Once again, thanks to Dave Jones and of course Colin Mitchell from Talking Electronics for their interview and various insights.

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 australia, education, electronics, history, talking electronics3 Comments

Arduino and FFD51 Incandescent Displays

In this article we examine another style of vintage display technology – the incandescent seven-segment digital display. We are using the FFD51 by the IEE company (data sheet.pdf) – dating back to the early 1970s. Here is a close-up of our example:

You can see the filaments for each of the segments, as well as the small coiled ‘decimal point’ filament at the top-right of the image above.  This model has pins in a typical DIP format, making use in a solderless breadboard or integration into a PCB very simple:

It operates in a similar manner to a normal light bulb – the filaments are in a vacuum, and when a current is applied the filament glows nicely. The benefit of using such as display is their brightness – they could be read in direct sunlight, as well as looking good inside.  At five volts each segment draws around 30mA. For demonstration purposes I have been running them at a lower voltage (3.5~4V), as they are old and I don’t want to accidentally burn out any of the elements.

Using these with an Arduino is very easy as they segments can be driven from a 74HC595 shift register using logic from Arduino digital out pins. (If you are unfamiliar with doing so, please read chapters four and five of my tutorial series). For my first round of experimenting, a solderless breadboard was used, along with the usual Freetronics board and some shift register modules:

Although the modules are larger than a DIP 74HC595, I like to use these instead. Once you solder in the header pins they are easier to insert and remove from breadboards, have the pinouts labelled clearly, are almost impossible to physically damage, have a 100nF capacitor for smoothing and a nice blue LED indicating power is applied.

Moving forward – using four shift register modules and displays, a simple four-digit circuit can be created. Note from the datasheet that all the common pins need to be connected together to GND. Otherwise you can just connect the outputs from the shift register (Q0~Q7) directly to the display’s a~dp pins.

Some of you may be thinking “Oh at 30mA a pin, you’re exceeding the limits of the 74HC595!”… well yes, we are. However after several hours they still worked fine and without any heat build-up. However if you displayed all eight segments continuously there may be some issues. So take care. As mentioned earlier we ran the displays at a lower voltage (3.5~4V) and they still displayed nicely. Furthermore at the lower voltage the entire circuit including the Arduino-compatible board used less than 730mA with all segments on –  for example:

 For the non-believers, here is the circuit in action:

Here is the Arduino sketch for the demonstration above:

Now for the prototype of something more useful – another clock. 🙂 Time to once again pull out my Arduino-compatible board with onboard DS1307 real-time clock. For more information on the RTC IC and getting time data with an Arduino please visit chapter twenty of my tutorials. For this example we will use the first two digits for the hours, and the last two digits for minutes. The display will then rotate to showing the numerical day and month of the year – then repeat.

Operation is simple – just get the time from the DS1307, then place the four digits in an array. The elements of the array are then sent in reverse order to the shift registers. The procedure is repeated for the date. Anyhow, here is the sketch:

and the clock in action:

So there you have it – another older style of technology dragged into the 21st century. If you enjoyed this article you may also like to read about vintage HP LED displays. Once again, I hope you found this article of interest. Thanks to the Vintage Technology Association website for background information.

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, electronics, ffd51, incandescent, lesson, tutorial, vintage2 Comments

Tutorial: Analog input for multiple buttons – Part Two

This is chapter forty-six 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 19/01/2013]

A while back I described how to read multiple buttons using only one analogue input pin. However we could only read one button at a time. In this instalment we revisit this topic and examine an improved method of doing so which allows for detecting more than one button being pressed at the same time. This method is being demonstrated as it is inexpensive and very easy to configure.

(For a more exact and expensive method please consider the use of the Microchip MCP23017 which allows for sixteen inputs via the I2C bus).

As you know the analogue input pins of the Arduino can read a voltage of between zero and five volts DC and return this measurement as an integer between zero and 1023. Using a small external circuit called a “R-2R ladder”, we can alter the voltage being measured by the analogue pin by diverting the current through one or more resistors by our multiple buttons. Each combination of buttons theoretically will cause a unique voltage to be measured, which we can then interpret in our Arduino sketch and make decisions based on the button(s) pressed.

First the circuit containing four buttons:

circuit1

Can you see why this is called an R-2R circuit? When building your circuit – use 1% tolerance resistors – and check them with a multimeter to be sure. As always, test and experiment before committing to anything permanent.

Now to determine a method for detecting each button pressed, and also combinations. When each button is closed, the voltage applied to analogue pin zero will be different. And if two buttons are pressed at once, the voltage again will be different. Therefore the value returned by the function analogRead() will vary for each button-press combination. To determine these, I connected a numeric display to my Arduino-compatible board, then simply sent the analogRead() value to the display. You can see some of the results of this in the following video:

The analogRead() results of pressing every combination of button can be found in the following table:

After this experiment we now have the values returned by analogRead() and can use them in a switch… case function or other decision-making functions in our sketches to read button(s) and make decisions based on the user input. Unfortunately there was some overlap with the returned values and therefore in some cases not every possible combination of press will be available.

However, we’re still doing well and you can get at least eleven or twelve combinations still with only one analog input pin. You can add delay() functions in your sketch if necessary to take care of switch debouncing or do it with hardware if you feel it is necessary.

So now you have a more useful method for receiving input via buttons without wasting many digital input pins. I hope you found this article useful or at least interesting. This series of tutorials has been going for almost two years now, and may soon start to wind down – it’s time to move forward to the next series of tutorials.

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, electronics, learning electronics, lesson, multiple buttons, tutorial7 Comments

Update – Upcoming Electronics Industry Documentary

Hello readers

Today I am going to introduce something quite different, yet hopefully interesting to you out there. The renowned director and cinematographer Karl von Muller has just released the roll-call trailer for his upcoming documentary titled “State of Electronics” – a discussion on the Electronics Industry in Australia. Although the focus is on the Australian electronics scene, much of the content and discourse within the documentary can be related to by those from many other countries.

However, Karl can explain it better:

After several months of researching, interviewing and filming, I’m excited to present the first public Trailer to my new Documentary “State of Electronics” – A discussion on the Electronics Industry in Australia. Even though the documentary is focused on Australian Electronics Design and Manufacture, much of it applies to all countries from around the world.

The discussion is focused initially on the world of Hobby Electronics and how it’s decline could affect the Electronics Industry in the future. The Documentary then discusses many issues that face industry including the issue of “Repair and Recycle”, “Education”, “Surface Mount Technology”, “Globalisation”, “Opportunities” and many many more off the cuff & candid comments from Industry professionals.

The Documentary features interviews with famous Australians and Industry professionals including Dick Smith, Dave L Jones, Doug Ford, Leo Simpson, Grant Petty, Matthew Pryor, Jonathan Oxer, Andy Gelme, Andrew Griffiths, Eugene Ruffolo & Bill Petreski. In the future, I am planning to interview just a few more before the final release of the Documentary soon.

Shot completely on the Canon 5DMK2, using the Zoom H4N Audio recorder. Directed, Edited and shot by Karl von Moller, this version of the trailer is largely ungraded and only has an FCP sound mix applied. Music track is composed by Karl von Moller also. Enjoy!

Please visit karlvonmoller.com for more on the progress and information on “State of Electronics”

Here is the new roll-call trailer:

… and the original trailer for those unfamiliar with the project:

This will surely be a fascinating and insightful documentary that we are all looking forward to. Nice one Karl!

Posted in education, electronics, history0 Comments

The 555 Precision Timer IC

Learn about the useful and inexpensive 555 timer IC in this detailed tutorial!

Hello readers

Today we revisit one of the most popular integrated circuits ever conceived – the 555 timer IC. “Triple-five”, “five-five-five”, “triple-nickel” … call it what you will, it has been around for thirty-eight years. Considering the pace of change in the electronics industry, the 555 could be the constant in an ever-changing universe. But what is the 555? How does it work? How can we use it? And … why do we still use it? In this introductory article we will try to answer these questions. If you would like to see some examples, visit here.

What is the 555?

The 555 timer is the solution to a problem found by the inventor – Hans Camenzind.  He saw the need through his radio work for a part that could act as an oscillator or a timer [1]; and working as a contractor for Signetics developed the 555. (Signetics was purchased by Philips in 1975, and their semiconductor division was spun off as NXP in 2006). The 555 has to be one of the most used ICs ever invented. It is used for timing, from microseconds to hours; and creating oscillations (which is another form of timing for the pedants out there). It is very flexible with operation voltage, you can throw from 4.5 to 18V at it; you can sink or source 200mA of current through the output; and it is very cheap – down to around nine cents if you order several thousand units. Finally, the 555 can achieve all of this with a minimum of basic components – some resistors and capacitors.

Here are some examples in the common DIP casing:

555sss

Furthermore a quick scan of suppliers’ websites show that the 555 is also available in surface-mount packages such as SOIC, MSOP and TSSOP. You can also source a 556 timer IC, which contains two 555 ICs. (What’s 555 + 555? 556…) Furthermore, a 558 was available in the past, but seems rather tricky to source these days.

556sss

How does the 555 work?

The 555 contains two major items:

  • A comparator – a device which compares two voltages, and switches its output to indicate which is larger, and
  • A flip-flop – a circuit that has two stable states, and those states can be changed by applying a voltage to one of the flip-flop’s inputs.

Here is the 555 functional diagram from the TI 555 data sheet.pdf:

functiondiagram

… and the matching pin-out diagram:

Don’t let the diagrams above put you off. It is easier to explain how the 555 operates within the context of some applications, so we will now explore the three major uses of the 555 timer IC in detail – these being astable,  monostable, and bistable operations, in theory and in practice.

Astable operation

Astable is an on-off-on… type of oscillation – and generates what is known as a square wave, for example:

sqwaveastable

There are three values to take note of:

  • time (s) – the time for a complete cycle. The number of cycles per second is known as the frequency, which is the reciprocal of time (s);
  • tm (s) – the duration of time for which the voltage (or logic state) is high;
  • ts (s) – the duration of time for which the voltage (or logic state) is low.

With the use of two resistors and one capacitor, you can determine the period durations. Consider the following schematic:

555astableschematic

Calculating values for R1, R2 and C1 was quite simple. You can either determine the length of time you need (t) in seconds, or the frequency (Hz) – the number of pulses per second.

t (time) = 0.7 x (R1 + [2 x R2]) x C1

f (frequency) = 1.4 / {(R1 + [2 x R2]) x C1}

Where R1 and R2 are measured in ohms, and C1 is measured in farads. Remember that 1 microfarad = 1.0 × 10-6 farads, so be careful to convert your capacitor values to farads carefully. It is preferable to keep the value of C1 as low as possible for two reasons – one, as capacitor tolerances can be quite large, the larger the capacitor, the greater your margin of error; and two, capacitor values can be affected by temperature.

How the circuit works is relatively simple. At the time power is applied, the voltage at pin 2 (trigger) is less than 1/3Vcc. So the flip-flop is switched to set the 555 output to high. C1 will charge via R1 and R2. After a period of time (Tm from the diagram above) the voltage at pin 6 (threshold) goes above 2/3Vcc. At this point, the flip-flop is switched to set the 555 output to low. Furthermore, this enables the discharge function – so C1 will discharge via R2. After a period of time (Ts from the diagram above) the voltage at pin 2 (trigger) is less than 1/3Vcc. So the flip-flop is switched to set the 555 output to high… and the cycle repeats.

Now, for an example, I want to create a pulse of 1Hz (that is, one cycle per second). It would be good to use a small value capacitor, a 0.1uF. In farads this is 0.0000001 farads. Phew. So our equation is 1=1.4/{(R1 + [2 x R2]) x C1}. Which twists out leaving us R1=8.2Mohm, R2=2.9MOhm and C1 is 0.1uF. I don’t have a 2.9MOhm resistor, so will try a 2.7MOhm value, which will give a time value of around 0.9s. C2 in astable mode is optional, and used if there is a lot of electrical noise in the circuit. Personally, I use one every time, a 0.01uF ceramic capacitor does nicely. Here is our example in operation:

Notice how the LED is on for longer than it is off, that is due to the ‘on’ time being determined by R1+R2, however the ‘off’ time is determined by R2 only. The ‘on’ time can be expressed as a percentage of the total pulse time, and this is called the duty cycle. If you have a 50% duty cycle, the LED would be on and off for equal periods of time. To alter the duty cycle, place a small diode (e.g. a 1N4148) over pins 7 (anode) and 2 (cathode). Then you can calculate the duty cycle as:

Tm = 0.7 x R1 x C1 (the ‘on’ time)

Ts = 0.7 x R2 x C1 (the ‘off’ time)

Furthermore, the 555 can only control around 200mA of current from the output to earth, so if you need to oscillate something with more current, use a switching transistor or a relay between the output on pin 3 and earth. If you are to use a relay, put a 1N4001 diode between pin 3 (anode) and the relay coil (cathode); and a 1N418 in parallel with the relay coil, but with the anode on the earth side. This stops any reverse current from the relay coil when it switches contacts.

Monostable operation

Mono for one – one pulse that is. Monostable use is also known as a “one-shot” timer.  So the output pin (3) stays low until the 555 receives a trigger pulse (drop to low) on pin 2. The length of the resulting pulse is easy to calculate:

T = 1.1 x R1 x C1;

where T is time in seconds, R1 is resistance in ohms, and C1 is capacitance in farads. Once again, due to the tolerances of capacitors, the longest time you should aim for is around ten minutes. Even though your theoretical result for T might be 9 minutes, you could end up with 8 minutes 11 seconds. You might really need those extra 49 seconds to run away…  Though you could always have one 555 trigger another 555… but if you were to do that, you might as well use a circuit built around an ATmega328 with Arduino bootloader.

Now time for an example. Let’s have a pulse output length of (as close as possible to) five seconds. So, using the equation, 5 = 1.1 x R1 x C1… I have a 10 uF capacitor, so C1 will be 0.00001 farads. Therefore R1 will be 454,545 ohms (in theory)… the closest I have is a 470k, so will try that and see what happens. Note that it you don’t want a reset button (to cancel your pulse mid-way), just connect pin 4 to Vs. Here is the schematic for our example:

555monostable

How the monostable works is quite simple. Nothing happens when power is applied, as R2 is holding the trigger voltage above 1/3Vcc. When button S1 is pushed, the trigger voltage falls below 1/3Vcc, which causes the flip-flop to set the 555’s output to high. Then C1 is charged via R1 until the threshold voltage 2/3Vcc is reached, at which point the flip-flip sets the output low and C1 discharges. Nothing further happens until S1 is pressed again. The presence of the second button S2 is to function as a reset switch. That is, while the output is high the reset button, if pressed, will set the output low and set C1 to discharge.

Below is a video of my example at work. First I let it run the whole way through, then the second and subsequent times I reset it shortly after the trigger. No audio in clip:

Once again, we now have a useful form of a one-shot timer with our 555.

Bistable operation

Bistable operation is where the 555′s output is either high, or low – but not oscillating. If you pulse the trigger, the output becomes and stays high, until you pulse reset. With a bistable 555 you can make a nice soft-touch electronic switch for a project… let’s do that now, it is so simple you don’t need one of my quality schematics. But here you are anyway:

555bistablesch

In this example. pressing S1 sets the voltage at pin 2 (trigger) to below 1/3Vcc, thereby setting the output to high – therefore we call S1 our ‘on’ switch. As pin 6 (threshold) is permanently connected to GND, it cannot be used to set the output to low. The only way to set the output back to low is by pressing S2 – the reset button, which we can call the ‘off’ switch. Couldn’t be easier, could it? And that output pin could switch a transistor or a relay on or off, who knows? Your only limit is your imagination. And here’s one more video clip:

And there you have it – three ways in which we can use our 555 timer ICs. But in the year 2011, why do we still use a 555? Price, simplicity, an old habit, or the fact that there are so many existing designs out there ready to use. There will be many arguments for and against continued use of the 555 – but as long as people keep learning about electronics, the 555 may still have a long and varied future ahead of it.

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.

References

[1] “The 555 Timer IC – An interview with Hans Camenzind” (Jack Ward – semiconductormuseum.com)

Various diagrams and images from the Texas Instruments NE555 data sheet.

Posted in 555, clocks, COM-09273, electronics, LCD, lesson, tronixstuff, tutorial, xbee16 Comments

Breaking up an automatic room deodoriser – round two

Again we attempt to break down an automatic room deodoriser.

Updated 18/03/2013

Today we are going to tear down another automatic room deodoriser. Why? Well the first attempt beat me, so it was time to even the score and try again with another type. The supermarket had the following units for $7.99, which seemed a little too cheap:

brandnewss1

The “satisfaction guarantee” gave me a chuckle, the thought of writing to SC Johnson complaining that their products were not that hackable would be interesting. But would it be hackable at all? Let’s find out. The packaging promises a squirt of scent when the unit detects motion, then holds out for 30 minutes until the next release. The word motion hints that there would be a PIR inside the unit. However the instructions mention that the unit does not work that well in dark or bright rooms – which is odd, as PIRs usually work in the dark. Hmm. This unit is somewhat smaller than the previous attempt, yet still offers us a pair of alkaline AA cells:

insidess

Moving on, time to start the disassembly process. The rear shows four screws, easily removed:

backss

revealing the fun things:

gearsss

The motor drive is reduced twice, which then has a geared arm which causes the vertical motion to pressure the cylinder to release the scent. The whole mess of gears was lubricated generously, the whole lot literally came out with the touch of a finger. Removing the gears and goop reveals the motor and control boards, which clipped out easily:

motorpcbss

Interesting – a labelled motor. Very good, what looks like to be a 3V DC motor. The control board is made up of two PCBs, a smaller module that holds a control IC of some sort, and the larger, lesser-densely populated board with the button, status LED and “motion detector”. Let’s have a close-up of that PCB:

pcbaloness

So we have the button, which causes the motor to run; a yellow LED which blinks once every five seconds; and out motion detector in the black casing. The motion detector seemed rather familiar, so I removed the black housing around it with some pliers, which revealed this:

lightsensorss

Huh – that looks just like an LED. The metal object inside the clear casing was even identical to what you would see inside an LED. However, foolishly I broke it off the PCB when removing the housing, so could not get any voltage to it. From reading the instructions earlier on – that mention the light/dark issue, causes me to ponder if this is some sort of light-dependent sensor?

No – it is a photodiode! However the motor looked quite worthwhile. Curious to see what is driving it, I hooked up Mr Fluke to see what happens:

No surprises there, almost three volts DC forward voltage. After applying forward current the circuit applies a quick reverse current to release, thereby causing the gears and arm to ‘squeeze’ down on the scent cylinder. So now we have a circuit board that runs on 3V, which can output 3V for a few seconds every 30 minutes – or at the press of a button.

With regards to current, another measurement was taken:


When free-running, the motor draws around 45 milliamps – and the stall current (that is, the current drawn when I force the spindle to stop) is around 675 milliamps. That is quite a strong little motor, and worth the effort. In general, this has been a good tear down, we scored some AA cells, a good motor and gears, some stink spray, and a timing circuit that could have uses elsewhere. So overall a win – the score has evened with the deodoriser world! High resolution photos available on 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 electronics, hardware hacking, room deoderiser, tutorial4 Comments

Australian Electronics Nostalgia – “Funway Kits”

Hello readers

After viewing the trailer for Karl von Muller’s upcoming documentary State of Electronics – A discussion on the Electronics Industry in Australia, it brought back some fond memories of bashing about with a range of kits from many years ago. So today we will have a look at a few of them. But first some history (feel free to correct me here)…

In 1968 an enthusiastic man by the name of Dick Smith started a small car radio shop in Neutral Bay, Sydney. Although he had many ups and downs – through extremely hard work, marketing in ways Australia had never seen before (see the bus below), and revolutionising electronics and computer retailing in this country – he built up Dick Smith Electronics to a company so large he sold it for a huge sum and moved on to other successful ventures. You can download his biography from here.

Dick Smith Electronics’ stores were the place to go for components, a huge range of electronic kits, an interesting range of computers (in [earlier] kit and assembled form), amateur and CB radio – all the fun stuff. You would almost need a shotgun to clear the store out on a Thursday night or Saturday afternoon. There were also repair centres in each capital city and head office, that employed people to fix things for warranty service (and they would fix kits for a price as well). Before the internet one would stalk the mailbox waiting for the new catalogue to arrive. I even worked there for four years in the 1990s. Unfortunately due to market changes and carbon-based factors, the stores are now just glorified flat-screen TV and video game outlets.

However, partly to educate people (and probably to make more money), Dick Smith wrote a series of books titled “Fun Way into Electronics”, starting with the first in 1979. This entailed twenty very basic electronic circuits, such as flashing LEDs using a multivibrator, basic transistor amplifiers, and a “beer powered radio” (I wonder how many children tried that fuel cell?). The book had paper overlays which you would glue onto a piece of chipboard, and screw the components down to form a circuit. Later editions would use a plastic board with holes:

3143205539_96d689c02e_z

The Funway book was very popular (and still is with some schools, Scout groups and so on), so Dick published volume two from 1980. Finally some “real” projects – twenty kits that required soldering and could be of some real use in the world. Items such as a shortwave radio, intercom, timing devices, digital counters, and a mosquito repeller of dubiuos success. However they sold very well, and in 1984 the final volume of the Funway trilogy was published – another ten projects – “each with an integrated circuit!”

The books were illustrated in a very clear, simple way sometimes hand-drawn but very neat. I suspect some women in the books were meant to resemble associates of Dick Smith, and in general the book is a ‘snapshot’ of the times. For example, the transistor radio:

radiobikewoman

Please note that I will not email you a .pdf of any of the books mentioned, so kindly don’t ask – they’re still Copyright DSE Pty Ltd. Part of my reasoning for this article was the fact that the Funway era has now drawn to a close. Whilst recently wandering about in a Dick Smith store for some reminiscing, I noticed the remaining stock of Funway 2 kits on the clearance bench and the matching volume two books, which compelled me to rescue them.

At the register, the sales clerk asked me “Why would you want to make a radio?” … ugh

So let’s take a trip back to 1980 and see how they perform!

[Update 07/07/2013]

Wow! I found another kit – project seventeen, the LED level display. It was designed to show audio levels in a blinky form – the addition of a pair to your home or car hi-fi would put those analogue VU meters to shame whilst impressing your friends. When fitted inside the optional box and the label applied, you could be as cool as the guy below looking like he’s getting revved up for a night at the discotheque:

discodude

So time to give it a whirl. I remember this kit back in 1985 when a friend gave it to me from someone else, he cut off the LEDs for himself, and I ended up with the useless board. Thanks Tony. Well 28 years later here I am with the brand-new version:

proj17

Otherwise everything was as expected, all the parts and the poor PCB included:

parts

pcb

Construction was relatively simple but tedious, 22 resistors, 10 diodes, 10 LEDs, 11 transistors etc… just careful and steady work to get it done. This would have kept a teenager busy for a good weekend inside. After an hour and an espresso the board was populated:

board

Not wanting to chop up any audio leads to test the kit, I’ve instead put some pins on the power supply and input pairs for a quick demonstration. For a signal I’ve attached a function generator and fed a sine wave at various low frequencies. Here it is in action:

In hindsight that’s a pretty fun kit, and with some careful work it would have looked good in a contemporary audio system. It probably could have been done a lot easier with an LM3914 however the cost may have been prohibitive at the time.

Next we have Project Sixteen –  the Electronic Siren. This is basically two 555 oscillators, one for the sound, and the other for the duration – which combined with a basic amplifier make a “hee-haw” sound. This kit would have been included as a good sales add-on for the Home and Car alarm kit also described in the book. Typical of the series, when you purchased a kit it would come with the bare minimum, just enough to make it work (excluding the battery):

sirenpartsss

Naturally a full range of extras would be mentioned in the book, available from the store when required. The PCB looks like it was made at home – examining this one I can now be more grateful than ever for silk-screening and solder-masking on current PCBs:

sirenpcbss

To make annoying people easier I will add in a SPDT toggle switch, and use some IC sockets for the 555s. Assembling the kit took no time at all, the instructions were clear and easy to follow:

sirenbookss

Starting the soldering caused some flashbacks to my childhood, which were interesting. Assembling this at my age was much quicker than as a young lad – my soldering style has changed, and I also have a Fluke 233 to check the resistor and capacitor values. There was one nod to the future in the kit, the polyester capacitor was replaced by an MKT. The only reason to use the IC sockets was so I could reuse the 555s later on. Moving on, here is the finished article:

sirenfinishedss

And did it work? Absolutely – have a listen:


It is really quite loud, that 0.25 watt speaker is being pushed quite hard. According to the book you can connect a horn-speaker directly to the output. Furthermore there are suggestions on how to alter the frequency and duration of the sounds. So overall, this was an easy to assemble kit that was still some fun even to this day.

The next kit to examine is Project Eleven – FM wireless microphone. This consists of an oscillator of around 100 MHz, which receives a signal via the tiny electret microphone. The book illustration shows a Donna Summer lookalike with a guitar, however one could imagine people building these kits and using them as ‘bugs’ and generally getting up to no good:

txbookss

Again, the clear images and instruction layouts are constant throughout the book. There were two errata sheets included with the components, as the design has been altered a few times. However they were easy enough to follow, and the correct replacement parts had been included:

txbitsss

Once more the PCB was a product of the time. After having issues with the siren kit’s PCB, I gave this one a good squirt with some Servisol PCB cleaner – that made a difference when it was time to solder:

txpcbss

From a beginner’s perspective, this would have been a slightly more difficult kit to assemble, due to the all the vertical resistors and the close spacing between the components. However this was to enable budding ASIO operatives to make their ‘bug’ as small as possible. From memory this is the trickiest of them all, the rest of the Funway 2 kits had generous PCB spacing. I must admit to breaking a 470 pF ceramic capacitor, but that was my own silly fault. However at the end it all came together nicely:

txworkss

And it worked.  I have a feeling that the variable capacitor was damaged a little from heat due to the soldering process, for some insane reason DSE supplied a plastic-encased version. Later on I will replace it and see how we go. But for the meanwhile, with a 20cm aerial wire, I could get about 5 metres out of it with a brick wall in between. Considering the target market for this, that’s pretty good.

The next kit is Project Seven – Pocket Transistor Radio. This is a basic amplitude-modulation radio receiver making use of the MK484 radio-receiver IC. This is a bog-standard simple AM receiver circuit that dates back to the early 1970s. However, it is simple and uses very few parts. Originally the kit was sold without an earpiece or socket, but the last few batches included everything but the battery and a switch:

radiopartsss

Once again there were two errata sheets – one explaining the different pinouts of the MK484/ZN414 radio IC, and another showing the evolution of the radio circuit, a capacitor had been replaced with a resistor. There were a couple of tricks to assembling this kit, some pin spacings were unnecessarily close together, and the leads on the antenna coils were terribly difficult for me to discern. Thankfully the book offered some great advice – use a multimeter to determine the resistance of each coil. The coil with the lower resistance is the aerial coil, and the higher resistance is the main coil. And once again I have added a power switch. After some trepidation, the main board was finished:

rxfinishedss

Ah – where is the 9V battery? With regards to the circuit, versions as published in the book and the errata sheet are quite inefficient with regards to power usage. Let’s have a look:

radiocircuitss

As part of my electronics learning process, I like to follow the circuit through to see what is going on. The book has the power being supplied by a 9V battery, then using a 6.8V Zener diode. What was the point of that? Instead, I put a link on the PCB instead of the zener, and now the power is from a single AA cell. Much, much cheaper to run now, the receiver only draws nine milliamps of current:

And to think some people have to recharge their music players every day. The radio worked from the first time the battery was connected, and is working very well. The volume/gain is controlled by the 5k trimpot, I have this set to around half-way to a comfortable volume. The reception is highly relative to the positioning of the ferrite rod aerial, so I have locked it into place using some blutac. It receives local AM stations very well, and also some rural stations from interstate. For the price and the amount of parts, this is a very simple, easy to construct receiver with excellent power consumption – which is begging for a solar panel for daytime use. Maybe next week! So we have another success.

Update! I found another kit – the “Universal Timer”. This is basically an over-engineered 555 timer that controls a simple SPDT relay. The 555 is configured as a monostable timer, and the duration controlled by a 1 mega ohm trimpot. I have a feeling the design brief was for an egg timer, based on the illustrations:

timerbookss

Once again, the illustrations of the final product don’t bear much of a resemblance to the contents of the basic kit:

timerpartsss

Again, the PCB was quite basic and needed a good clean:

timerpcbss

Construction was quite simple, all of the parts fitted nicely where they were meant to. Not bad considering the PCB was designed around thirty years ago, and the parts are much more recent – especially the relay. To make some sort of demonstration I had to add a few extras – a power switch, the piezo buzzer, IC socket and a potentiometer instead of the trimpot:

timerfinishedss

Though once again it worked, and I actually have a use for it – a shower timer for an intelligent person who seems to forget the concept of time when in the bathroom. A quick trip to the store for a moisture-proof IP67-rated box and we’ll be set.

Unfortunately with the discontinuation of these Funway kits means another opportunity to teach people has gone. I hope you found this article interesting, and helped motivate you to expand your knowledge and those of others in the STEM (science, technology, electronics and maths) area. If you have any Funway projects to share, please get in touch. Some higher-resolution images available on 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 education, electronics, funway, history, kit review, learning electronics16 Comments

Upcoming Electronics Industry Documentary

Hello readers

Today I am going to introduce something quite different, yet hopefully interesting to you out there. The renowned director and cinematographer Karl von Muller has just released the trailer for his upcoming documentary titled “State of Electronics” – a discussion on the Electronics Industry in Australia. Although the focus is on the Australian electronics scene, much of the content and discourse within the documentary can be related to by those from many other countries.

However, Karl can explain it better:

After several months of researching, interviewing and filming, I’m excited to present the first public Trailer to my new Documentary “State of Electronics” – A discussion on the Electronics Industry in Australia. Even though the documentary is focused on Australian Electronics Design and Manufacture, much of it applies to all countries from around the world.

The discussion is focused initially on the world of Hobby Electronics and how it’s decline could affect the Electronics Industry in the future. The Documentary then discusses many issues that face industry including the issue of “Repair and Recycle”, “Education”, “Surface Mount Technology”, “Globalisation”, “Opportunities” and many many more off the cuff & candid comments from Industry professionals.

The Documentary features interviews with famous Australians and Industry professionals including Dick Smith, Dave L Jones, Doug Ford, Leo Simpson, Grant Petty, Matthew Pryor, Jonathan Oxer, Andy Gelme, Andrew Griffiths, Eugene Ruffolo & Bill Petreski. In the future, I am planning to interview just a few more before the final release of the Documentary soon.

Shot completely on the Canon 5DMK2, using the Zoom H4N Audio recorder. Directed, Edited and shot by Karl von Moller, this version of the trailer is largely ungraded and only has an FCP sound mix applied. Music track is composed by Karl von Moller also. Enjoy!

Please visit karlvonmoller.com for more on the progress and information on “State of Electronics”

Here is the trailer for your enjoyment, on Vimeo or YouTube (below):

As an Australian, an educator and an electronics enthusiast, I encourage you to view the trailer and share it with as many people as possible. If you have contacts in the broadcast media, please talk to them about this documentary and suggest it for screening.

Posted in education, electronics, history2 Comments


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: