DS18B20 reading with Digital Logger PLDuino PLC

I coneect the sensor to this PLC based arduino mega board, so I select the digital input d30 to connect the sensor as the recomended approach, when I run the skecth to read the serial monitor display -127 always. I try different anothers digital inputs without results, I put the same sensor and conection to the arduino mega board digital input 15, run the same sketch and run fine!!..so I think that the problema would be something around the connection or configuration of the PLDuino digital Input…pls help me…

jrodrivera:
I think that the problema would be something around the connection or configuration of the PLDuino digital Input...pls help me...

Up to a point... -127 indicates no connection. Since it is fine on the Mega, and assuming you have nominated the correct pin, it would appear that your plugging-in skills are a bit lacking.

I tried with all the remain digital inputs and pin number D30…to D37 with the same fault, I´m using one wire and dallas libraries, so I suspect something about the optic isolation in PLDuino PLC for the digital inputs is the only hardware difference with the arduino mega board…If someone has the sketch tested with digital loggers PLDuino PLC?..appreciated…

The data out pin on the DS18B20 has to be pulled up to Vcc with a 4k7 resistor, how are you doing that? Pullup won't work through opto couplers :slight_smile:

The conection for the pull up resistor it´s the same like recomended, so it Works with arduino mega board, so your clow about optocuplers has logic...I´m going to review the PLDuino hardware inputs...thanks...