Skip to Navigation

U12

Everything tagged "U12"

Integration with GoogleDrive

If you own a LabJack device, have python installed, and have a google e-mail address you might find this AppNote to be of interest.  You can create a program that posts collected data to a google doc's spread sheet so you can view your collected data from anywhere, for free!

  1. Make sure that LabJack python is installed
  2. Download and install Google's python API
  3. Try google's API example located in the root directory and then samples/spreadsheets to make sure you installed it properly
    to run: "python spreadsheetExample.py --user [yourUserName] --pw [yourPassword]"
  4. the program should display all of the spreadsheet files created in your google drive account and let you open & change values of the file
  5. Download the example program that opens a U3 device & stores information to a created google drive spreadsheet
  6. Create a spreadsheet and modify the example program's SPREADSHEET_NAME, WORKSHEET_NAME, GOOGLE_USER_NAME, AND GOOGLE_PASSWORD string constants
  7. if needed, change the device being opened, program was written for a u3, change all u3's to u6's or UE9's
  8. Run program!

Two Step Verification

Do you have two step verification enabled on your account? If so you need to generate a new application-specific password and use that as your password for the example program.

tags:

Comments

No comments yet. Speak up. We're listening.

Comments

No comments yet. Speak up. We're listening.

Device Applications

With today's technology, there are many way's to communicate with our devices, simply connecting a LabJack to a computer is no longer the only method of communication.  Some of our devices have built in Ethernet and WiFi support making it very simple to connect to your LabJack in new ways.  If your LabJack doesn't natively support a particular method of communication that you require, there is likely a solution that exists to assist you with your needs.  Simple examples are controlling our devices with a Raspberry Pi (embed them), connect to them wirelessly, share them on a network, or communicate with them using a cell phone.

Options also exist to connect our devices to the Cloud.  Many free and paid solutions exist that allow for sending and receiving information from the cloud.  Some networking experience is required, but the solutions that can be created are almost infinite once information is available on the internet.

tags:

Comments

No comments yet. Speak up. We're listening.

Serial Communication Examples

Many of our devices are capable of communicating with sensors that only allow for serial communication.  Most of our devices support SPI, I2C, 1-wire, and other Asynchronous Serial Protocols.  Configuring our devices to send and receive data is fairly device independent and easy once you understand the protocol being used, however a few things must be kept in mind before purchasing sensors that use a serial protocol for transferring information.  

 

  • Our devices supply 5V on their VS line and not 3.3V
  • Our devices output 3.3V logic levels on their FIO/EIO/MIO/CIO lines but are capable of receiving 5V as an input 
  • Some sensors don't follow standard I2C/SPI protocols 
That being said, with some effort, most digital sensors can be successfully connected to a LabJack.

 

tags:

Comments

No comments yet. Speak up. We're listening.

Floating/Unconnected Inputs

The reading from a floating (no external connection) analog input channel can be tough to predict and is likely to vary with sample timing and adjacement sampled channels.  Keep in mind that a floating channel is not at 0 volts, but rather is at an undefined voltage.  In order to see 0 volts, a 0 volt signal (such as GND) should be connected to the input.

Some data acquisition devices use a resistor, from the input to ground, to bias an unconnected input to read 0.  This is often just for "cosmetic" reasons so that the input reads close to 0 with floating inputs, and a reason not to do that is that this resistor can degrade the input impedance of the analog input.

In a situation where it is desired that a floating channel read a particular voltage, say to detect a broken wire, a resistor can be placed from the AINx screw terminal to the desired voltage (GND, VS, DACx, ...), but obviously that degrades the input impedance.  The resistor value used depends on how close to the desired voltage you need to be, minimum allowable input impedance, sample rate, settling time, resolution, and adjacent channels.  

tags:

Comments

No comments yet. Speak up. We're listening.

Measuring Current (Including 4-20 mA) with a Resistive Shunt

The best way to handle 4-20 mA signals is with the LJTick-CurrentShunt, which is a two channel active current to voltage converter module that plugs into the LabJack's screw-terminals.

The following figure shows a typical method to measure the current through a load, or to measure the 4-20 mA signal produced by a 2-wire (loop-powered) current loop sensor. The current shunt shown in the figure is simply a resistor.

Figure 1. Current Measurement With Arbitrary Load or 2-Wire 4-20 mA Sensor

When measuring a 4-20 mA signal, a typical value for the shunt would be 240 Ω. This results in a 0.96 to 4.80 volt signal corresponding to 4-20 mA. The external supply must provide enough voltage for the sensor and the shunt, so if the sensor requires 5 volts the supply must provide at least 9.8 volts.

For applications besides 4-20 mA, the shunt is chosen based on the maximum current and how much voltage drop can be tolerated across the shunt. For instance, if the maximum current is 1.0 amp, and 2.5 volts of drop is the most that can be tolerated without affecting the load, a 2.4 Ω resistor could be used. That equates to 2.4 watts, though, which would require a special high wattage resistor. A better solution would be to use a lower resistance shunt, and rely on the outstanding performance of the U6 to resolve the smaller signal. If the maximum current to measure is too high (e.g. 100 amps), it will be difficult to find a small enough resistor and a hall-effect sensor should be considered instead of a shunt.

tags:

Comments

No comments yet. Speak up. We're listening.

Signal Voltages out of Range (and Resistance Measurement)

For the nominal maximum analog input voltage ranges of our devices please visit their Appendix A sections in the appropriate Users Guides or datasheet's.  The simplest way to handle higher voltages is with a resistive voltage divider. The following figure shows the resistive voltage divider assuming that the source voltage (Vin) is referred to the same ground as the LabJack's (GND).

Figure 1. Voltage Divider Circuit

The attenuation of this circuit is determined by the equation:

Vout = Vin * ( R2 / (R1+R2))

This divider is easily implemented by putting a resistor (R1) in series with the signal wire, and placing a second resistor (R2) from the AIN terminal to a GND terminal. To maintain specified analog input performance across all gains and resolutions, R1 should not exceed the values specified in Appendix A, so R1 can generally be fixed at the max recommended value and R2 can be adjusted for the desired attenuation.

The divide by 2 configuration where R1 = R2 = 1 kΩ, presents a 2 kΩ load to the source, meaning that a ±10 volt signal will have to be able to source/sink up to ±5 mA. Some signal sources might require a load with higher resistance, in which case a buffer should be used. The following figure shows a resistive voltage divider followed by an op-amp configured as non-inverting unity-gain (i.e. a buffer).

 

tags:

Comments

No comments yet. Speak up. We're listening.

Amplifying Small Signal Voltages

The best results are generally obtained when a signal voltage spans the full analog input range of the LabJack. If the signal is too small it can be amplified before connecting to the LabJack. One good way to handle low-level signals such as thermocouples is the LJTick-InAmp, which is a 2-channel instrumentation amplifier module that plugs into the U3 screw-terminals.

For a do-it-yourself solution, the following figure shows an operational amplifier (op-amp) configured as non-inverting:


Figure 1. Non-Inverting Op-Amp Configuration

The gain of this configuration is:

Vout = Vin * (1 + (R2/R1))

100 kΩ is a typical value for R2. Note that if R2=0 (short-circuit) and R1=inf (not installed), a simple buffer with a gain equal to 1 is the result.

There are numerous criteria used to choose an op-amp from the thousands that are available. One of the main criteria is that the op-amp can handle the input and output signal range. Often, a single-supply rail-to-rail input and output (RIRO) is used as it can be powered from Vs and GND and pass signals within the range 0-Vs. The OPA344 from Texas Instruments (ti.com) is good for many 5 volt applications.

The op-amp is used to amplify (and buffer) a signal that is referred to the same ground as the LabJack (single-ended). If instead the signal is differential (i.e. there is a positive and negative signal both of which are different than ground), an instrumentation amplifier (in-amp) should be used. An in-amp converts a differential signal to single-ended, and generally has a simple method to set gain.

tags:

Comments

No comments yet. Speak up. We're listening.

Signal Powered Externally

An example is a box with a wire coming out that is defined as a 0-5 volt analog signal and a second wire labeled as ground.  The signal is known to have 0-5 volts compared to the ground wire, but the complication is what is the voltage of the box ground compared to the LabJack ground.

If the box is known to be electrically isolated from the LabJack, the box ground can simply be connected to the LabJack's GND. An example would be if the box was plastic, powered by an internal battery, and does not have any wires besides the signal and ground which are connected to AINx and GND on the LabJack.

If the box ground is known to be the same as the LabJack GND, then perhaps only the one signal wire needs to be connected to the LabJack, but it generally does not hurt to go ahead and connect the ground wire to the LabJack GND with a 100 Ω resistor.   You definitely do not want to connect the grounds without a resistor as you are creating ground loops that add a lot of noise to your system.

If little is known about the box ground, a DMM can be used to measure the voltage of the box's ground compared to the LabJack's GND.  As long as an extreme voltage is not measured, it is generally OK to connect the box's ground to the LabJack's GND, but again, it is a good idea to put in a 100 Ω series resistor to prevent large currents from flowing on the ground.  Use a small wattage resistor (typically 1/8 or 1/4 watt) so that it will break if too much current does flow which may prevent your LabJack from being damaged in the process.  The only current that should flow on the ground wire is the return of the analog input bias current, which is on the order of micro-amps (for the U3 & UE9) to nano-amps (for the U6).

tags:

Comments

No comments yet. Speak up. We're listening.

Signal Powered by the LabJack

Single Ended Analog Input:

This is one of the most common analog applications, there are an almost infinite number of possibilities that fit this category.  In general, the sensor will have a power and ground wire that connect to Vs and GND on the LabJack, and then a signal wire will connect to a single AIN terminal (single ended analog input).  Example sensors that fit this category are:

tags:

Comments

No comments yet. Speak up. We're listening.