Jim Kusznir | 3 Jan 2008 20:06
Picon

Re: Hydroelectric Powerplant

We have been facing some of the same problems here with our SmartHome
project.  OneWire devices (currently primarily the DS2406, DS18B20,
and DS2450) have been very useful and form the backbone of our sensor
network.  However, we're running into issues where we need "local
intelligence"; for example, running a capicitave pressure sensor or a
complete thermostat with analog voltage output, as well as a handful
of other applications.  We've been debating in our group how best to
go about it, and I was thinking emulating a 1wire memory device might
be best, but a custom device in OWFS could possibly be better.

We plan to put some manpower on writing code for the ATMEL cpu's for
this purpose, but haven't quite gotten there yet.  I was
wondering/fearing how hard it would be to do the slave-side 1-wire
code, as I haven't found any mention of it yet.

I'm really interested in this aspect, and am interested in working
with anyone who is interested.

Thanks again for such a wonderful project that has saved us tons of work!!!

--Jim

On Jan 3, 2008 9:29 AM, Paul Alfille <paul.alfille <at> gmail.com> wrote:
> On website at http://owfs.org/index.php?page=hydroelectric-plant (I've
> included my responses).
>
> ---------- Forwarded message ----------
> On Dec 13, 2007 3:44 PM, Hakan.Elmqvist <at> ki.se <hakelm <at> ki.se> wrote:
>
>
(Continue reading)

Paul Alfille | 5 Jan 2008 01:21
Picon

Re: Hydroelectric Powerplant



On Jan 3, 2008 2:06 PM, Jim Kusznir <jkusznir <at> gmail.com> wrote:
We have been facing some of the same problems here with our SmartHome
project.  OneWire devices (currently primarily the DS2406, DS18B20,
and DS2450) have been very useful and form the backbone of our sensor
network.  However, we're running into issues where we need "local
intelligence"; for example, running a capicitave pressure sensor or a
complete thermostat with analog voltage output, as well as a handful
of other applications.  We've been debating in our group how best to
go about it, and I was thinking emulating a 1wire memory device might
be best, but a custom device in OWFS could possibly be better.

We plan to put some manpower on writing code for the ATMEL cpu's for
this purpose, but haven't quite gotten there yet.  I was
wondering/fearing how hard it would be to do the slave-side 1-wire
code, as I haven't found any mention of it yet.

I'm really interested in this aspect, and am interested in working
with anyone who is interested.

Thanks again for such a wonderful project that has saved us tons of work!!!

--Jim

I ran into this advertisement for a book that apparently has instructions on building a PIC 1-wire slave:
http://www.microengineeringlabs.com/products/books/scbook.htm
Serial Communications Using PIC® Microcontrollers - $49.95
by Roger Stevens
Copyright 2007
microEngineering Labs, Inc.
Box 60039
Colorado Springs CO 80960
(719) 520-5323
(719) 520-1867 fax
email: support <at> melabs.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 9 Jan 2008 21:33
Picon

Re: Hydroelectric Powerplant

I reply to my query on the book:
--------------
Hello,

Yes, that book does include routines to use a PIC as a
1-wire slave.  As for the address, you would need to
add code yourself to handle that.  Once you do that,
you can have multiple slaves on 1 line.

Thank you,
Jeff Schmoyer
microEngineering Labs, Inc.
----------------

On Jan 4, 2008 7:21 PM, Paul Alfille < paul.alfille <at> gmail.com> wrote:
I ran into this advertisement for a book that apparently has instructions on building a PIC 1-wire slave:
http://www.microengineeringlabs.com/products/books/scbook.htm
Serial Communications Using PIC® Microcontrollers - $49.95
by Roger Stevens
Copyright 2007
microEngineering Labs, Inc.
Box 60039
Colorado Springs CO 80960
(719) 520-5323
(719) 520-1867 fax
email: support <at> melabs.com


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 4 Jan 2008 04:42
Picon

Re: Hydroelectric Powerplant

On Jan 3, 2008 2:06 PM, Jim Kusznir <jkusznir <at> gmail.com> wrote:

, but a custom device in OWFS could possibly be better.

We plan to put some manpower on writing code for the ATMEL cpu's for
this purpose, but haven't quite gotten there yet.  I was
wondering/fearing how hard it would be to do the slave-side 1-wire
code, as I haven't found any mention of it yet.


From OWFS's point or view, writing support for a new slave is easy. The hard part is emulating a slave.

If you only plan to use OWFS, the restrictions can be more lax.
1. If you plan to use current 1-wire bus masters and intermix on a 1-wire network, the hardware compatibility is the only issue.
2. It is certainly possible to extend OWFS to use custom masters and custom slaves with a different communication protocol. The aspects of 1-wire that OWFS requires are unique slave numbering, individual addressing, and discovery.
3. The is a semi-compatible Fox Net http://www.ibuttonlink.com/pdf/Using%20fox-Bus.pdf marketed by iButtonlink that has potential advantages in network design, and possibly more approachable licensing scheme.
4. I've proposed adding 1-wire slave capabilities to a Maxim microprocessor (a sure win in my opinion) with no response.

I really like the idea of extending the 1-wire reach. If Maxim has no interest, perhaps we need to find compatible alternatives.

Paul Alfille


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 9 Jan 2008 23:13
Picon

Re: Hydroelectric Powerplant

When I proposed adding 1-wire slave capabilities to the MAXQ microprocessor on the MAXQ discussion board, this was the semi-encouraging response:

(Under Dallas/Maxim Discussion Board->Microcontrollers->MAXQ)
http://discuss.dalsemi.com/index.php?showtopic=5408&st=0&gopid=17151&#entry17151
--------------------

This feature is something we've considered adding to a MAXQ microcontroller, but as of yet have not found the business justification to support it. I'm open to discussion.

Clayton Ware
Business Manager
Dallas Semiconductor/Maxim
-----------------------

Can I suggest that we make a case to Dallas/Maxim there?

Paul Alfille

On Jan 3, 2008 10:42 PM, Paul Alfille <paul.alfille <at> gmail.com> wrote:
4. I've proposed adding 1-wire slave capabilities to a Maxim microprocessor (a sure win in my opinion) with no response.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Matthias Urlichs | 4 Jan 2008 00:00
Picon

Re: Hydroelectric Powerplant

Hi,

Jim Kusznir:
> I'm really interested in this aspect, and am interested in working
> with anyone who is interested.
> 
*raises hand*

> > E. Although Dallas is phasing them out, the DS2404 has dual inputs -- 1-wire
> > and 3-wire and can serve as a bridge to the PIC.
> >
Dallas is no longer manufacturing the 2404; the website suggests that
you won't get any unless you already use them in legacy hardware.

--

-- 
Matthias Urlichs   |   {M:U} IT Design  <at>  m-u-it.de   |  smurf <at> smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
Man who sleep in beer keg wake up sticky.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Ben Griffith | 4 Jan 2008 04:31
Picon

Re: Hydroelectric Powerplant



On Jan 3, 2008 6:00 PM, Matthias Urlichs <smurf <at> smurf.noris.de> wrote:


> > E. Although Dallas is phasing them out, the DS2404 has dual inputs -- 1-wire
> > and 3-wire and can serve as a bridge to the PIC.
> >
Dallas is no longer manufacturing the 2404; the website suggests that
you won't get any unless you already use them in legacy hardware.


I requested samples of the DS2404 from Maxim back in June and they sent them to me.  I planned to access the 3-wire port using an Ardiuno board, but haven't gotten a chance to figure out how to do it yet.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Matthias Urlichs | 4 Jan 2008 04:46
Picon

Re: Hydroelectric Powerplant

Hi,

Ben Griffith:
> I requested samples of the DS2404 from Maxim back in June and they sent them
> to me. 

Oh well, so much for that theory then. ;-)

> I planned to access the 3-wire port using an Ardiuno board, but
> haven't gotten a chance to figure out how to do it yet.

The data sheet says that you feed in basically the same command
structure as with 1wire except that there's a separate clock instead
of timing, and that you don't select the chip before talking to it.

IMHO the whole idea is somewhat flawed: as soon as you talk to it using
the 3-wire interface, it won't respond to 1wire commands any more.
There is no way to get any consistent metric of your bus quality that way.

Native 1wire seems preferable.
You could emulate the DS2404 ...

--

-- 
Matthias Urlichs   |   {M:U} IT Design  <at>  m-u-it.de   |  smurf <at> smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
Benchley's Distinction: There may be said to be two classes of people in the
world; those who constantly divide the people of the world into two classes
and those who do not.
					-- Robert Benchley

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Ben Griffith | 4 Jan 2008 13:18
Picon

Re: Hydroelectric Powerplant


On Jan 3, 2008 10:46 PM, Matthias Urlichs <smurf <at> smurf.noris.de> wrote:


IMHO the whole idea is somewhat flawed: as soon as you talk to it using
the 3-wire interface, it won't respond to 1wire commands any more.
There is no way to get any consistent metric of your bus quality that way.

I just figured I'd do something like only access the device from the 1wire host in the middle of a 20 second (or so) window every minute, during which the Arduino would not access the 3-wire port.  That big of a window gives me plenty of room to keep the times "close enough" to each other.  Or I could probably just have each host just keep trying every second until it's able to access the DS2404.  Each would have it's own area to write to, and wouldn't believe anything read from the other's area until it was read the same twice in a row (in case it managed to read something in between write operations by the other host).
But I see your point... I'm just going to assume that the reason I can't read from the 1wire port is because the 3wire port is in use... when it could be because of some problem on the 1wire bus.
"...the device will still respond to the reset pulse, but any subsequently transmitted 1-Wire command will be ignored."  So what would owfs do then?  Would there be a way to distinguish between that response and an unreachable device?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Matthias Urlichs | 4 Jan 2008 13:24
Picon

Re: Hydroelectric Powerplant

Hi,

Ben Griffith:
> "...the device will still respond to the reset pulse, but any subsequently
> transmitted 1-Wire command will be ignored."  So what would owfs do then?

Return an annoying error. :-/

> Would there be a way to distinguish between that response and an unreachable
> device?

I can't think of any, esp. when the thing is not the only device on the bus.

--

-- 
Matthias Urlichs   |   {M:U} IT Design  <at>  m-u-it.de   |  smurf <at> smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
Man has never reconciled himself to the ten commandments.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Paul Alfille | 3 Jan 2008 18:29
Picon

Hydroelectric Powerplant

On website at http://owfs.org/index.php?page=hydroelectric-plant (I've included my responses).

---------- Forwarded message ----------
On Dec 13, 2007 3:44 PM, Hakan.Elmqvist <at> ki.se <hakelm <at> ki.se> wrote:
I have an old and small hydroelectric powerplant
( http://sundsvik.dnsalias.org/) run on a shoestring budget.
It is remotely monitored  and controlled by a
system mainly based on 1-wire devices using OWFS.
 
Thankyou for a very nice piece of software.
The 1-wire devices have their limitations, they
are for instance not very good at measuring
precise intervals and totals and other things.
Therefore I would like to design a flexible
device based on a microcotroller for instance a
PIC that can draw on the advantages of the 1-wire
protocol and extend the capabilities of the devices offered by Maxim.
The device to emulate that first comes to my mind
is the DS18S20 which has a rather simple
architecture with a read/write scratchpad memory
area which is ideal for my purposes.
My questions to you are:
1) Commands 0xBE and 0x4E: Can I in any simple
way read and write whole or parts of the
scratchpad memory with OWFS? Is there a
one-to-one relationship between the reported
temperature and the content of the temperature registers?

Well, we read scratchpad internally, and it would be easy to make it externally visible.
I don't currently, because it might overwhelm new users, and changing the scratchpad would make other aspects inaccurate (like temperature resolution).

2) Are you aware of any project for emulating the
Dallas 1-wire devices? I hate to reinvent the wheel.

Louis Swart's LCD uses a PIC to emulate a 1-wire device. Maxim in general is protective of the 1-wire device technology (for the slaves, the masters are fair game).

A. Have you looked at the DS27xx chips? They have temperature, current, accumulators, timers, voltages, even a bit of memory. Pretty cheap. Look specifically at the DS2760 DS2751 DS2770 and DS2780

B. There is no reason to blindly emulate the DS1820 -- we can create an entry to your chip using the command codes you like. It has to speak 1-wire (reset, selection, etc) but the actual protocol needn't be constrained.

C. If you really want to be different, we can make a unique adapter and chips that don't have to talk true 1-wire between them. We can work to make it fall generally in the same scheme.

D. There might be other resources (smart people) if you ask this question ion the owfs-developer's list.

E. Although Dallas is phasing them out, the DS2404 has dual inputs -- 1-wire and 3-wire and can serve as a bridge to the PIC.
 
Thanks in advance
Håkan Elmqvist

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Mark Marsh | 4 Jan 2008 16:07
Picon

Re: Hydroelectric Powerplant

Would it be possible to share a memory device between two 1-wire busses? Some sort of synchronisation would be required so that it wasn't swapped while being read / written but that shouldn't be too difficult (PIO based semaphore). You could even use two devices so that both busses have a device that can be read / written at any time. It wouldn't provide real time access but could be used to transfer the results of measurements made by the microcontroller.

Just a thought.

Mark


On Jan 3, 2008 5:29 PM, Paul Alfille <paul.alfille <at> gmail.com> wrote:
On website at http://owfs.org/index.php?page=hydroelectric-plant (I've included my responses).

---------- Forwarded message ----------
On Dec 13, 2007 3:44 PM, Hakan.Elmqvist <at> ki.se <hakelm <at> ki.se> wrote:
I have an old and small hydroelectric powerplant
( http://sundsvik.dnsalias.org/) run on a shoestring budget.
It is remotely monitored  and controlled by a
system mainly based on 1-wire devices using OWFS.
 
Thankyou for a very nice piece of software.
The 1-wire devices have their limitations, they
are for instance not very good at measuring
precise intervals and totals and other things.
Therefore I would like to design a flexible
device based on a microcotroller for instance a
PIC that can draw on the advantages of the 1-wire
protocol and extend the capabilities of the devices offered by Maxim.
The device to emulate that first comes to my mind
is the DS18S20 which has a rather simple
architecture with a read/write scratchpad memory
area which is ideal for my purposes.
My questions to you are:
1) Commands 0xBE and 0x4E: Can I in any simple
way read and write whole or parts of the
scratchpad memory with OWFS? Is there a
one-to-one relationship between the reported
temperature and the content of the temperature registers?

Well, we read scratchpad internally, and it would be easy to make it externally visible.
I don't currently, because it might overwhelm new users, and changing the scratchpad would make other aspects inaccurate (like temperature resolution).

2) Are you aware of any project for emulating the
Dallas 1-wire devices? I hate to reinvent the wheel.

Louis Swart's LCD uses a PIC to emulate a 1-wire device. Maxim in general is protective of the 1-wire device technology (for the slaves, the masters are fair game).

A. Have you looked at the DS27xx chips? They have temperature, current, accumulators, timers, voltages, even a bit of memory. Pretty cheap. Look specifically at the DS2760 DS2751 DS2770 and DS2780

B. There is no reason to blindly emulate the DS1820 -- we can create an entry to your chip using the command codes you like. It has to speak 1-wire (reset, selection, etc) but the actual protocol needn't be constrained.

C. If you really want to be different, we can make a unique adapter and chips that don't have to talk true 1-wire between them. We can work to make it fall generally in the same scheme.

D. There might be other resources (smart people) if you ask this question ion the owfs-developer's list.

E. Although Dallas is phasing them out, the DS2404 has dual inputs -- 1-wire and 3-wire and can serve as a bridge to the PIC.
 
Thanks in advance
Håkan Elmqvist


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Gmane