navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum February 08, 2012, 09:55:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5! | Lights go on in Sierra Leone
   Home   Help Search Login Register  
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 16   Go Down
  Print  
Author Topic: A Wide Variety of free 1-wire slaves arriving soon. What do you need?  (Read 27431 times)
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2090


St Barnabas Chapel (2009)


« Reply #120 on: July 20, 2010, 03:16:14 PM »

Eric many thanks as usual
the commands  don't seem to be documented, might be interesting to see what happens if you remove them. 
Things are however are moving on apace.
As mentioned previously I have now a calibrated Kipp and Zonen Splite 2 sensor and have designed a circuit and PCB (see attached figure) and reprogrammed the PIC to produce 1 degree per 10 W/m^2. In addition there is a second channel for a PIN diode input. I have contacted Incatron (many thanks for the link) and they are sending me a couple of weatherproof housings FOC with the promise that if they are suitable then many more could be provided. The vision here is to set up a test array of cheap irradiance sensors in conjunction with the Kipp and Zonen.  Still hoping for a sub £5.00 sensor.
I have been keen to measure flow rate for some time, most importantly to measure the flow rate into my hot water cylinder but have been put off a little by expense or complexity of attaching a reflectance type sensor. Looking at RS again however they now do a rather nice device  for about £25.00 which produces TTL pulses proportional to flow rate from 1.5-30L/min http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0257133
This could go into a DS2423 clone with the other counter monitoring my hot water electricity consumption (circulation pump + ASHP).

Sean


* PCB1.gif (53.32 KB, 1280x994 - viewed 391 times.)
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ericw
Hero Member
*****
Offline Offline

Posts: 707


« Reply #121 on: July 20, 2010, 07:52:14 PM »

It depends on the master software whether you can remove those bytes. According to the spec the master can terminate a transmission early by issuing a reset pulse, but I think LogTemp reads all scratchpad bytes and then checks the CRC.

I notice that Hobbyboards in their solar sensor kit use a photodiode in the 'leakage' mode, it would be interesting to compare it with measuring the near short circuit current of the Si cell pack from the £1 Chinese keyring torch. As this current is only dependant on physics and some pretty large dimensions it ought to be very reproducible and is particularly easy to measure with the PIC ADC.

I have used one of those RS flow sensors to convert the regeneration cycle of a water softener from time based to volume based. It works well but the led in it takes 30mA and the max temp rating is 70 degrees. KenB posted about an interesting one that he found on his travels.

As only one 16bit counter is available in the DS2423 flavour clone you need to be a bit carefull about the maximum input speed and the pulse width on one channel.
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2090


St Barnabas Chapel (2009)


« Reply #122 on: July 21, 2010, 01:46:48 PM »

Quote
It depends on the master software whether you can remove those bytes. According to the spec the master can terminate a transmission early by issuing a reset pulse, but I think LogTemp reads all scratchpad bytes and then checks the CRC.

Well    “if it’s not broke don’t fix it” and my PICS have been running happily or months on 1-wire.

Quote
I notice that Hobbyboards in their solar sensor kit use a photodiode in the 'leakage' mode, it would be interesting to compare it with measuring the near short circuit current of the Si cell pack from the £1 Chinese keyring torch. As this current is only dependant on physics and some pretty large dimensions it ought to be very reproducible and is particularly easy to measure with the PIC ADC.

Indeed this is one of the measurements I hope to make. The amorphous silicon cells are “for indoor use only” – I’m not sure what that means. It will be interesting to see how the cell ages with time. How long for example will it take for the  efficiency to drop by 10%.  Also should I short circuit or reverse bias the cell?
I will think also about getting a hobbyboards sensor. There is a moisture resistance coating for 4$ (anyone know if this is worth it?) and a    solar radiation case for 8$. I think Wookey has one?
Quote
I have used one of those RS flow sensors to convert the regeneration cycle of a water softener from time based to volume based. It works well but the led in it takes 30mA and the max temp rating is 70 degrees. KenB posted about an interesting one that he found on his travels.
I have located Ken’s link and the product seems similar to the RS one in functionality (uses a Hall effect sensor rather than an optical one) but is a lot cheaper. My cold feed is 15mm copper so the RS one would be easier to plumb in.
Quote
As only one 16bit counter is available in the DS2423 flavour clone you need to be a bit carefull about the maximum input speed and the pulse width on one channel.
Yes indeed. I was planning to connect the flow sensor to the 16 bit hardware counter and the pulsed electric sensor to the software counter.
Sean
« Last Edit: July 21, 2010, 01:48:55 PM by StBarnabas » Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ChaduRoc
Newbie
*
Offline Offline

Posts: 12



« Reply #123 on: July 22, 2010, 11:45:52 AM »

ReHi Sean,

a lot of tape around a little parcel in my postbox :-) 12F638 in Hessen now!
Will test it when I'm back from a trip to France - no, not the Périgord - in about three weeks - awaiting.
Lot of thanks so far!

Bye
Karl M.



Logged

The Truth Will Set You Free.
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2090


St Barnabas Chapel (2009)


« Reply #124 on: July 24, 2010, 07:49:07 AM »

Karl
please let you know how we get on.
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ChaduRoc
Newbie
*
Offline Offline

Posts: 12



« Reply #125 on: August 10, 2010, 04:08:32 PM »

ReHi Sean,

back from the road.

Tried the PIC as connected:
1 - 5V
2 - 1M - GND / CNT - 5V
3 - 1M - GND / CNT - 5V
4 - tried both - 5V / - GND
5 - DQ
6 - NIL
7 - NIL
8 - GND

Using Paul Alfilles OWFS I can see the following:



The PICs ID is identified as shown, Type DS2423.
Unfortunately the counters show nothing and counting is not possible.
Pages are not writable.

Did I do anything wrong?
Any help welcome!

Greets
Karl M.
Logged

The Truth Will Set You Free.
ericw
Hero Member
*****
Offline Offline

Posts: 707


« Reply #126 on: August 10, 2010, 07:37:12 PM »

Karl,

As you are getting the correct ROMID presumably with no CRC error, the 1 wire interface seems to be working.
Are you trying to drive the counter inputs through 1 Meg? if so then it needs to be much lower - try using a few Kohms.

The RAM memory isn't really there, but both the pages begining at 01c0 & 01E0 should appear to contain dummy data ( 00 -> 1F)
Can you see this?

Eric


Logged
ChaduRoc
Newbie
*
Offline Offline

Posts: 12



« Reply #127 on: August 10, 2010, 10:07:26 PM »

ReHi Eric,

thanks for your fast reply!

Quote
As you are getting the correct ROMID presumably with no CRC error, the 1 wire interface seems to be working.

Yes of course, it's working fine -  can read all of the "owfs-files" shown above, but the counters are empty (filled with 12 squares).

Quote
Are you trying to drive the counter inputs through 1 Meg?

Tied down the counter inputs with 1M to GND and gave count impulses with 5V+.
Also tried negative impulses. But no counting happens until yet.

Quote
The RAM memory isn't really there
Yepp, sorry for head-delay.

Quote
Can you see this?
Yepp, after removing blinkers. ;-)

What's about:
pin4, high or low?
pin6, may it be left open?
pin7, led needed?

In order to use more than one DS2423-PIC, how may I change the ROMID?
PICkit2 in stock.

Karl
Logged

The Truth Will Set You Free.
wookey
Hero Member
*****
Offline Offline

Posts: 2558


WWW
« Reply #128 on: August 11, 2010, 12:06:42 AM »

I seem to have discovered some unreliability in the PIC-based 1-wire devices (or maybe my wiring). ....sometime around may my system started to get unreliable.

On a hunch I unplugged the breadboard and there hasn't been an error since,..

I've since had a few more errors - indeed I've had to unplug part of the 1-wire net for the tank+PHE branch to get any readings at all. So something is amiss independent of Eric's chips. I've been doing way too much travelling, work and building design so haven't had time to look into this properly yet. Still. I reckon my issues can be considered a flase alarm from the POV of this project, which is good news. I'll post more when I have it.
Logged

Wookey
ericw
Hero Member
*****
Offline Offline

Posts: 707


« Reply #129 on: August 11, 2010, 11:43:07 AM »

Karl,

The state of pins 4 & 6  is incorporated in the ROMID when the device is powered up so you can have 4 different ID's without reprogramming the device.  The LED is optional and this pin could be used to double the number of ID's available in another varient.

For the counter inputs I suggest you just switch them between 0V & 5v with no resistor for test purposes.

The chip does not have the full functionality of a real DS2423 so if you try to read anything from what would be memory pages 0-13 then the chip does nothing. You should however be able to read from page14 & page15 (actually you read both 14 & 15 or 15 alone) The data that should be read is an incrementing number from 00 to 1F.

When I wrote the program I analysed what the Windows programs (LogTemp and One wire viewer) did and wrote the program around that. I don't have access to owfs and putting it on a Windows machine via Cygwin doesn't seem to be a task for the faint hearted.
So it may well be that owfs does something different to access the data (e.g. always read all 16 pages of memory as a block).

I would check if you can read any data from just page 15 or a counter, the counter should read zero so if you are displaying odd characters it looks as though the program is not compatable with owfs.


Logged
ericw
Hero Member
*****
Offline Offline

Posts: 707


« Reply #130 on: August 11, 2010, 03:57:25 PM »

Karl,

I have now stumbled across owfs-dsl so I'll install it and see if can see what is happening.

Eric

Logged
ChaduRoc
Newbie
*
Offline Offline

Posts: 12



« Reply #131 on: August 11, 2010, 05:00:38 PM »

ReHi Eric,

Quote
The state of pins 4 & 6  is incorporated in the ROMID

OK - got it, easy doing!

Quote
For the counter inputs I suggest you just switch them between 0V & 5v with no resistor for test purposes.

Sorry, nothing.

Quote
You should however be able to read from page14 & page15

Indeed, I'm, the counters too.
Counter.0 ... counter.15 all show "squares" eql. nil, 12 bit.
Page.0 ... page.13 read as above, 32 bit,
page.14 and .15 show hex _decr._ numbers from 20 to 01.

Quote
Windows machine via Cygwin

I've got VirtualBox with Ubuntu on my machine. That's pretty easy and useful.

Quote
I have now stumbled across owfs-dsl so I'll install it and see if can see what is happening.

Sounds very gooood, thanks for your kindness.


@wookey

Quote
I've since had a few more errors

Got no problems until now, after connecting the PIC two days ago. 1-wire-bus is stable so far.
Nevertheless got lot of lot of emc imponderabilities when using the frequency inverter for the vent of my HVAC.
Not really solved Sad - the 1-wire-bus seems to be very vulnerable in this regard.

Greets
Karl M.

   
Logged

The Truth Will Set You Free.
ericw
Hero Member
*****
Offline Offline

Posts: 707


« Reply #132 on: August 11, 2010, 08:05:38 PM »

Karl,
Something strange must be going on if you can see the dummy data in pages 14 & 15 but not the counters. If the data was wrong I would have expected to get a CRC error.
Could you give pages/count.15 a try and see if you get a valid answer.

Thanks
Eric
Logged
wyleu
Guest
« Reply #133 on: August 12, 2010, 09:17:06 AM »

Karl,

I have now stumbled across owfs-dsl so I'll install it and see if can see what is happening.

Eric



It's great ! stick in a CD and you can read one wire with a dongle on any PC with no config!

The only problem it's a fairly old version of owfs and that is unlikely to change.
Logged
ChaduRoc
Newbie
*
Offline Offline

Posts: 12



« Reply #134 on: August 12, 2010, 11:55:45 AM »

ReHi Eric,

Quote
Could you give pages/count.15 a try and see if you get a valid answer.

Not sure what you desire. ?

As told, in

count.x(x) there are 12 bit blanks, readonly

page.1 to page.13 there are 32 blanks, readwrite; alas I can not write to it.

page.14 and page.15 my hex editor shows:
"201F1E1D1C1B1A191817161514131211100F0E0D0C0B0D0A090807060504030201"
also not writable.

Readwriteya
Karl M.
Logged

The Truth Will Set You Free.
Pages: 1 ... 5 6 7 8 [9] 10 11 12 13 ... 16   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!