Multiple 1-Wire devices on same bus

Started by ThierryP, November 02, 2012, 05:30:00 PM

Previous topic - Next topic

ThierryP

Has anyone been able to read values from multiple 1-wire devices connected on the same bus to a Duinomite/Maximite?
I've connected DS18B20 and DS18S20 temperature sensores standalone, but don't know how to read the values when there's more than one on same bus.

Thanks

Thierry

taucapic

Hi Thierry!
I think that the  1- wire interesting and necessary project.
For example, for gardeners and farmers, I think this is the only chance to make
temperature control of greenhouses or something like that ...
without scaring bees  ... I think the bees will not like options like .... wireless... microwaves ...
There is a proposal to move in this direction, may be someone else wants to join.
Interesting to in what form do you use thermal sensors, what is the distance,  connections,
or chip interface , program.
    Taucapic.

ThierryP

I've written example code for Duinomite / Maximite, reading 3x DS18_20 devices on the same bus. This can be extended to a much larger number of devices.
Written in MMBAsic 4.0, tested on Duinomite

See: http://www.thebackshed.com/forum/forum_posts.asp?TID=5268&PN=1

Thierry

taucapic

              Thierry,congratulations on working software !
    This week, I'll order from a distributor
DS 1820 .  We will build on the platform DUINOMITE
1- wire bus. As I understand it, the sensors are at intervals of 3 m.
The last sensor is at a distance of 10 m from the microcontroller.
I hope that by the weekend something happens!.

taucapic

#4
                 Hi everyone!
  We continue the development of the 1-wire Project (for educational purposes
and  the simplest application).Your attention is invited selection of
hardware design .

Classification of 1-Wire network - miniature,       short,         medium ,          long
The cable line length   -             3-5 m         25-30 m        80-90 m           More than 250 m
Type of cable          -            anyone        4-wire tel.      tw pair               firewire
Network components     -   DUINOMITE+     DUINOMITE +     DUINOMITE +             Proprietary solution     
                                              passive pullup    adapters          active pull
                                                               on discrete     (DS2480V,DS2482)
                                                            components
                                                              DS9097E,DS1410E


Components for a simple 1 wire bus:
1. DS18B20 -temperature sensor
2. DS18B20+PAR -temperature sensor
3. DS2482S-100 - Single-Channel 1-Wire Master
4. DS2482S-800 - 8-Channel 1-Wire Master
5. DS2413P - 1-Wire Dual Channel Addressable Switch
6. Cable tw pair Cat5

 








taucapic

#5
          DuinoMite as  OneWireReader
                     
     After receiving the components begin installation of nodes in the network.
Consider as an example - three of polycarbonate greenhouses for growing pepper-temperature control.
Before assembling the components it is necessary to read their codes.
Temperature sensors must be programmed for the control signals - open or close the window (an average daily temperature of 21 deg).
This will simplify the development of software in the future.

DuinoMite MM Basic Version 4.0
Copyright 2011,2012 Geoff Graham
Example code for reading ROM CODE DS18B20

PinNbr = 18
GetRom PinNbr,rom$
Print rom$;
        Sub GetRom (PinNbr,rom$)
        Local bt1,bt2,bt3,bt4,bt5,bt6,bt7,bt8
        OWReset PinNbr
        OWWrite PinNbr,1,1,&h33
        OWRead PinNbr,0,8,br1,bt2,bt3,bt4,bt5,bt6,bt7,bt8
        rom$ = "ROM CODE :"+ Str$(bt1) + "," + Str&(bt2)
        + "," + Str$(bt3) + "," + Str$(bt4) + ","
        + "," + Str$(bt5) + "," + Str$(bt6) + ","
        + "," + Str$(bt7) + "," + Str$(bt8)
         EndSub

Place the components on the circuit boards and solder    according to the topology of the network and the datasheet  catalog for  the component. 
  The technology is similar to "SOIC, to DIP adapter for prototyping".
(http://www.youtube.com/watch?v=-32orELxkpE&feature=related)