Pages: [1]   Go Down
Author Topic: KMtronic DINo's opto-isolated inputs  (Read 1005 times)
0 Members and 1 Guest are viewing this topic.
Piemonte, Italia
Offline Offline
Jr. Member
**
Karma: 1
Posts: 65
Just a brick in the wall
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have bought an Arduino DINo from KMtronic: http://sigma-shop.com/product/72/web-internet-ethernet-controlled-relay-board-arduino-compatible-rs485-usb.html

So far, everything is working great. I can control the relays and use the network through EtherCard, and will soon provide the community with the result of my work smiley-mr-green.

Now I would like to connect a DS18B20 temperature sensor to my board. It works OK if I use pins from the P1 connector (3.3V, GND and D2), but I can't get it to work using the opto-isolated inputs. I don't even know how to wire it properly. I suppose 3.3V and GND would still go to P1, and the data line I would connect to P2 would go to the "+" terminal of IN1 (for instance), but what should I connect to the "-" terminal? I tried connecting it to GND but it didn't work.

Can you help me?
Thanks in advance!

G.
Logged

Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 143
Just Do it (with Arduino of course)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The OneWire protocol used by the Dallas chip is bidirectional. So it can't work with the opto-isolated inputs.

If you anyway need 3V3 and GND from P1, why not keep the dallas "microlan" on D2 ? If you want, you can put many sensors on the same line as they have unique IDs.

Note that analog Arduino pins can be used as digital, so you can use the A1 and A0 as OneWire as well.
Logged

Piemonte, Italia
Offline Offline
Jr. Member
**
Karma: 1
Posts: 65
Just a brick in the wall
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, thanks, I was writing the following post just before you (tochinet) posted your reply:

Quote
I've found something at: http://arduino.cc/forum/index.php/topic,58324.0.html, in particular:

Quote
Can you tell me if it is possible to isolate the data line from the sensor to the boards input pin with an optocoupler ?  

That won't work in any simple scenario...

Both the Arduino and the DS1820 "hanging" on the data line need to be able to pull the data line low. The pin switches between being an input and being an output.

So it seems I can't connect the DS18B20 to IN1/2/3/4, since the connection needs to be bidirectional and the opto-isolator of course make it monodirectional.

I was thinking about moving the Dallas microlan away from P1 since I am planning to add an LCD to my system using the 3-wire protocol, and I meant to use A0, A1 and D2. I guess I will have to either get rid of the serial port, so that I can use D0 and D1, or use a 2-wire LCD protocol.
Logged

Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 143
Just Do it (with Arduino of course)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any progress ? My DINo now successfully posts to Cosm, but I'm still "in progress" to connect a wireless modem to it so it can publish __useful__ information.
Logged

Piemonte, Italia
Offline Offline
Jr. Member
**
Karma: 1
Posts: 65
Just a brick in the wall
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, I just managed to drive the display with a single pin smiley-wink. I have posted some stuff to COSM, but I had to suspend all works for various reasons. Hopefully they will resume next week!
Logged

Pages: [1]   Go Up
Jump to: