Introduction: Handheld Voltage and Current Source 4-20mA

This instructable details how to make a 0-20mA +/-10V signal generator using an inexpensive LM324 opamp. These type of signal generators are useful in industry to test sensor inputs or drive industrial amplifiers.

Whilst it's possible to buy these they are often expensive and if broken can be difficult to repair. Using simple components allows you to create a circuit that's repairable if it does break at a fraction of the cost!

The kit is available on my Tindie store or you can make one yourself!

Step 1: A Little Theory....

The above schematic details a voltage to current converter. Since the voltages at an opamps input are equal when the positive terminal is 5V the negative terminal must be likewise.

The only place for this to come from is the op amps output therefore the op amp sources enough current to ensure the negative terminal is at 5V. If V(R1) = 5V then I(R1) = 5/250 = 20mA and since RL forms a series cct (no current flow into (-) terminal) with this it must also have 20mA flowing through it.

We can therefore construct a circuit that converts a voltage to a current.

Looking at the datasheet for the LM324 we can see it's capable of driving 30mA and can therefore be used as the basis of our simple current source without an additional drive transistor.

In addition to that we'd like a 0-10V or +/-10V output. This can be achieved easily by amplifying the 0-5V signal we had form out 0-20mA cct by a factor of 2 to generate a 0-10V output signal.

To generate a +/-10V signal we can cheat a little and modify our amplifier circuit to amplify by a factor of 4 to give 0-20V output. A third amplifier can then generate a static 10V signal which when used as a reference to the 0-20V signal gives a voltage range of +/-10V.

I've provided a schematic on how to realize this. Mine has protection diodes on which may or may not be necessary depending on your application as well as a couple of pots for trimming outputs.

Step 2: Lets Start With a Case

With the theory out the way we can develop a case for our project. I've used a hammond 1593PBK. If you're doing your own PCB you may wish to select a larger case.

I've decided to add an LED and a range pot, I'd also like a slide switch on the side as well as 2 sets of cables for 0-20mA and +/-10V.

I've created an adhesive cover using a vinyl adhesive to help with the range indication.

Using a centre punch and the cover mark out the holes and then drill out the holes:

  • Pot 7mm
  • LED 6.5mm
  • Cable entry 5mm
  • Holes for switch 2mm

A hacksaw and file can be used to cut out the opening hole for the slide switch.

Once complete apply the cover sticker and mount the LED, pot and switch.

NOTE - wire lengths to be kept generous so they can be trimmed later on when we assemble the case, any wires should be heat shrink ed to prevent cable breakage.

Step 3: Add a Power Supply

We're using a cheap boost DCDC converter off ebay. This can amplify the 9V battery I'm planning on using up to the 22V I need to realize the +/-10V cct. It's got an adjustment pot I'll need to trim a little later.

Attach one part of the PP3 clip to the slide switch and wire the next terminal to the DCDC input. Wire the 2nd wire of the PP3 clip to the remaining terminal of the DCDC converter. You'll now have a DCDC converter that's controlled by the slide switch. The DCDC should be fairly well marked to make this step easy.

Now solder on a couple of output wires to your DCDC keeping the length fairly generous at this stage.

Use a hot glue gun to mount the DCDC converter in place but make sure the voltage output adjustment pot is accessible. Now use a PP3 battery and adjust the DCDC to give an output of 22V.

WARNING - Even low voltages like 9V and 20V can still be fatal if they are exposed to wet skin, please take adequate precautions when using this instrument. Any un-used terminals should be secured in terminal blocks to prevent accidental shock (seriously!). Never use this instrument near water or wet skin.

Step 4: Time for Some Soldering...

Now you can either do this on breadboard or do your own PCB like me. Either way it's time to assemble the components.

If you can't face doing your own breadboard I've got a limited quantity of mine for sale on tindie.

The first thing to do is print out the layout and schematic and annotate the layout so that is shows where all the components go. This is much easier than using the schematic and will result in less placement errors.

Now solder up your components, trim components with side cutters afterwards.

By the way if you use breadboard you'll need a larger case than me.

Step 5: Test Leads

I used some twisted pair cable and put some cable idents and ferrules on to protect the cables and let me know which cables are which.

This'll give me 2 test leads one for voltage and one for current.

Step 6: Final Fit

I now need to start soldering up all the remaining wires to my PCB.

It's worth laying out the PCB at this point and making sure it'll fit i.e. there's no clashes. There are some tall components on my PCB and some tall components on my case (pot, DCDC). I need to make sure it'll all fit before I solder anything.

Once I'm happy it goes together I can start soldering up and trimming my wire lengths to suit. On my PCB I used strain relief holes on the entry / exit points.

Once I know it'll go together it's time to commission it...

NOTE - Be careful with the LED and pot as they need to be soldered to the correct terminals, if the pot is the wrong way round it's action will be inverted.

Step 7: Commissioning...

So on my design there was a 8 step commissioning process.

Check it fits

Can I close the lid

Check LED
Check LED illuminates when powered up off PP3

Check 5V reference

Power up PCB check the 5V reference cct is giving out 5V.

Check 10V output

Check 10V present on J2 pin 1

Check 20V output

Check 20V present on J2 pin 2, adjust pot R12 till it is.

Check +/-10V operation

Between J1 and 2 it should be possible to generate +/-10V using the pot.

Check 20mA output

With pot set to max, check J1 output is 20mA, adjust pot R3 till it is.

Assemble the case and test again

Re-assemble and do a final function check.