Test Application for 1-Wire Sensors

Test Application for 1-Wire Sensors

Release Date:24/03/17
Most Recent Update:24/03/17
Project files:Open GitHub repository
Minimum TIDE version:5.03.07
Minimum TiOS version:TPP2, TPP3: 3.60.00; TPP2(G2), TPP3(G2): 3.60.92
Platform:TPS2W, TPS3W, TPS2W(G2), TPS3W(G2)
Try it on:TPS, add Tibbits as needed

This demo project was designed to discover and poll widely used DS18B20 digital thermometers, manufactured by Maxim Integrated and other single-wire temperature / humidity sensors such as DHT11, DHT22, etc. The included 1-wire library is intended to be used as a transparent bridge between PIC Tibbit (#31) and 1-wire bus.

The library contains a PIC firmware which must be uploaded to the PIC memory to correctly operate as a 1-wire decoder.

Basic knowledge of 1-wire protocol internals and electrical characteristics is strongly recommended. You can navigate to https://www.maximintegrated.com/en/app-notes/index.mvp/id/1796 to learn more.

You will need:

This layout is very handy when you plan to power sensors from the internal power source. Tibbit #20 allows you to take both +5VDC and Ground right near the 1-wire bus contacts.

Pins on the Tibbit #20 counted from left to right. Pins 1, 2 and 3 are three independent 1-wire / single-wire channels, pins 5 and 9 is a system ground, and pin 8 is +5VDC. Pins 6 and 7 is direct I/O lines which are not used in this application.

Depending on how many of sensors you plan to connect to the bus, you may need to install pull-up resistor (120 Ohm) between +5VDC and signal wire, but for about of 8-10 sensors, this step is not necessary.

There are separate components inside of this application:

If you do not plan to support firmware uploading in your project, you can remove PIC_LVP.tbs, PIC_LVP.tbh, and firmware hex file from your project.

Depending on the type of sensor connected, different readouts will be printed during runtime. Printing is done with sys.debugprint. Therefore, you must run this program in the debug mode.