Close
0%
0%

Dual 12bit SPI 4-20mA Converter

The title says it all. This is a dual 12bit SPI 4-20mA output driver to be used to create analog outputs for current outputs.

Similar projects worth following
This is a small module that provides two 4-20mA outputs that can be set digitally over a SPI bus. Thus making this a very simple way to add current loop outputs to a micro controller project.
I runs off 2.7 to 5.5V for the digital interface so it can interface with either 3.3V or 5V micro controllers. The analog portion work with a supply from 12V to 32V.

The board is 34.3 x 31.5mm with M2 mount hole spaced at 30.7 x 27.9mm.

The board is deigned to either use a straight or 90° 8 pin header to get signal on and off the board. This allows the board to be either mounted vertically or horizontally.

I have needed a 4-20mA output for multiple projects over the years, and I've had to build converters using Op Amps that are driven by filtered PWM outputs. It works but I've never really been happy with them. So I finally bit the bullet and designed one that can be connected to a SPI bus so that I can just set the output digitally.

The digital part is handled by a MCP4822 (a dual 12bit DAC), the analog part is handled by LM324 quad Op Amps, BCP56 npn transistors a precision voltage reference and associated resistors. I included course and fine trimmer pots for independent ZERO and SPAN adjustments for fine tuning the outputs.

I laid out the schematic and pcboard using KiCad and have created a BOM and POS file for submission to JLCPcb for manufacture and assembly.

The components in the schematic file have an additional symbol field that lists the JLCPCB component part numbers.

SPI 4-20mA Converter.zip

KiCad Project Files, Gerbers, and JLCPCB BOM and POS files.

x-zip-compressed - 156.65 kB - 08/23/2022 at 21:23

Download

Trim Pot.step

Step file for the trim pot used in the pcboard file.

step - 125.78 kB - 08/20/2022 at 19:54

Download

  • 2 × LM324 quad Op Amp
  • 1 × MCP4822 12bit dual chanel DAC
  • 1 × TL431 voltage reference
  • 2 × BCP56 npn transistor
  • 1 × Printed Circuit Board

View all 9 components

View all 2 project logs

Enjoy this project?

Share

Discussions

wooddragon48 wrote 08/23/2022 at 21:26 point

Yep, you are very correct. I updated the pictures and data files.

Thanks for spotting that.

  Are you sure? yes | no

Alexander Frank wrote 08/23/2022 at 10:23 point

Shouldn't this be SPI instead of PCI in the text and on the silkscreen?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates