I have a DHT-22 humidity/temperature sensor I would like to communicate with using my LabJack u12 board using Python. All online instructions describe using this sensor with Ardunio/RaspberryPi/Beaglebone boards and a GPIO connection.
Can I communicate with this sensor using my u12? If so could anyone give me pointers? I am trying to follow the manufacturers instructions on send and receive timings using eDigitalIn/Out but I am not getting anywhere.
Thank you.
I looked at the datasheet and the interface is called "single-bus" which I have never heard of. Perhaps ask them if it is compatible with one-wire, which is a standard (although complicated) protocol, but your best bet is to use a different sensor that is compatible with I2C or SPI, or even SBUS (sensirion).
Yes, it is a one-wire protocol.
The host computer sends a low signal for 500us, then high for 30 us. Then the sensor responds with a 80 us low response, then high and low for the bits of data. Low for 50us followed by high for 26us for a ZERO and 50us low followed by high for 70 us for a ONE.
I attempted to make readings using the DigitalIO but it was not fast enough. Is there another approach than just using the eDigitalIn/Out functions?
I understand it is a protocol that uses 1 wire for communication, and that is uses a single-wire protocol, but is it THE 1-wire Protocol?
https://en.wikipedia.org/wiki/1-Wire
Each command/response over USB takes about 20ms on the U12, so you will never be able to bit-bang the 1-wire protocol. All our other devices are more like 1ms, but that is still not fast enough to bit-bang that (you would need something like 10us or better).
Our newer devices (U3/U6/T7 are the devices recommended for new applications as of this writing) do have 1-wire support, but 1-wire is not an easy-to-use protocol so I only recommend it for those experienced with serial protocols and the troubleshooting of such.
https://labjack.com/support/app-notes/1-wire
I also gone through the datasheet and find the same that the interface is called "single-bus" which I also never used till now. You should ask that if is possible to connect with a single wire ithink which is a standard protocal as you people already discussed.
Use the different sensor that must be compatible with the I2C and SPI interfaces to get the best results.
hello, please with like to have a code for acquiring temperature using labjack U12
can an LM35 sensor be direct interfaced with a Labjack U12
Here is our app note about temperature sensors:
https://labjack.com/support/app-notes/temperature-sensors
In particular, see the information about the LM34 which is similar but superior to the LM35.
Either can be used directly, but we recommend you add a 10k resistor from the signal (AIx) to GND. With a 10k resistor the sensor works down to 90 mV, which is 9 F with the LM34.