Re: [Owfs-developers] connecting many DS2408

2006-02-27 Thread Marc Lavallée
Le 14 Février 2006 16:04, Paul Alfille a écrit :

  Paul Alfille wrote:
   I was incorrect in my earlier note about the polling frequency. The
   DS2408 has a latch, accessible through OWFS, that will save the
   button press. This will greatly diminish the chance of missing a
   button press and reduce the polling frequency.

 I looked at the documentation, and it's even better than I remembered.
 There is  an alarm state triggered by a change in any of the pins.
 ...
 The advantage of this is that you will only see the triggered switches
 (only they appear in the alarm directory) and the latches make catching
 button presses easier. The only limits are now the latency between
 finding a button press and giving feedback.

Paul, do you know if there's a timestamp associated with the alarms?
I need to know when the switches were pressed, without polling a lot.
--
Marc


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


RE: [Owfs-developers] connecting many DS2408

2006-02-27 Thread Alfille, Paul H.,M.D.
No timestamp. You can easily poll every second, however. Is that fine enough
resolution?

Paul


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Lavallée
Sent: Monday, February 27, 2006 9:50 AM
To: owfs-developers@lists.sourceforge.net
Subject: Re: [Owfs-developers] connecting many DS2408

Le 14 Février 2006 16:04, Paul Alfille a écrit :

  Paul Alfille wrote:
   I was incorrect in my earlier note about the polling frequency. The
   DS2408 has a latch, accessible through OWFS, that will save the
   button press. This will greatly diminish the chance of missing a
   button press and reduce the polling frequency.

 I looked at the documentation, and it's even better than I remembered.
 There is  an alarm state triggered by a change in any of the pins.
 ...
 The advantage of this is that you will only see the triggered switches
 (only they appear in the alarm directory) and the latches make catching
 button presses easier. The only limits are now the latency between
 finding a button press and giving feedback.

Paul, do you know if there's a timestamp associated with the alarms?
I need to know when the switches were pressed, without polling a lot.
--
Marc


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-15 Thread Jan Kandziora
Am Dienstag, 14. Februar 2006 20:12 schrieb Marc Lavallée:
 Le 13 Février 2006 15:03, Jan Kandziora a écrit :
  Am Montag, 13. Februar 2006 19:46 schrieb Marc Lavallée:
   I'm new to the 1-wire technology.
  
   I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
   ethernet cables, arranged in a topology of 2 or 3 branches with 10 or
   15 daisy-chained devices.
 
  Branches are a big problem for the onewire hardware. According to
  Dallas'/Maxim's own investigations, it's best to avoid star-bus
  topologies at all cost. You have three options:
 
  1. Change the star-bus into a looped-bus topology: Use four wires per
  cable, two for the forward-direction to the branch end, two for the
  reverse direction back to the root and connect it there with the forward
  direction of the next brach.

 Maybe I would understand better with a schematic.

 HOSTforward-direction
1W-+
1W_GND+|
  || Branch_1
+-+|
|+-+
||   reverse-direction
||
||
||
|+-+
+-+|
  || Branch_2
+-+|
|+-+
||
||
||
||
|+-+
+-+|
  || Branch_3
+-+|
|+-+
||
||
||


  2. Use the DS2409 chip and switch branches.

 Something like:
 http://www.hobby-boards.com/catalog/product_info.php?products_id=1511
 ?

You could build yourself, as only the DS2409 chip is needed. It's not so hard 
to weld a TSOC6 package (unlike SO16) by hand, and you could even get the 2 
needed DS2409 parts as samples from Maxim.

Kind regards

Jan
-- 
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect. -- Linus Torvalds


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-14 Thread Paul Alfille
On Tuesday 14 February 2006 02:12 pm, Marc Lavallée wrote:
 Le 13 Février 2006 15:03, Jan Kandziora a écrit :
  Am Montag, 13. Februar 2006 19:46 schrieb Marc Lavallée:
   I'm new to the 1-wire technology.
  
   I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
   ethernet cables, arranged in a topology of 2 or 3 branches with 10 or
   15 daisy-chained devices.
 
  Branches are a big problem for the onewire hardware. According to
  Dallas'/Maxim's own investigations, it's best to avoid star-bus
  topologies at all cost. You have three options:
 
  1. Change the star-bus into a looped-bus topology: Use four wires per
  cable, two for the forward-direction to the branch end, two for the
  reverse direction back to the root and connect it there with the forward
  direction of the next brach.

 Maybe I would understand better with a schematic.

  2. Use the DS2409 chip and switch branches.
This would be a rather slow solution for polling. The Link-Hub has electrical 
partitioning but a unified bus topology that would be a little faster.

 Something like:
 http://www.hobby-boards.com/catalog/product_info.php?products_id=1511
 ?

  3. Use several host adapters.

 Is OWFS able to manage several adapters?
Absolutely! You can have OWFS connect to the several adapters, and it will 
give a unified view, as well as (optionally) a separated view.
I.e. you can call
owfs /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /1wire
Then
'ls 1wire/29.*' to get all the DS2408 adapters (0x29 is the family code)
or
'ls 1wire/bus.0/29.*' to get the DS2408s on the first adapter.

You can also run several instances of OWFS:
owfs /dev/ttyS0 /1wire/Line0
owfs /dev/ttyS1 /1wire/Line1
owfs /dev/ttyS2 /1wire/Line2

and 'ls /1wire.Line?/29.*' to get a unified view or address each directory 
(and thus owfs instance and adapter) independently.

Note, in all these cases, the adapter can be serial, USB, or remote (via 
owserver).

This last method might be a little faster, but only works for the filesystem 
interface. We don't currently allow more than one OWFS instance for the 
language bindings.


  It's really hard to monitor keypresses that way with a non-realtime OS.
  Networked peripherals makes things even worse.
 
  You have to do it by hardware. The simplest idea is to use the edge
  detector circuits built into the DS2408. That will give you a button was
  pressed since last check signal for each button.

 That might be enough. If it's not, then I can add a hardware latch in the
 circuit (a flip-flop?), because what I need to know is which key was
 pressed first.

 Paul Alfille wrote:
  I was incorrect in my earlier note about the polling frequency. The
  DS2408 has a latch, accessible through OWFS, that will save the button
  press. This will greatly diminish the chance of missing a button press
  and reduce the polling frequency.

I looked at the documentation, and it's even better than I remembered. There 
is  an alarm state triggered by a change in any of the pins.

# loop through all switches
for x in /1wire/29.* ; do
  # trigger if any latch (better check this)
  echo 1  $x/set_alarm 

  # set non-conducting to allow sensing
  echo 0  $x/PIO.BYTE 
done

#Loop forever
while : ; do
  # Loop through alarms
  for x in /1wire/alarm/29.* ; do
# Run a program with the switch name and the Latch state (button presses)
ProcessSwitch `basename $x` `cat $x/latch.BYTE`

# Reset the latches and clear the alarm
echo 1  $x/latch.BYTE
  done

  #optional pause
done

The advantage of this is that you will only see the triggered switches (only 
they appear in the alarm directory) and the latches make catching button 
presses easier. The only limits are now the latency between finding a button 
press and giving feedback.

Note that this scheme lends itself very well to partitioning. Several 
instances of script/owfs/adapter can each run simultaneously. Only the 
ProcessSwitch function has to worrt about locking shared resources.

The /1wire directory can be accessed by other processes at the same time to 
give feedback, monitor temperatures or whatever. 


 That seems to be the most elegant solution but I still don't understand how
 it works.  At this point I should order a 1-Wire interface and a few 2408
 in order to experiment.

Yup, that's the best idea. The DS9090K kit comes with a USB adapter, a little 
wiring area, and a selection of chips. $65
 --

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


RE: [Owfs-developers] connecting many DS2408

2006-02-14 Thread Gregg C Levine
Hello from Gregg C Levine
For my part, I'd rather give my money to Maxim-IC for their DS9090K,
because I've got something of a good history with them. Also I
reviewed the contents of the kit via the Maxim-IC website, and as it
happens yes you are right Paul regarding the prototyping area. And I
might add that they provide a set of sockets for their (to me
annoying) TSOC parts on the board.

I've looked at the contents of the Hobby Boards site, and I confess
I'm not impressed. Most of what they sell seems to be aimed towards
the hobbyist who does not want to build his own One-Wire hardware.
Well, with regards to their LCD display stuff that I would buy. It is
one device that I'm not comfortable with trying to build.

I should also add that if we are going to assist the correspondent in
working out the particulars for the many DS2408 project we should also
track down a company who will mount the DS2408 parts to boards on a
relatively cheap basis. Other then Hobby Boards that is. (To assist
with code creation of course.)
---
Gregg C Levine [EMAIL PROTECTED]
---
Remember the Force will be with you. Always. Obi-Wan Kenobi 

 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:owfs-developers-
 [EMAIL PROTECTED] On Behalf Of Paul Alfille
 Sent: Tuesday, February 14, 2006 4:05 PM
 To: owfs-developers@lists.sourceforge.net
 Subject: Re: [Owfs-developers] connecting many DS2408
 
 On Tuesday 14 February 2006 02:12 pm, Marc Lavallée wrote:
  Le 13 Février 2006 15:03, Jan Kandziora a écrit :
   Am Montag, 13. Februar 2006 19:46 schrieb Marc Lavallée:
I'm new to the 1-wire technology.
   
I'd like to interface over 30 DS2408 on a 1-wire bus, using
ordinary
ethernet cables, arranged in a topology of 2 or 3 branches
with 10 or
15 daisy-chained devices.
  
   Branches are a big problem for the onewire hardware. According
to
   Dallas'/Maxim's own investigations, it's best to avoid star-bus
   topologies at all cost. You have three options:
  
   1. Change the star-bus into a looped-bus topology: Use four
wires per
   cable, two for the forward-direction to the branch end, two for
the
   reverse direction back to the root and connect it there with the
forward
   direction of the next brach.
 
  Maybe I would understand better with a schematic.
 
   2. Use the DS2409 chip and switch branches.
 This would be a rather slow solution for polling. The Link-Hub has
electrical
 partitioning but a unified bus topology that would be a little
faster.
 
  Something like:
 
http://www.hobby-boards.com/catalog/product_info.php?products_id=1511
  ?
 
   3. Use several host adapters.
 
  Is OWFS able to manage several adapters?
 Absolutely! You can have OWFS connect to the several adapters, and
it will
 give a unified view, as well as (optionally) a separated view.
 I.e. you can call
 owfs /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /1wire
 Then
 'ls 1wire/29.*' to get all the DS2408 adapters (0x29 is the family
code)
 or
 'ls 1wire/bus.0/29.*' to get the DS2408s on the first adapter.
 
 You can also run several instances of OWFS:
 owfs /dev/ttyS0 /1wire/Line0
 owfs /dev/ttyS1 /1wire/Line1
 owfs /dev/ttyS2 /1wire/Line2
 
 and 'ls /1wire.Line?/29.*' to get a unified view or address each
directory
 (and thus owfs instance and adapter) independently.
 
 Note, in all these cases, the adapter can be serial, USB, or remote
(via
 owserver).
 
 This last method might be a little faster, but only works for the
filesystem
 interface. We don't currently allow more than one OWFS instance for
the
 language bindings.
 
 
   It's really hard to monitor keypresses that way with a
non-realtime OS.
   Networked peripherals makes things even worse.
  
   You have to do it by hardware. The simplest idea is to use the
edge
   detector circuits built into the DS2408. That will give you a
button was
   pressed since last check signal for each button.
 
  That might be enough. If it's not, then I can add a hardware latch
in the
  circuit (a flip-flop?), because what I need to know is which key
was
  pressed first.
 
  Paul Alfille wrote:
   I was incorrect in my earlier note about the polling frequency.
The
   DS2408 has a latch, accessible through OWFS, that will save the
button
   press. This will greatly diminish the chance of missing a button
press
   and reduce the polling frequency.
 
 I looked at the documentation, and it's even better than I
remembered. There
 is  an alarm state triggered by a change in any of the pins.
 
 # loop through all switches
 for x in /1wire/29.* ; do
   # trigger if any latch (better check this)
   echo 1  $x/set_alarm
 
   # set non-conducting to allow sensing
   echo 0  $x/PIO.BYTE
 done
 
 #Loop forever
 while : ; do
   # Loop through alarms
   for x in /1wire/alarm/29.* ; do
 # Run a program with the switch name and the Latch state (button
presses)
 ProcessSwitch `basename $x` `cat $x/latch.BYTE`
 
 # Reset the latches and clear the alarm
 echo 1  $x/latch.BYTE
   done
 
   #optional

Re: [Owfs-developers] connecting many DS2408

2006-02-13 Thread Paul Alfille
On Monday 13 February 2006 01:46 pm, Marc Lavallée wrote:
 I'm new to the 1-wire technology.

 I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
 ethernet cables, arranged in a topology of 2 or 3 branches with 10 or 15
 daisy-chained devices. The total length of the cables could be over 100
 meters. I need to monitor momentary push-buttons connected to the I/O pins
 of the 2408 and I need to know about the chronology of their status
 (pressed or released). It would work on Linux, and eventually on OSX. What
 are my options?

 Thanks for your help
 --
 Marc

I presume you are asking if OWFS can support this configuration.

1. The DS2408 is fully supported, both reading the PIO status and switching 
devices. In fact all 8 switches can be read atomically.

2. Your application is most fragile at the momentary push-button presses. 
Missed pushes will frustrate your users. That implies polling for push 
buttons, presumably fast enough not to miss any presses.

3. You probably want to partition your problem, both separate busses for 
network configuration and to speed polling. OWFS supports this vary well. You 
can even reduce the span of your network by placing embedded devices (the 
ASUS WL-WL500G Deluxe or some of the WRT54G work brilliantly, either wired or 
wirelessly.

4. You can either use the filesystem interface, or one of the language 
bindings.

5. There are clearly people willing to help.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-13 Thread Paul Alfille
On Monday 13 February 2006 01:46 pm, Marc Lavallée wrote:
 I'm new to the 1-wire technology.

 I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
 ethernet cables, arranged in a topology of 2 or 3 branches with 10 or 15
 daisy-chained devices. The total length of the cables could be over 100
 meters. I need to monitor momentary push-buttons connected to the I/O pins
 of the 2408 and I need to know about the chronology of their status
 (pressed or released). It would work on Linux, and eventually on OSX. What
 are my options?

 Thanks for your help
 --
 Marc

One other thought: the DS2423 (used in the wind speed meter) has two contact 
counters, which would make the polling problem easier.

Also, Louis Swart's LCD controller has 4 PIO counter pins that count button 
presses.

Neither of these would record order of presses withough rapid polling.


Paul Alfille 


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-13 Thread jerry scharf

--On 02/13/2006 01:46:34 PM -0500 MarcLavallée wrote:


I'm new to the 1-wire technology.

I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
ethernet cables, arranged in a topology of 2 or 3 branches with 10 or 15
daisy-chained devices. The total length of the cables could be over 100
meters. I need to monitor momentary push-buttons connected to the I/O
pins  of the 2408 and I need to know about the chronology of their status
(pressed or released). It would work on Linux, and eventually on OSX.
What  are my options?

Thanks for your help
--
Marc




Marc,

What you are doing is certainly doable.

A few things that others didn't say:

With 30 sensors, I would not depend on parasitic power. It means bringing a 
3.3 or 5V line to the chips. This allows you to ignore the charging time if 
you want to do near continuous polling. Others may have a different opinion 
on this, and it may be less of an issue with the 2408 than temp sensors.


With power, you have an odd number of lines so you can get noise pickup on 
the wire. I found it easier to pull the power and ground in a true star, 
and only daisy chain the signal line. I have done tests with 140m in this 
way and no observed problems. I also have a chain in service that has much 
more than 100m hanging off a single chain, but I don't have a TDR to 
measure the true length. In one part is has 3 runs that go ~15m from the 
star point to the sensors, so that 90m of bus length right there.


IButtonlink has a hub product in either serial or ethernet flavors. This is 
a 1-wire interface and produces 4 1-wire buses with +5v and +12v. It does 
not emulate the logic of the 1-wire switch, which is contorted at best, but 
rather makes all the sensors available with no additional coding. I have a 
serial version. Paul has added support for the ethernet version as well.


best of luck,
jerry


Jerry Scharf
laguna way consulting



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers