OneWire support

This worked for me as well. Awesome! I used a 1N5818 schottky.

I cant get it to work, getting owDevice write error,
can someone check my wiring ?

I used a MR856G diode , it should be simular to the 1N5189

I found the 1n5818 , but im not sure i made the right connections. Can someone please show the wiring for this setup with a ds18b20 ?

Thanks in advance

While this is an awesome option, i reeeeally want a one wire library since we are limited in pin count.

No one can help me with the wiring ?

Well, i went a different way, hooked up an attiny85 which has support for one wire devices. The attiny sends a serial string so this was easy to pick up with the imp… Costs about one dollar !

There are different ways to wire it depending on the pins you want to use and the type of 18B20 you use. TX and RX lines should connect to the corresponding uart pins of the IMP and the DQ line to the 18B20 (pin 2 when you use the TO-92 version) and ground of course. Important is you have the diode in the correct direction (the marked end of the diode connects to the TX pin of the IMP)

Thanks will try this

Probably it is an april board problem for me, Running the example code from Theo on pin 1 and 2 didn’t work for me… Finaly changed the code and hardware to pins 5&7 and it works…

Thanks Theo!!

After completing a successful Arduino prototype of my Sous Vide project, I’m now moving on to the Imp for the final build. The project will use a single waterproof DS18B20 temperature sensor via 1-wire.

I’ve gotten hold of both a STMicroelectronics 1N5818 Schottky Diode Vr/30V Io/1A as well as a Maxim Integrated DS2482S-100+ from Mouser, but I’m not sure of which option to go with being fairly new to electronics. I’m more concerned with the wiring than the software being a developer myself, so any wiring diagrams or other material that might be of help will be greatly appreciated.

maybe this picture can help you…

made this breadboard with Fritzing and it should help you to wire a DS18B20 to the IMP that should work with my code. Instead of IMP pin 1 and 2 you can use pin 5 and 7 and you should change the code accordingly. Click on the thumbnail to enlarge it. The IMP breakout is getting power through an USB power adaptor.

I followed Theo’s breadboard design exactly but all writes kept returning -1. I double and triple checked the wiring but to no avail so I went back and found Sirions April board comment. After changing the pins to 5 & 7 everything is working perfectly.

Big thanks Theo and Sirion!

Must be something wrong, for me it’s working fine with more than 20 devices

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.

Is it possible to do something like this with the solution @theo came up with?

I currently have it wired in the described way, but can’t find any info on what parameters to pass to the owRead() and owWrite() functions, which are posted in this thread…

Can anyone help out?

p.s. I don’t know if this is relevant, but even if I disconnect the actual sensor I never get the

server.log(“owDevice not present”);

after running owReset(). Is this normal?

The RHT03 uses MaxDetect 1-wire bus ifor communication between MCU and RHT03. The MaxDetect 1-wire bus is different from Maxim/Dallas 1-wire bus, so it’s incompatible with Dallas 1-wire bus.

Hi and thanks for getting back to me!

So there’s no way to integrate the RHT03 with the Imp?

That really sucks because now I’ll have to drop in an Atmega328 just to take care of the RHT and do the Infra-red stuff within my project more easily…

I really wanted to do everything within the Imp (ease of software management, no 3V/5V lines, less hardware, etc + it’d be cool :), but if there’s no way to interface with the RHT I guess it’s a no-go…

Anyway, thanks for the help!

No way currently, no. There will be in time, but it’s not at the top of the pile. More sensible temp/humidity sensors work fine with the imp, eg the honeywell or sensirion ones on the Nora reference design.

The downside is these sensors are more expensive (though also more accurate) than the RHT. Might be less of a price differential than an atmega 328 though.

Thanks for the info, Hugo! It’s really great that we have someone from the actual team lend their opinion and give tips :slight_smile:

I have a question, though - why do things such as IR (receiving/transmitting), OneWire and Analog Inputs seem to work much more effortlessly both in terms of hardware/software setup and stability on the Arduino (AtMega) than on the Imp?

Maybe it’s just me getting into stuff that’s not fully supported via APIs yet on the Imp, whereas the Arduino project is much larger and more mature and thus has better h/s support overall…

My goal was to basically use the Imp as the one and only uC in the project and control all of its aspects via a single Software core, but it seems I’ll have to consider the Imp’s current limitations and either drop in another uC to do part of the work or look for workarounds.

BTW, you mentioned an AC dimming API coming soon? Do you have any updates on that as well as the Wifi scanner API that was scheduled with the next release? I’m very eager to try those out!

Thanks again to everyone who replied!