FT232RL and DS18B20

703 views
Skip to first unread message

digi...@morris6.eclipse.co.uk

unread,
Mar 29, 2011, 5:47:54 PM3/29/11
to digi...@googlegroups.com
Hi,

I'm trying to hook up the DS18B20 sensor to a USB serial port provided
by the FTDI FT232RL IC. In fact, I'm currently using Sparkfun's FT232R
Breakout board. So far, I've followed some good instructions from here:

http://martybugs.net/electronics/tempsensor/

..but in the hardware section, the supplied schematic is for a true
RS232 port, which has the � rails. The FTDI chip that I would like to
use is just 3.3V, and it can supply 50mA to a small serial device, so I
would ideally power the DS18B20 straight from the FT232.

So far, I've put a circuit together so that the sensor has ground on pin
1, 3.3V on pin 3, and then I've connected pin 2 to the DTR line, with
two Schottky diodes and the 1.5K resistor as per the diagrams in the
link above. I've (probably incorrectly) missed off the Zener's, as the
3.3V I'm using is below the 3.9 and 6.2V anyway.

On my Ubuntu 10.10 PC, when I run:

sudo digitemp_DS9097 -i -s /dev/ttyUSB0 -q -c /etc/digitemp.conf

..it pauses for around 10 seconds or so, with no output (or config file)
being made.

BTW, the serial port is definitely working, if I connect RX+TX with a
wire, I get the characters echoed back from Minicom.

Any suggestions?

Thanks!
M

specialist

unread,
Apr 17, 2011, 11:28:30 AM4/17/11
to DigiTemp
Hi,

I am working right now at the same problem. If there is only an USB
interface it does not make sense to generate first the +/-15 V of
RS232 to burn them in a passive adapter and then shape them again for
a 5 Volt UART input. So (I thought) using a FTDI232 fake UART plus
some analog adaptation should be an alternative imitating a serial
UART to the 1-wire bus for digitemp.
My new hardware works fine, i.e. the outputs of the FTDI232 are formed
and put to the 1-wire-line, the 1-wire-line levels sent back to the
USB Uart input.
Win7 accpts the VTI drivers for the UART chip, lets digitemp (v 2.5)
operate from the command line.
However it does not work. The digitemp software does "something",
interrogating the 1-wire-bus somehow, but the timing does not fit and
the 18S20 is not responding. There is just an error message "error(s)
5 and 7 DS2480B not found."
I am wondering how many tricks are built into the digitemp software to
operate the passive adapter, if Win7 does not allow the SW to modify
the faked Baud rate or whatever. I found very few debug options here.
In your question I guess the 3.3 volts are too low, should be more
like 5 volt coming down from a pullup resistor. But apparently the
hardware adaptation is not all; the software seems to be really
tricky. To change 3.3 to 5 volt may require to change a jumper around
the FTDI232.

specialist

specialist

unread,
Apr 17, 2011, 12:49:00 PM4/17/11
to DigiTemp
Hi,

after quite a few more hours of tweaking I made the interface work
using linux Ubuntu 10.04 and a specific hardware adaptation behind the
ftdi232.
Contrary to a Maxim application note a 1-wire interface with ftdi232
and digitemp software does not need any level inversions between the
signals of the 1-wire bus and the RX and TX lines of the UART.
But for the bus master direction a transistor pulldown is needed for
TX, not inverted, so two transistors are actually needed between the
chip's TX line and the 1-wire bus line.
I would also recommend some noise and overvoltage protection at the 1-
wire bus terminals.

specialist


On 29 Mrz., 23:47, digit...@morris6.eclipse.co.uk wrote:
Reply all
Reply to author
Forward
0 new messages