Alessio Sangalli | 1 May 2008 22:25

DS2450 and voltages

Hi, I am using a DS2450 to control voltages.

I use a voltage divider, 33K + 10K resistors and measure the voltage in
the middle to measure up to about 20V.

I have to calibrate each ADC to get an accurate reading depending on the
real value of the resistors.

In this operation I would be more comfortable to use the raw 16bit
reading from the sensor, is it possible to have it available or the
DS2450 just sends the voltage reading?

bye thank you
Alessio

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Paul Alfille | 2 May 2008 02:37
Picon

Re: DS2450 and voltages

It's certainly possible to give the raw byte sequence. There is a slight wrinkle that the DS2450 does A/D conversion either 0-2.5V or 0-5V and we use the requested property to transparently set the correct resolution.

From modules/owlib/src/c/ow_2450.c:

    // data conversions
    f[0] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[1]) << 8) | data[0]);
    f[1] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[3]) << 8) | data[2]);
    f[2] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[5]) << 8) | data[4]);
    f[3] = (resolution ? 7.8126192E-5 : 3.90630961E-5) * ((((UINT) data[7]) << 8) | data[6]);

Are you using a platform where floating point arithmetic is inconvenient? I'm told the true resolution is only 8 bit even though 16bit is set, so rounding errors are probably irrelevant.

If you want the raw reading, can you suggest a good name? A2D ? raw_read?

Paul Alfille

On Thu, May 1, 2008 at 4:25 PM, Alessio Sangalli <alesan <at> manoweb.com> wrote:
Hi, I am using a DS2450 to control voltages.

I use a voltage divider, 33K + 10K resistors and measure the voltage in
the middle to measure up to about 20V.

I have to calibrate each ADC to get an accurate reading depending on the
real value of the resistors.

In this operation I would be more comfortable to use the raw 16bit
reading from the sensor, is it possible to have it available or the
DS2450 just sends the voltage reading?

bye thank you
Alessio



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Alessio Sangalli | 2 May 2008 09:45

Re: DS2450 and voltages

Paul Alfille wrote:
> It's certainly possible to give the raw byte sequence. There is a slight

> Are you using a platform where floating point arithmetic is
> inconvenient? I'm told the true resolution is only 8 bit even though
> 16bit is set, so rounding errors are probably irrelevant.

Well I do not have an FPU, but floating point is possible anyway, and
this application will just do a FP multiplication every now and so, it
should not be a problem.

>From the DS2450 datasheet, page 22:
"In the shaded areas [>8 bit resolution] the accuracy is less than the
resolution. The conversion results may include random noise."
I'd keep the 16 bit value anyway, just the value that comes from the
device (I assume the device always outputs a 16bit value)

> If you want the raw reading, can you suggest a good name? A2D ? raw_read?

Well, difficult question :) I think both names make sense. What is the
name the Maxim datasheet refer to this value?

bye
Alessio

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Paul Alfille | 2 May 2008 21:48
Picon

Re: DS2450 and voltages

Allesio

After a conversion (measurement) is done, the raw data can be read from memory (page 0).

This is a little less efficient since the memory page is read twice, once for the voltage and once for the page. Still, data A/D is probably the slowest part of the sequence.

The data sheet calls these the conversion readout or conversion registers. Not the best name for a property.

Paul

On Fri, May 2, 2008 at 3:45 AM, Alessio Sangalli <alesan <at> manoweb.com> wrote:
Paul Alfille wrote:
> It's certainly possible to give the raw byte sequence. There is a slight

> Are you using a platform where floating point arithmetic is
> inconvenient? I'm told the true resolution is only 8 bit even though
> 16bit is set, so rounding errors are probably irrelevant.

Well I do not have an FPU, but floating point is possible anyway, and
this application will just do a FP multiplication every now and so, it
should not be a problem.

>From the DS2450 datasheet, page 22:
"In the shaded areas [>8 bit resolution] the accuracy is less than the
resolution. The conversion results may include random noise."
I'd keep the 16 bit value anyway, just the value that comes from the
device (I assume the device always outputs a 16bit value)

> If you want the raw reading, can you suggest a good name? A2D ? raw_read?

Well, difficult question :) I think both names make sense. What is the
name the Maxim datasheet refer to this value?

bye
Alessio



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Gregg C Levine | 7 May 2008 03:33
Picon

Three issues in need of answers

Hello!
Paul what is the oldest of the 2.4 series of Linux kernels that will support
both the FUSE module, and the OWFS routines, as applied to the serial
devices for the One Wire devices?

And next, "Paul, are you aware that we are running against the quota as used
by Sourceforge?" There's a note regarding that issue on my user's account
e-mail address.

And this is a general question, would anyone know when Dallas Semiconductor
and Maxim decided to discontinue the Java enabled family of buttons? I asked
them directly about this, but naturally no one there had the answer to hand
as it were.
--
Gregg C Levine hansolofalcon <at> worldnet.att.net
"The Force will be with you always." Obi-Wan Kenobi
  

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Paul Alfille | 7 May 2008 12:44
Picon

Re: Three issues in need of answers

On Tue, May 6, 2008 at 9:33 PM, Gregg C Levine <hansolofalcon <at> worldnet.att.net> wrote:

Hello!
Paul what is the oldest of the 2.4 series of Linux kernels that will support
both the FUSE module, and the OWFS routines, as applied to the serial
devices for the One Wire devices?

Serial support in OWFS itself probablu extends back to the 1.2 kernels Certainly 2.0 and 2.2 are supported.
FUSE is a little more difficult. This page has data:  http://fuse.sourceforge.net/wiki/index.php/OperatingSystems


And next, "Paul, are you aware that we are running against the quota as used
by Sourceforge?" There's a note regarding that issue on my user's account
e-mail address.
Christian Magnusson has addressed this. 

And this is a general question, would anyone know when Dallas Semiconductor
and Maxim decided to discontinue the Java enabled family of buttons? I asked
them directly about this, but naturally no one there had the answer to hand
as it were.
Not sure. 2004?
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 9 May 2008 03:19
Picon

Re: OWFS and WRT54GL

I can't answer about assembled WRT54GL, but there are a number of devices with functioning USB ports:

WRT54G(S), ASUS-WL500gd, ASUS-WL500W for wireless routers

NSLU2 for USB and wired device.

Paul Alfille

I've sent your query to the developer's list for other input.

On Thu, May 8, 2008 at 7:29 PM, Quark IT - Hilton Travis <Hilton <at> quarkit.com.au> wrote:

Hi Paul,

 

I've been running WRT54GL (and some earlier G and GS) units at client sites for some time now with various OSes installed (default, OpenWRT, DD-WRT) and have been pretty impressed with the longevity of these units and the variety of software and hardware mods that have been cooked up for them.  It just goes to show what a good dev platform can be used for when the community gets behind it!  J

 

Anyway, I'm about to purchase some pythons from a mate and due to the amount of electronic gear at my place, am a little concerned that if I'm not here and the temps get a little carried away, that maybe this will stress the snakes and cause issues I'd rather not cause them.  Out of interest, I've just bought 2 * Jungle Python yearlings (about 2 feet long) (general images at http://www.southernxreptiles.com/JUNGLEGALLERY.htm) and a 3' Bredli (general images at http://en.wikipedia.org/wiki/Morelia_bredli) from him.

 

What I'm looking at is using a WRT54GL with a serial port hack and OWFS to monitor some TAI8540D units (http://www.aagelectronica.com/aag/index.html) so I can measure both temp and relative humidity.  If possible with OWFS, I'd also like to be able to use the TAI8555 1-Wire Switch module to control a relay to a fan, light source, heat source, cooling source or something else.  An alternate device to a hacked WRT54GL would be the Asus WL-500G Premium (WL-500GPV2) that has an inbuilt USB port and using a USB 1-Wire adapter instead of a serial one.

 

So, what I'm basically asking is if you still have any assembled modules available or if you know of anyone who has assembled modules available for the WRT54GL.  I don't mind drilling a few holes in the case and plugging a connector into the onboard header, but I don't really have the gear for soldering together components or making a circuit board.  Or do you know if the DS9490R USB Adapters work with OWFS and a USB-equipped WRT54-like device?

 

The really good thing about this as a solution is the ability, I'm thinking, to be able to record this data for quite a while on the device itself, or better still, to be able to send the results via syslog (or other method) to another box via Wi-Fi, meaning that these units could be scattered wherever needed and not need Ethernet cabling to hook them all into the network!  Would be really nice if your snakes, fish, birds or whatever are not near your computers yet you'd like to monitor them.

 

Any and all information will be much appreciated.

 

Regards,

 

War doesn't determine who is right. War determines who is left.

This document and any attachments are for the intended recipient only.
It may contain confidential, privileged or copyright material which
must not be disclosed or distributed.

Quark Group Pty Ltd T/A Quark Automation, Quark AudioVisual, Quark IT

 


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Gregg Levine | 9 May 2008 05:34
Picon

Re: OWFS and WRT54GL

On Thu, May 8, 2008 at 9:19 PM, Paul Alfille <paul.alfille <at> gmail.com> wrote:
> I can't answer about assembled WRT54GL, but there are a number of devices
> with functioning USB ports:
>
> WRT54G(S), ASUS-WL500gd, ASUS-WL500W for wireless routers
>
> NSLU2 for USB and wired device.
>
> Paul Alfille
>
> I've sent your query to the developer's list for other input.
>
> On Thu, May 8, 2008 at 7:29 PM, Quark IT - Hilton Travis
> <Hilton <at> quarkit.com.au> wrote:
>>
>> Hi Paul,
>>
>>
>>
>> I've been running WRT54GL (and some earlier G and GS) units at client
>> sites for some time now with various OSes installed (default, OpenWRT,
>> DD-WRT) and have been pretty impressed with the longevity of these units and
>> the variety of software and hardware mods that have been cooked up for
>> them.  It just goes to show what a good dev platform can be used for when
>> the community gets behind it!  J
>>
>>
>>
>> Anyway, I'm about to purchase some pythons from a mate and due to the
>> amount of electronic gear at my place, am a little concerned that if I'm not
>> here and the temps get a little carried away, that maybe this will stress
>> the snakes and cause issues I'd rather not cause them.  Out of interest,
>> I've just bought 2 * Jungle Python yearlings (about 2 feet long) (general
>> images at http://www.southernxreptiles.com/JUNGLEGALLERY.htm) and a 3'
>> Bredli (general images at http://en.wikipedia.org/wiki/Morelia_bredli) from
>> him.
>>
>>
>>
>> What I'm looking at is using a WRT54GL with a serial port hack and OWFS to
>> monitor some TAI8540D units (http://www.aagelectronica.com/aag/index.html)
>> so I can measure both temp and relative humidity.  If possible with OWFS,
>> I'd also like to be able to use the TAI8555 1-Wire Switch module to control
>> a relay to a fan, light source, heat source, cooling source or something
>> else.  An alternate device to a hacked WRT54GL would be the Asus WL-500G
>> Premium (WL-500GPV2) that has an inbuilt USB port and using a USB 1-Wire
>> adapter instead of a serial one.
>>
>>
>>
>> So, what I'm basically asking is if you still have any assembled modules
>> available or if you know of anyone who has assembled modules available for
>> the WRT54GL.  I don't mind drilling a few holes in the case and plugging a
>> connector into the onboard header, but I don't really have the gear for
>> soldering together components or making a circuit board.  Or do you know if
>> the DS9490R USB Adapters work with OWFS and a USB-equipped WRT54-like
>> device?
>>
>>
>>
>> The really good thing about this as a solution is the ability, I'm
>> thinking, to be able to record this data for quite a while on the device
>> itself, or better still, to be able to send the results via syslog (or other
>> method) to another box via Wi-Fi, meaning that these units could be
>> scattered wherever needed and not need Ethernet cabling to hook them all
>> into the network!  Would be really nice if your snakes, fish, birds or
>> whatever are not near your computers yet you'd like to monitor them.
>>
>>
>>
>> Any and all information will be much appreciated.
>>
>>
>>
>> Regards,
>>
>>
>> War doesn't determine who is right. War determines who is left.
>>
>>
>> Quark Group Pty Ltd T/A Quark Automation, Quark AudioVisual, Quark IT
>>

Hello!
Paul is indeed correct. the only gadgets that LinkSys makes who use
the USB2 port are the NSLU2 device. For routers it is the ASUS device
that would be your best bet.

--

-- 
Gregg C Levine gregg.drwho8 <at> gmail.com
"This signature was once found posting rude
 messages in English in the Moscow subway."

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Christian Magnusson | 10 May 2008 22:00

lrint() changes

 

We have to make some more changes in configure.ac after lrint() is used in ow_1821.c. This function is located in libm.so, and this is the first dependency to this library.

I think it’s a waste of memory to add a new dynamic library if we only use one single function in it from owlib…. Especially on the embedded systems.

 

Anyway… the dependency could be added with this row in configure.ac.

AC_SEARCH_LIBS(lrint, m, AC_DEFINE(HAVE_LRINT, 1, [Define if you have lrint]))

 

I have added some changes in the CVS to make this check.

 

/Christian

 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Christian Magnusson | 10 May 2008 22:11

lrint() for embedded...

I just tried to compile the changes I made for openwrt with uClibc, and I noticed that lrint doesn’t exist in libm.so. The patch I made works and revert the behavior to the old rounding code..

When configure is run, it can’t find lrint() and HAVE_LRINT is undefined.

 

checking for vsnprintf... yes

checking for library containing dlopen... -ldl

checking for library containing lrint... no

checking for library containing nanosleep... none required

 

/Christian

 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Gmane