Tag Archive | "Vishay"

Project Review – Silicon Chip Capacitance Substitution Box

Introduction

Every month Australian electronics magazine Silicon Chip publishes a variety of projects, and in some cases various (well … one of two) electronics retailers will pick up the project and offer it as a kit. However for an increasing number of new projects they don’t, which leaves the interested reader with one option – build the entire project from scratch.

But thankfully this is no longer the case – as the team from Silicon Chip now offer a range of project PCBs and matching front panels for sale directly from their website. Although buying these parts is not the cheapest option, it gives the busy person who likes making things a quick start – or the inexperienced more opportunities to complete a successful project.

So as a test of this new service, I bought the PCB and front panel for the Capacitance Substitution Box project described by Nicholas Vinen in the Juily 2012 issue of SC:

capacitance_article

This is something I’ve meant to make for a while – but didn’t really have the inclination to make one from scratch, so it was neat to see a version published in the magazine. I believe the subjects in the magazine article are oftern prototypes, which explains the difference in colour for the front panel.

The parts arrived in a week after placing the order, and are of a high quality:

capacitance box panel

capacitance pcb front

capacitance pcb rear

When complete, the capacitance substitution box PCB and panel will fit nicely into an Altronics H0151 enclosure, so you don’t need to do any drilling or filing. The next task was to organise the required parts. The rotary switches, terminal posts and the usual odds and ends can be found at Altronics, Jaycar or other suppliers. However the main components – the capacitors – offered two options.

The first option is to simply use capacitors from personal stock or the stores. However the tolerance of these parts can vary wildly, with up to twenty percent either way. This is ok for simple uses, however when values are combined – the tolerance of larger values can negate the lower values completely. So instead I’ve chosen the second option – which involves using brand-name low-tolerance capacitors.

Thus I turned to element14 who stock not only a huge range of not only regular but also the low-tolerance capacitors, and can also have them on my desk usually by the next working day. Finally, it’s nice to have all the parts arrive in little bags… neatly organised ready to go:

capacitors

It’s easy to search for low-tolerance parts with element14, as the automatic filtering has tolerance as a parameter:

element14 capacitors

Furthermore you can also ensure you have the voltage rating of at least 50V DC as well. So after half an hour the capacitor order was completed and arrived when expected – using parts from Panasonic, Vishay, and Wima. The tolerances of our capacitors used varied between one and ten percent, which will help improve the accuracy of the substitution box.

Assembly

The PCB has the capacitor values labelled neatly on the silk-screen, so soldering in all the capacitors was a relatively simple but long operation. Having them arrive in separate packets made life a lot easier. During the soldering process it’s a good idea to have a  break or two, which helps you avoid fatigue and making any mistakes.

capacitance substitution box half finished

There may be a few capacitors that are a little too wide to fit with the others, so they can be mounted on the other side of the PCB:

capacitance substitution box wide capacitor

However they all end up fitting well:

capacitance substitution box half finished

The next step was to configure the first rotary switch for six position use, then cut the plastic stopped from the side of each rotary switch. In the following image you have a before and after example:

capacitance substitution box rotary switches

Now the rotary switches can have their shafts trimmed and then be soldered onto the PCB:

capacitance substitution box switches trimmed

However ensure you have the first rotary switch in the right way – that is the selections are selected across the top half, not the bottom. Remove the nuts from the rotary switches, and double-check all the capacitors are fitted, as once the next step is completed … going back will be difficult to say the least.

At this point the banana sockets can be fitted to the panel, and then soldered into place, and then you’re finished. Just place the panel/PCB combination inside the box and screw it down:

capacitance substitution box complete

Using the Capacitance Substitution Box

Does it work? Yes – however you don’t get exact values, there will always be a tolerance due to the original tolerance of the capacitors used and the stray capacitance of the wires between the box and the circuit (or capacitance meter). Nevertheless our example was quite successful. You can see the box in action with our Altronics LC meter kit in this video.

Again, using the best tolerance capacitors you can afford will increase the accuracy of this project.

Conclusion

Over time this would be a useful piece of equipment to have – so if your experiments or projects require varying capacitor value, this project will serve the purpose nicely. Plus it helps with mental arithmetic and measures of capacitance! Please do not ask me for copies of the entire Silicon Chip article, refusal may offend. Instead – visit their website for a reprint or digital access.

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 capacitor, kit review, projects, silicon chip, substitution box

Tutorial: Arduino and Infra-red control

Learn how to use Arduino and infra-red remote controls in chapter thirty-two 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 10/07/2013

In this article we will look at something different to the usual, and hopefully very interesting and useful – interfacing our Arduino systems with infra-red receivers. Why would we want to do this? To have another method to control our Ardiuno-based systems, using simple infra-red remote controls.

A goal of this article is to make things as easy as possible, so we will not look into the base detail of how things work – instead we will examine how to get things done. If you would like a full explanation of infra-red, perhaps see the page on Wikipedia. The remote controls you use for televisions and so on transmit infra-red beam which is turned on and off at a very high speed – usually 38 kHz, to create bits of serial data which are then interpreted by the receiving unit. As the wavelength of infra-red light is too high for human eyes, we cannot see it. However using a digital camera – we can. Here is a demonstration video of IR codes being sent via a particularly fun kit – the adafruit TV-B-Gone:

Now to get started. You will need a remote control, and a matching IR receiver device. The hardware and library used in this tutorial only  supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw IR protocols. Or you can purchase a matching set for a good price, such as this example:

irpackage

Or you may already have a spare remote laying around somewhere. I kept this example from my old Sony Trinitron CRT TV after it passed away:

sonyremote1

It will more than suffice for a test remote. Now for a receiver – if you have purchased the remote/receiver set, you have a nice unit that is ready to be wired into your Arduino, and also a great remote that is compact and easy to carry about. To connect your receiver module – as per the PCB labels, connect Vcc to Arduino 5V, GND to Arduino GND, and D (the data line) to Arduino digital pin 11.

Our examples use pin 11, however you can alter that later on. If you are using your own remote control, you will just need a receiver module. These are very cheap, and an ideal unit is the Vishay TSOP4138 (data sheet .pdf). These are available from element-14 and the other usual retail suspects. They are also dead-simple to use. Looking at the following example:

From left to right the pins are data, GND and Vcc (to Arduino +5V). So it can be easily wired into a small breadboard for testing purposes. Once you have your remote and receiver module connected, you need to take care of the software side of things. There is a new library to download and install, download it from here. Please note that library doesn’t work for Arduino Leonardo, Freetronics Leostick, etc with ATmega32U4. Instead, use this library (and skip the modification steps below). Extract the IRremote folder and place into the ..\arduinoxxx\libraries folder. Then restart your Arduino IDE if it was already open.

Using Arduino IDE v1.0 or greater? Open the file “IRRemoteInt.h” in the library folder, and change the line

Then save and close the file, restart the Arduino IDE and you’re set.

With our first example, we will receive the commands from our remote control and display them on the serial monitor:

Open the serial monitor box, point your remote control to the receiver and start pressing away. You should see something like this:

What have we here? Lots of hexadecimal numbers. Did you notice that each button on your remote control resulted in an individual hexadecimal number? I hope so. The number FFFFFFFF means that the button was held down. The remote used was from a yum-cha discount TV. Now I will try again with the Sony remote:

This time, each button press resulted in the same code three times. This is peculiar to Sony IR systems. However nothing to worry about. Looking back at the sketch for example 32.1, the

section is critical – if a code has been received, the code within the if statement is executed. The hexadecimal code is stored in the variable

with which we can treat as any normal hexadecimal number. At this point, press a few buttons on your remote control, and take a note of the matching hexadecimal codes that relate to each button. We will need these codes for the next example…

Now we know how to convert the infra-red magic into numbers, we can create sketches to have our Arduino act on particular commands. As the IR library returns hexadecimal numbers, we can use simple decision functions to take action. In the following example, we use switch…case to examine each inbound code, then execute a function. In this case we have an LCD module connected via I2C, and the sketch is programmed to understand fifteen Sony IR codes. If you don’t have an LCD you could always send the output to the serial monitor. If you are using the DFRobot I2C LCD display, you need to use Arduino v23.

Furthermore you can substitute your own values if not using Sony remote controls. Finally, this sketch has a short loop after the translateIR(); function call which ignores the following two codes – we do this as Sony remotes send the same code three times. Again. you can remove this if necessary. Note that when using hexadecimal numbers in our sketch we preced them with 0x:

And here it is in action:


You might be thinking “why would I want to make things appear on the LCD like that?”. The purpose of the example is to show how to react to various IR commands. You can replace the LCD display functions with other functions of your choosing.

At the start working with infra-red may have seemed to be complex, but with the previous two examples it should be quite simple by now. So there you have it, another useful way to control our Arduino systems. Hopefully you have some ideas on how to make use of this technology. In future articles we will examine creating and sending IR codes from our Arduino. Furthermore, a big thanks to Ken Shirriff for his Arduino library.

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, control, DFR0107, dfrobot, education, infrared, IR, learning electronics, lesson, microcontrollers, remote, tronixstuff, tutorialComments (17)

Education – Introduction to the Optocoupler

Hello everyone!

Today we are going to start examining Optocouplers. These are an interesting and quite convenient component, and relatively easy to implement.

First of all, what is an optocoupler?

It is a small device that allows the transmission of a signal between parts of a circuit while keeping those two parts electrically isolated. How is this so? Inside our typical optocoupler are two things – an LED and a phototransistor. When a current runs through the LED, it switches on  – at which point the phototransitor detects the light and allows another current to flow through it. And then when the LED is off, current cannot flow through the phototransistor. All the while the two currents are completely electrically isolated (when operated within their stated parameters!)

Let’s have a look at some typical optocouplers. Here are the schematic symbols for some more common units:

schematicsss

Switching DC current will flow from A to B, causing current to flow from C to D. The schematic for figure one is a simple optocoupler, consisting of the LED and the photo-transistor. However, this is not suitable for AC current, as the diode will only conduct current in one direction. For AC currents, we have an example in figure two – it has diodes positioned to allow current to flow in either polarity. Figure three is an optocoupler with a photodarlington output type. These have a much higher output gain, however can only handle lesser frequencies (that is, they need more time to switch on and off).

Physically, optocouplers can be found in the usual range of packaging, such as:

4n25

Notice the DIP casing doesn’t have the semi-circle moulded into one end like ICs do, so the white dot indicates pin one.

TO-78 (“Sputnik!”)

surface-mount SOIC-8

Some of you may be thinking “why use an optocoupler, I have a relay?” Good question. There are many reasons, including:

  • Size and weight. Relays are much larger, and heavier;
  • Solid state – no moving parts, so no metal fatigue;
  • Optocouplers are more suited to digital electronics – as they don’t have moving parts they can switch on and off much quicker than a relay;
  • Much less current required to activate than a relay coil
  • The input signal’s impedance may change, which could affect the circuit – using an optocoupler to split the signal removes this issue;

Furthermore, the optocoupler has many more interesting uses. Their property of electrical isolation between the two signals allows many things to be done. For example:

  • you might wish to detect when a telephone is ringing, in order to switch on a beacon. However you cannot just tap into the telephone line. As the ring is an AC current, this can be used with an AC-input optocoupler. Then when the line current starts (ring signal) the optocoupler can turn on the rest of your beacon circuit. Please note that you most likely need to be licensed to do such things. Have a look at the example circuits in this guide from Vishay: Vishay Optocouplers.pdf.
  • You need to send digital signals from an external device into a computer input – an optocoupler allows the signals to pass while keeping the external device electrically isolated from the computer
  • You need to switch a very large current or voltage, but with a very small input current;
  • and so on…

But as expected, the optocoupler has several parameters to be aware of. Let’s look at a data sheet for a very common optocoupler, the 4N25 – 4N25 data sheet.pdf – and turn to page two. The parameters for the input and output stages are quite simple, as they resemble those of the LED and transistor. Then there is the input to output isolation voltage – which is critical. This is the highest voltage that can usually be applied for one second that will not breach the isolation inside the optocoupler.

Side note: You may hear about optoisolators. These are generally known as optocouplers that have output isolation voltages of greater than 5000 volts; however some people regularly interchange optocouplers and optoisolators.

The next parameter of interest is the current-transfer ratio, or CTR. This is the ratio between the output current flow and the input current that caused it. Normally this is around ten to fifty percent – our 4N25 example is twenty percent at optimum input current. CTR will be at a maximum when the LED is the brightest – and not necessarily at the maximum current the LED can handle. Once the CTR is known, you can configure your circuit for an analogue response, in that the input current (due to the CTR) controls the output current.

needabench

Finally, the frequency, or bandwidth the optocoupler can accept.  Although this can be measured in microseconds, these parameters can be altered by other factors. For example, the higher the frequency of the current through the input stage, the less accurate the output stage can render the signal. The phototransistors can also be a function of the maximum bandwidth; furthermore if the optocoupler has a darlington output stage, the bandwidth can be reduced by a factor of ten. Here is an example shown on the old cathode-ray oscilloscope. I have set up a digital pulse, at varying frequencies. The upper channel on the display is the input stage, and the lower channel is the output stage:

Notice as the frequency increases, the ability of the output stage to accurately represent the input signal decreases, for example the jitter and the generally slow fall time. Therefore, especially working with high speed digital electronics, the bandwidth of your optocoupler choice does need to be taken into account.

Thus ends the introduction to optocouplers. I hope you understood and can apply what we have discussed today. 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.

Some information from various Isocom and Vishay data sheets and publications; various optocoupler images from element14.

Posted in 4N25, education, learning electronics, lesson, optocoupler, tutorialComments (14)


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: