1-­WIRE DS18B20 used with RS232 to TTL multiform MiniMax interface (application note 01)

1-­WIRE DS18B20 used with RS232 to TTL multiform MiniMax interface (application note 01)

In this article we show how to connect 1-­WIRE DS18B20 temperature sensor to our MiniMax  RS232 interface. Below a list of the necessary materials:

1) Minimax interface

2) A RS232 cable for PC port (USB or serial standard)

3) DS18B20 1­wire temperature sensor (1 or more)

4) A piece of software to read the sensors: LOGTEMP or other similar programs

5) A piece of software to set RS232 “DTR” and “RTS” signals at high level

6) Terminal block, wires and some connectors socket

On to MiniMax RS232 interface set the jumpers: JP1 = ON; JP2 = OFF. Connect the DS18B20 sensor to the side B of the interface with wires, sockets and terminal block as we see in the images below.

DS18B20 connection to RS232 minimax interface

DS18B20 connection to RS232 minimax interface

1-WIRE DS18B20 wiring

1-WIRE DS18B20 wiring

We can use more then one DS18B20, we have not tested how many the normal RS232 ports can sustain. If the DS18B20 power supply is external and not the RS232 port, the number of devices connected can be many more.

Connect the minimax interface to the PC serial port. Start the “LOGTEMP” software and set the following parameters:

1) “SHOW”→ “SETUP”→”GENERAL”:

set adapter as DS9097E, set interval at 15 seconds, set port COM at the one we have connected MiniMax RS232 interface (example COM port 2). Confirm and return to main menu.

2) “SHOW”→ “SETUP”→”SENSORS”:

set DS18B20. Confirm and return to main menu’.

3) Click “GO” and the program starts to scan for the DS18B20 sensors

Good luck!

Note: tested with FTDI usb to serial RS232 interface.

Here’s the link  to “LOGTEMP” software: http://www.mrsoft.fi/ohj01en.htm

LOGTEMP data recording

LOGTEMP data recording

LOGTEMP data recording

LOGTEMP data recording

RS232 to TTL multiform MiniMax interface  (serial, TTL, 1-Wire)

RS232 to TTL multiform MiniMax interface (serial, TTL, 1-Wire)

RS232 to TTL multiform MiniMax interface  (serial, TTL, 1-Wire)

Below we are going to describe a simple interface circuit for RS232 serial line; nothing new, in the web there are many similar schemes. In this circuit we tried to put together, with the bare minimum of components, various features as listed here:

– Interface signals TTL / C-MOS 0/5 volt with ability to power devices connected (a few mA)
– Interface 0-12 volt logic signals
– Selection of half-duplex and full-duplex
– Paralleling 2 or more RS232 ports
– 1-wire bus interface with ability to power devices connected
– Selection of echo tx to rx or echo suppression when in half-duplex

LEDs are used to show the logical high RX (green) and TX (red) signals. The components used are very common, they are not particularly critical, the circuit is feasible with the material that every electronic hobbyist has in the drawer. The operation of the circuit has been tested to a transmission rate of 250 kbaud for sections of short length. It has also been tested with the 1-wire network on a cable length of 100 meters with 8 (eight) DS18B20 sensors, powered by the same RS232 serial port. The auxiliary power supply is derived from the signals “DTR” and “RTS”, held at the high logic state.

Description of the circuit

As can be seen from the schematic, the circuit is very simple. The output stage, connected to the TX of RS 232, is composed of R3 (base current of Q3), DS8 (protection negative voltage), Q3 (output driver) and DZ3 (regulator output voltage limiter or voltage input). DZ3 may have different values of zener: when used with TTL levels should be 5.1 volts, when used with other logic levels can be 3.3 or 12 volts.
The resistor R5 is the resistance that brings power to output and must be calculated in relation to the zener DZ3, the milliampere available on the RS232 driver and the external devices that we want to power. The diodes DS1 and DS6 bring the voltage available on the signals “DTR” and “RTS” (when at high level) to the circuit composed of the capacitor C1, R5 and DZ3. The diode DZ2 polarizes Q1 and Q2 to the right voltage which activates a high logic level signal onto RX of RS232. R1 keeps the RX signal to zero volts when Q1 is off or when Q2 is enabled. When at side B is received a signal at the logical level zero, through R4 the current flows into the base of Q1 that starts to conduct and leads to a high level signal onto RX of RS232 port.

JP1 = ON, in this case the RX and TX are in common and it is the situation that occurs in the 1-wire bus, which is a half-duplex bus.
JP2 = ON, in this case when the TX port RS232 transmits, the signal via R2 activate Q2 conduction and blocking the echo of characters (if JP1 = ON)

The green LED1 displays the status of the high signal RX and red LED2 displays the status of TX.

Practical realization, assembly and construction

This is the schematic for the RS232 to TTL multiform MiniMax interface. You can download also the Eagle files, see at the end of the post in the download section. You can do it yourself or just ask’n’wait for a little help (we’re dealing with people of a tech company who soon will realize a purchasable kit at a very affordable price. Stay tuned for upcoming updates!)

RS232 TTL MiniMax multiform interface - Schematic

RS232 TTL MiniMax multiform interface – Schematic – Please always refer to the downloadable PDF for further updates not reported in the pictures.

This is the PCB for the RS232 to TTL multiform MiniMax interface

RS232 TTL MiniMax multiform interface - PCB with components

RS232 TTL MiniMax multiform interface – PCB with components – Please always refer to the downloadable PDF for further updates not reported in the pictures.

And here the very prototype. Note that in this picture the DB9 connector J1 is soldered on bottom side / copper side of the board, but this is a weird prototype. Following the scheme, you’ll guess that the correct mounting way is to embed the PCB between the two rows of pins of the connector, making the pins corresponding to soldering places. The five-pins row obviously must be turned to copper side, and in top side it must be placed JP3 in order to connect itself to the pin 7 of the DB9 connector. You should (and PCB is designed to) use 1 x pin header strip (90° angle, 2.54mm pitch).

RS232 MiniMax Multiform Interface - The prototype

RS232 MiniMax Multiform Interface – The prototype

 

Editor’s note: original files are not available here. If you need any of them (schematic, pcb layout, BOM et cetera) please leave a comment with a valid email address and we will send it to you asap.

 

Footnote(s)

  1. If you find something useful and you test it, use it, experiment with it, elaborate/upgrade it, please let us know;

  2. If you find any inaccuracies or errors in the projects, documents and texts, they were probably made to give you the opportunity to report them to us and make us realize that we can make mistakes and we ignore many things.