LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino I/O Expander with MCP23017 and 74HC4051 and Labview

Hello,

The MCP23017 is a 16-Bit I/O Expander with Serial Interface (s2C) and the 74HC4051

is an analog multiplexer/demultiplexer.

I have written an Arduino sketch to drive 2x MCP23017 and 2x 74HC4051.

For the MCP23017 I have used the Adafruit library.

The configuration is used to read voltages from several sources and drive different relays.

Since the sketch is rather long, please follow this link: MUXREV1. You can also find more details

regarding the PCB design and the schematic here: Arduino I/O Expander with MCP23017 and 74HC4051

I like to use the same PCB assembly with an Arduino Uno and Labview.

Since I am new to Labview I would welcome any tips and advice how to create the VIs for these two

multiplexers, e.g. how to integrate the existing library for the MCP23017 in the Arduino interface

or how to create a VI in Labview, are there already similar applications in Labview that I could utilize?

Thanks a lot.

Christoph

0 Kudos
Message 1 of 14
(10,594 Views)

So, what advantages does this have over just an Arduino Mega?

Since the MCP23017 uses I2C you can use the LIFA I2C functions (VIs).  However, this means basically rewriting (aka porting) the Adafruit library in LabVIEW. 

0 Kudos
Message 2 of 14
(5,611 Views)

Hi Nathan,

Thanks for your feedback.

Of course the Arduino Mega will do the job, may be even better.

I have several Arduino Unos, the PCB, components and a working sketch readily available,

but the more important part here is to use this as an learning/training example

and be able to apply the outcome to other projects.

0 Kudos
Message 3 of 14
(5,611 Views)

Hi. I am a newbie and not an EE. I was able to "read" and "write" to MCP23017 using Labview and arduino over i2c. My demo circuit include writing to MCP23017 "bank-A" for lighting up some LEDs and reading from "bank-B" to read digital output from an ADC0804. Essentially, I followed steps of http://tronixstuff.wordpress.com/2011/08/26/tutorial-maximising-your-arduinos-io-ports/ . All the Hex values were converted to integers.Here is my VI. It is currently working with a Arduino Mega 2560 but not and on a Uno.

MCP23017.png

Message was edited by: geotech_bd

0 Kudos
Message 4 of 14
(5,611 Views)

Did you remember to change the settings in the VI for the Uno?

0 Kudos
Message 5 of 14
(5,611 Views)

I checked. Still does not work with Uno, but works smoothly with Mega. Will update if I can find the error.

0 Kudos
Message 6 of 14
(5,611 Views)

Could you attach the VI that you are using when you try to run it with the Uno?

0 Kudos
Message 7 of 14
(5,611 Views)

That doesn't work.  You should attach it to your post (as an attachment) and not create a document.  When you reply to me, click on the link that says "Use advanced editor" and then you will be able to upload files to your post.

0 Kudos
Message 9 of 14
(5,611 Views)

Here is the VI.

Message was edited by: geotech_bd

0 Kudos
Message 10 of 14
(5,611 Views)