Posts | Comments

Planet Arduino

Archive for the ‘logic’ Category

Introduction

Every month Australian electronics magazine Silicon Chip publishes a few projects, and in this kit review we’ll look at an older but still current example from August 2004 – the 3-state Logic Probe Kit (Mk II). This is an inexpensive piece of test equipment that’s useful when checking digital logic states and as a kit, great for beginners. Avid readers of my kit reviews may remember the SMD version we examined in June… well it wasn’t that much of a success due to the size of the parts. However this through-hole version has been quite successful, so keep reading to find out more

Assembly

The kit is packaged in typical form, without any surprises:

bag

 In typical Altronics fashion, an updated assembly guide is provided along with a general reference to common electronics topics:

bagcontents

 All the required parts are included – except for a 14-pin IC socket and two CR2016 batteries.

parts

 The PCB makes soldering easy with the silk-screen and solder mask:

pcbtop

 However the resistor numbering is a bit out of whack, a few R-numbers are skipped. So before soldering, measure and line up all the resistors in numbered order – doing so will reduce the chance of fitting them in the wrong spot.

pcbbottom

When it comes time to solder the power switch on the end, it’s necessary to clip off two tabs – one at each end of the switch. However this isn’t a problem:

solderswitchon

Soldering in the rest of the components wasn’t any effort at all, they’ve been spaced around the PCB nicely:

gettingthere

 Once they’re in, it’s time to insert the pins that hold the probe (shown on the left below):

pinsforprobe

 A full-sized probe is included with the kit, which you cut down with a hacksaw to allow it to fit on the end of the PCB. Then solder a short wire from the tip’s collar and run it through the body as such:

pinsforprobe2

 At this point, it’s time to break out the butane torch:

blowtorch

… with which you melt down the heatshrink over the tip, then fit it to the PCB and solder the probe wire:

testing

At this point it’s wise to fit the batteries and test that the probe works, as the next stage is to heatshrink the entire circuit to the left of the LEDs:

finished

Use

Using the probe is incredibly simple – however note that it’s designed for working with 5V logic. If you need to use higher voltages the probe can be assembled with slightly different circuit to take care of that eventuality. Moving forward simply clip the lead to GND on the circuit under test, then probe where you want to measure. The LEDs will indicate either HIGH, LOW or the PULSE LED will light when a fault is apparent, or other need for further research into the circuit. Here’s a quick demonstration probing a signal from an Arduino board:

Conclusion

This through-hole version of the logic probe kit was much easier to construct than the SMD version, and worked first time. A logic probe itself is a very useful tool to have and I highly recommend this kit for the beginner who enjoys projects and is growing their stable of test equipment on a budget. You can find the kit at Altronics and their distributors.

Full-sized images available 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.

[Note - kit purchased without notifying the supplier]

The post Kit review – Altronics Logic Probe Mk II appeared first on tronixstuff.

Jul
31

Various 1 Hz Oscillator Methods

1 hz, 555, 74hc14, astable, clock, clocks, digital, DS1307, DS3232, em406a, gps, logic, pps, timebase, tronixstuff, TTL, tutorial Comments Off on Various 1 Hz Oscillator Methods 

Introduction

During the fun and enjoyment of experimenting with electronics there will come a time when you need a nice 1 Hz oscillator to generate a square-wave signal to drive something in the circuit. On… off… on… off… for all sorts of things. Perhaps a metronome, to drive a TTL clock, blink some LEDs, or for more nefarious purposes. No matter what you need that magic 1 Hz for – there’s a variety of methods to generate it – some more expensive than others – and some more accurate than others.

A few of you may be thinking “pull out the Arduino” and yes, you could knock out a reasonable 1 Hz – however that’s fine for the bench, but wild overkill for embedding a project as a single purpose. So in this article we’ll run through three oscillator methods that can generate a 1 Hz signal (and other frequencies) using methods that vary in cost, accuracy and difficulty – and don’t rely on mains AC. That will be a topic for another day.

Using a 555 timer IC

You can solve this problem quite well for under a dollar with the 555, however the accuracy is going to heavily rely on having the correct values for the passive components. We’ll use the 555 in astable mode, and from a previous article here’s the circuit:

555 astable 1 Hz circuit

 And with a 5V power supply, here’s the result:

555-1

As you can see the cycle time isn’t the best, which can be attributed to the tolerance of the resistors and capacitor C1. A method to increase the accuracy would be to add small trimpots in series with the resistors (and reduce their value accordingly by the trimpot value) – then measure the output with a frequency counter (etc). whilst adjusting the trimpots. If you’re curious about not using C2, the result of doing so introduces some noise on the rising edge, for example:

555-2noise

So if you’ve no other option, or have the right values for the passives – the 555 can do the job. Or get yourself a 555 and experiment with it, there’s lots of fun to be had with it.

Using a GPS receiver module

A variety of GPS modules have a one pulse per second output (PPS) and this includes my well-worn EM406A module (as used in the Arduino tutorials):

EM406AGPS

With a little work you can turn that PPS output into a usable and incredibly accurate source of 1 Hz. As long as your GPS can receive a signal. In fact, this has been demonstrated in the April 2013 edition of Silicon Chip magazine, in their frequency counter timebase project. But I digress.

If you have an EM406A you most likely have the cable and if not, get one to save your sanity as the connector is quite non-standard. If you’re experimenting a breakout board will also be quite convenient, however you can make your own by just chopping off one end of the cable and soldering the required pins – for example:

EM406Abreakout

You will need access to pins 6, 5, 2 and 1. Looking at the socket on the GPS module, they are numbered 6 to 1 from left to right. Pin 6 is the PPS output, 5 is GND, 2 is for 5V and 1 is GND. Both the GNDs need to be connected together.

Before moving forward you’re probably curious about the pulse, and want to see it. Good idea! However the PPS signal is incredibly quick and has an amplitude of about 2.85 V. If you put a DSO on the PPS and GND output, you can see the pulses as shown below:

GPS-raw-PPS

 To find the length of the pulse, we had to really zoom in to a 2 uS timebase:

GPS-PPS-zoom

 Wow, that’s small. So a little external circuitry is required to convert that minuscule pulse into something more useful and friendly. We’ll increase the pulse length by using a “pulse stretcher”. To do this we make a monostable timer (“one shot”) with a 555. For around a half-second pulse we’ll use 47k0 for R1 and 10uF for C1. However this triggers on a low signal, so we first pass the PPS signal through a 74HC14 Schmitt inverter – a handy part which turns irregular signals into more sharply defined ones – and also inverts it which can then be used to trigger the monostable. Our circuit:

GPSPPS_schem

 and here’s the result – the PPS signal is shown with the matching “stretched” signal on the DSO:

GPS-1-Hz1

So if you’re a stickley for accuracy, or just want something different for portable or battery-powered applications, using the GPS is a relatively simple solution.

Using a Maxim DS1307/DS3232 real-time clock IC

Those of you with a microcontroller bent may have a Maxim DS1307 or DS3232. Apart from being pretty easy to use as a real-time clock, both of them have a programmable square wave output. Connection via your MCU’s I2C bus is quite easy, for example with the DS1307:

squarewave_schem

Using a DS3232 is equally as simple. We use a pre-built module with a similar schematic. Once you have either of them connected, the code is quite simple. For the DS1307 (bus address 0×68), write 0×07 then 0×11 to the I2C bus – or for the DS3232 (bus address is also 0×68) write 0x0E then 0×00. Finally, let’s see the 1 Hz on the DSO:

ds32321hz

Certainly not the cheapest method, however it gives you an excellent level of accuracy without the GPS.

Conclusion

By no means is this list exhaustive, however hopefully it was interesting and useful. If there’s any other methods you’d like to see demonstrated, leave a comment below and we’ll see what’s possible. 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.

The post Various 1 Hz Oscillator Methods appeared first on tronixstuff.

Jun
03

Kit review – Altronics/SC PIC Logic Probe Kit

altronics, chip, K2587, kit, kit review, logic, pic, probe, review, silicon, SMT, soldering, test equipment, tronixstuff Comments Off on Kit review – Altronics/SC PIC Logic Probe Kit 

Introduction

Every month Australian electronics magazine Silicon Chip publishes a few projects, and in this quick kit review we’ll look at an older but still current example from September 2007 – the 3-state PIC Logic Probe Kit. This is an inexpensive piece of test equipment that’s useful when checking digital logic states and as a kit, a challenging hand-soldering effort.

Assembly

The kit is packaged in typical form, without any surprises:

kitpack

As mentioned earlier this kit is an interesting challenge due to the size of the PCB and the use of surface-mount components. The designer’s goal was to have the entire unit fit inside a biro housing (without the ink!). Thus the entire thing is using SMT parts.

Thankfully the LEDs are packaged individually into labelled bags, as alone they’re identical to the naked eye. Although the kit wasn’t expensive, it would have been nice for one extra component of each type – beginners tend to lose the tiny parts. The cost could perhaps be offset by not including the usual solder which is too thick for use with the kit.

parts

Nevertheless with some care assembly can begin. After cleaning the PCB with some aerosol cleaner, it was tacked it to the desk mat to make life a little easier:

pcb

If you want one of those rulers – click here. Before building the kit it occurred to me that the normal soldering iron tip would be too large, so I ordered a tiny 0.2mm conical tip for the Hakko:

newtip

The tip on your average iron may be too large, so take this into account when trying to hand solder SMT components. The instructions include a guide on SMT hand-soldering for the uninitiated, well worth reading before starting.

Moving forward, soldering the parts was a slow and patient process. (With hindsight one could use the reflow soldering method to take care of the SMT and then carefully fit the links to the PCB). The instructions are quite good and include a short “how to solder SMT” guide, a PCB layout plan:

instructions

… along with an guide that helps identity the components:

instructionssmt

When soldering, make sure you have the time and patience not to rush the job. And don’t sneeze – after doing so I lost the PIC microcontroller for a few moments trying to find where it landed. Once the LEDs have been soldered in and their current-limiting resistors, it’s a good time to quickly test them by applying 5V and GND. I used the diode test feature of the multimeter which generates enough current to light them up.

Due to the PCB being single-sided (!) you also need to solder in some links. It’s best to do these before the button (and before soldering any other parts near the link holes), and run the wires beneath the top surface, for example:

links

… and after doing so, you’ll need more blu-tack to hold it down!

gettingthere

One of the trickiest parts of this kit was soldering the sewing needle at the end of the PCB to act as the probe tip – as you can see in the photo below, solder doesn’t take to them that well – however after a fair amount it does the job:

needle

At this point it’s recommended you solder the wires to the PCB (for power) and then insert the probe into the pen casing. For the life of me I didn’t have a spare pen around here so instead we’re going to cover it in clear heatshrink. Thus leaving the final task as soldering the alligator clips to the power wires:

finished

Operation

What is a logic probe anyway? It shows what the logic level is at the probed point in a circuit. To do this you connect the black and red alligator clips to 0V and a supply voltage up to 18V respectively – then poke the probe tip at the point where you’re curious about the voltage levels. If it’s at a “high” state (on, or “1″ or whatever you want to call it) the red LED comes on.

If it’s “low” the green LED comes on. The third (orange) LED has two modes. It can either pulse every 50 mS when the logic state changes – or in “latch mode” it will come on and stay on when the mode changes, ideal for detecting infrequent changes in the logic state of the test point.

The kit uses a Microchip PIC12F20x microcontroller, and also includes the hardware schematic to make a basic RS232 PIC programmer and wiring instructions for reprogramming it if you want to change the code or operation of the probe.

Conclusion

The PIC Logic Probe is a useful piece of equipment if you want a very cheap way to monitor logic levels. It wasn’t the easiest kit to solder, and if Altronics revised it so the PCB was double-sided and changed the parts layout, there would be more space to solder some parts and thus make the whole thing a lot easier.

Nevertheless for under $17 it’s worth it. You can purchase it from Altronics and their resellers, or read more about it in the September 2007 edition of Silicon Chip. 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.

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.


Jun
03

Introduction

Every month Australian electronics magazine Silicon Chip publishes a few projects, and in this quick kit review we’ll look at an older but still current example from September 2007 – the 3-state PIC Logic Probe Kit. This is an inexpensive piece of test equipment that’s useful when checking digital logic states and as a kit, a challenging hand-soldering effort.

Assembly

The kit is packaged in typical form, without any surprises:

kitpack

As mentioned earlier this kit is an interesting challenge due to the size of the PCB and the use of surface-mount components. The designer’s goal was to have the entire unit fit inside a biro housing (without the ink!). Thus the entire thing is using SMT parts.

Thankfully the LEDs are packaged individually into labelled bags, as alone they’re identical to the naked eye. Although the kit wasn’t expensive, it would have been nice for one extra component of each type – beginners tend to lose the tiny parts. The cost could perhaps be offset by not including the usual solder which is too thick for use with the kit.

parts

Nevertheless with some care assembly can begin. After cleaning the PCB with some aerosol cleaner, it was tacked it to the desk mat to make life a little easier:

pcb

If you want one of those rulers – click here. Before building the kit it occurred to me that the normal soldering iron tip would be too large, so I ordered a tiny 0.2mm conical tip for the Hakko:

newtip

The tip on your average iron may be too large, so take this into account when trying to hand solder SMT components. The instructions include a guide on SMT hand-soldering for the uninitiated, well worth reading before starting.

Moving forward, soldering the parts was a slow and patient process. (With hindsight one could use the reflow soldering method to take care of the SMT and then carefully fit the links to the PCB). The instructions are quite good and include a short “how to solder SMT” guide, a PCB layout plan:

instructions

… along with an guide that helps identity the components:

instructionssmt

When soldering, make sure you have the time and patience not to rush the job. And don’t sneeze – after doing so I lost the PIC microcontroller for a few moments trying to find where it landed. Once the LEDs have been soldered in and their current-limiting resistors, it’s a good time to quickly test them by applying 5V and GND. I used the diode test feature of the multimeter which generates enough current to light them up.

Due to the PCB being single-sided (!) you also need to solder in some links. It’s best to do these before the button (and before soldering any other parts near the link holes), and run the wires beneath the top surface, for example:

links

… and after doing so, you’ll need more blu-tack to hold it down!

gettingthere

One of the trickiest parts of this kit was soldering the sewing needle at the end of the PCB to act as the probe tip – as you can see in the photo below, solder doesn’t take to them that well – however after a fair amount it does the job:

needle

At this point it’s recommended you solder the wires to the PCB (for power) and then insert the probe into the pen casing. For the life of me I didn’t have a spare pen around here so instead we’re going to cover it in clear heatshrink. Thus leaving the final task as soldering the alligator clips to the power wires:

finished

Operation

What is a logic probe anyway? It shows what the logic level is at the probed point in a circuit. To do this you connect the black and red alligator clips to 0V and a supply voltage up to 18V respectively – then poke the probe tip at the point where you’re curious about the voltage levels. If it’s at a “high” state (on, or “1″ or whatever you want to call it) the red LED comes on.

If it’s “low” the green LED comes on. The third (orange) LED has two modes. It can either pulse every 50 mS when the logic state changes – or in “latch mode” it will come on and stay on when the mode changes, ideal for detecting infrequent changes in the logic state of the test point.

The kit uses a Microchip PIC12F20x microcontroller, and also includes the hardware schematic to make a basic RS232 PIC programmer and wiring instructions for reprogramming it if you want to change the code or operation of the probe.

Conclusion

The PIC Logic Probe is a useful piece of equipment if you want a very cheap way to monitor logic levels. It wasn’t the easiest kit to solder, and if Altronics revised it so the PCB was double-sided and changed the parts layout, there would be more space to solder some parts and thus make the whole thing a lot easier.

Nevertheless for under $17 it’s worth it. You can purchase it from Altronics and their resellers, or read more about it in the September 2007 edition of Silicon Chip. 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.

The post Kit review – Altronics/SC PIC Logic Probe Kit appeared first on tronixstuff.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook