OneWire support

Can anyone comment as to when the “Bit-Bang Scripter” will be released so we can talk to OneWire devices directly?

It’ll almost certainly be this year, but it’s after some higher priority features like better UART support (callbacks), fixed rate sampling, running with wifi disabled, etc.

Right now the best way is to use an I2C <> 1-wire bridge… sorry.

Where did you hear about the bit-banger? With regular pin API the speed is not enough to get 1-wire done, so right now you can only use 1-wire using i2c bridge IC.

It was mentioned in this thread:

I’m looking forward to such a thing too. I’d like to use an RHT03/DHT22 temperature and humidity sensor which uses a custom one-wire bus described here:

In the mean time I’m going to look into other sensors.

I have been looking at the DS2482 1-wire I2C bridge. I see that the app notes indicate that:
I2C_start I²C start command. I2C_rep_start I²C repeated start command. I2C_stop I²C stop command.
are all required to implement the interface. However, I don’t see these are available in the imp I2C class.

Please can you advise me? Does this mean that it is not possible to use the DS2482?

Hey Hugo, my interest in OneWire is mainly because I want to use DS18B20 based temperature probes in some of my data acquisition projects.

I’d go the converter route with a DS2484, but I have to keep costs in check and the converter chip costs more than an entire temperature probe.

I assume some people are interested in the other features you mentioned, but I really hope you can get the OneWire support in there some time soon.

I2C repeated start is optional; I’ve never seen an I2C device that requires this to function. It saves a couple of clock cycles over sending a stop then a start but it’s just an optimization.

I can report the DS2482 works fine with the imp; I know of at least one person using this heavily in their application.

I echo that ^

It will come, but it’s not going to be in the next few releases; we have things like offline mode (bring wifi up and down under program control), memory improvements, UART API improvements, etc all coming before we get to 1-wire.

It might end up being early next year, but we will get to it :slight_smile:

Cool, I’m looking forward to 1-wire support, but definitely agree with the higher priority stuff. Y’all are doing awesome!

Has anybody some suggestion on alternative temperature sensors. I’ve been looking at a one wire temp sensor, too.

Analog Devices TMP36 is an analog temperature sensor that I have used with the IMP. I had one laying around my workbench so I grabbed it to see if I could push data out to COSM.
Spark Fun has TMP36 that is probably where mine came from.
I am looking forward to 1-wire support so I can have more than one sensor on a IO pin, but for now the (IMP - TMP36 - COSM) is working fine. I am packaging one up with 2 sensors (indoor and outdoor) for my sister to put in her green house.

Has anybody some suggestion on alternative temperature sensors. I've been looking at a one wire temp sensor, too.

I’ve been using LM75a by NXP in various other projects. NXP LM75a Datasheet TI also makes a similar part. I like these devices since they are I2C, also allow you to set address so that you can have multiples on a bus.

I have successfully interfaced to a one wire network using a DS2482 bridge. I am considering manufacturing an impee with the chip on board - perhaps including RJ45 sockets so that it will work directly with hobby-board products. Any comments?

Sounds good. I will either be using a DS2482 bridge or a microcontroller depending on how the design pans out.

I checked out the LM75A, it has good accuracy (±2degrees) but the precision is a bit low so it’s not ideal for PID control. Still a great suggestion though.

I want to do PID control also, I could not find a Squirrel library. What would be a good place to start?

Any other suggestions? Would it be better to run this on the Imp or run it server side for control?


Can’t wait to use my Dallas DS18B20 sensor with the Imp directly.

For the life of me I can’t get anything other than nil responses from my DS2482 hooked up to the imp (i2c12). Can anyone post a code sample for initiating a communication with the 1-wire bus? Something like a ROM search, or anything to get me on the right track.


@Hugo , you mentioned that you knew of at least one person using this chip in their application. Any chance you or they could post the I2c -> 1-Wire specifics?