About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

Need major help with getting 1 wire Pi Plus

233 Views - Created 28 days ago

28 days ago

Posted by:
bcraytor

Users Avatar

I am trying to get a i2c 1 wire Pi Plus to work with OWW.  I have one of the original Dallas Semiconductor weather stations but I abandoned it years ago when I didnt have a computer that I could leave connected to it.

However with my recent discovery of Raspberry Pi I am trying to get it working with one of the AB electronics Raspberry Pi 1 wire adapter.  I do see the address 0x18 on the i2cdetect -y 1, but I can't seem to get past that.  I had the nocontroller issue with OWFS, but I really want to just get it working with the OWW software, at least for starters.  I have installed the OWW software and required libraries.  However, I don't see any devices.  I use the serial port:  /dev/i2c

Can anybody help me?

I am certainly a beginner at all this.  I have tried the OWFS.conf editing and I feel that it is correct, but I still can not see any of the devices.  UGH!

Bret

27 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hello Bret

I have looked into how the Dallas Semiconductor weather stations work and I don't think they are compatible with the 1 Wire Pi Plus as they use an RS232 serial port.

On this website I found some information about the 1 Wire Weather Station.  Near the bottom of the page it lists the devices used in the weather station and it contains a DS2480 1-Wire to UART Serial Port Adapter which would be used to convert the 1 Wire bus to a serial bus.

In the help page for OWW under the devices section it says that you have to specify the serial port, for example /dev/ttyS0, so OWW is looking for an RS232 serial port as well.

There are a couple of options you can use to talk to your weather station. 

You could use a UART to RS232 adapter like our Serial Pi Plus to talk to the weather station over the RS232 interface.  This should allow you to use OWW.

The second option is to open up your weather station and locate the internal 1 Wire bus and connect this to your 1 Wire Pi Plus.  The downside of this option is you wouldn't be able to use OWW so you would have to talk to the devices in the weather station directly using OWFS.  You may have to remove the DS2480 from the weather station to make it work otherwise there would be two 1 Wire hosts on the same bus.

If you are a beginner to electronics then the first option will be easiest as it involves less soldering and you can use OWW to talk to the weather station.

AB Electronics UK Tech Support

27 days ago

Posted by:
bcraytor

Users Avatar

Thank you for your prompt reply.

so using /dev/i2c-1 will not work with OWW?  i was thinking it would instead of one of the USB devices or serial ports.  I was thinking it would work as a hub device for the OWW.

I am mainly a NEWBIE in the software part, but my soldering skills and assembly of electronics is pretty good as long as I don't have to make PCB's. LOL.

 

27 days ago

Posted by:
bcraytor

Users Avatar

Plus, I should be able to at least see the 1-wire devices with OWFS, right?  Somehow, I can see the i2c to 1-wire adapter with the i2cdetect -y 1, but I can't get the raspberry pi to see the 1-wire devices.  I have followed your tutorial on the OWFS.conf file, etc, but still a no response. .

debug 1wiretest.py reveals:

Python 3.5.3 (/usr/bin/python3)
>>> %Debug 1wiretest.py
Traceback (most recent call last):
  File "/home/pi/1wiretest.py", line 1, in <module>
    import ow
  File "/usr/lib/python3/dist-packages/thonny/backend.py", line 317, in _custom_import
    module = self._original_import(*args, **kw)
ImportError: No module named 'ow'

what am I doing wrong here???

27 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

OWW is looking for an RS232 serial port so using /dev/i2c-1 will not work as that is an i2c port which works differently to RS232.  A USB to serial adapter should work for connecting OWW to your weather station.

The 1 Wire weather station uses a 1 Wire bus internally to connect to the sensors but the external connection that you need to connect to your Raspberry Pi is RS232 so OWFS and the 1 Wire Pi Plus will not work as OWFS is trying to use a different set of communication protocols and voltages.

To use OWFS with the 1 Wire Pi Plus you will need to locate the internal 1 Wire bus inside the weather station and remove the DS2480 serial converter from the circuit.

The python error "ImportError: No module named 'ow' " means that python can not find the 1 wire module.  Try going through all of the steps in our 1 Wire tutorial to make sure all of the software libraries are installed and owfs is configured correctly.

AB Electronics UK Tech Support

27 days ago

Posted by:
bcraytor

Users Avatar

I have disconnected the DS2480 from the weather station and just have the 1-wire sensors, which should be able to hook to the R Pi Plus 1-wire  to i2c adapter, correct? and I have followed the tutorial dotting all i's and crossing all t's.  I then try running on python2 as apparently onewiretest.py does not run on python3 because of the import ow.  I still can't get it to work.  Where do I get the ow library?  I have even tried loading Quick2wire just to try to read a temp sensor.  No bueno.  I am abandoning using OWW software for now and am just trying to see the sensors on the OWFS software.  I appreciate all your input and help.

Thanks in advance,

Bret

27 days ago

Posted by:
bcraytor

Users Avatar

WooHOO!!! 

I have had some small success!  I abandoned the 1wiretest.py, and went straight to OWFS to see what I could see.  It indeed is seeing the sensors!  

pi@bretraspberrypi:/mnt/1wire $ ls -la
total 4
drwxr-xr-x 1 root root 4096 Jul 23 17:58 .
drwxr-xr-x 3 root root 4096 Jul 15 16:19 ..
drwxrwxrwx 1 root root 4096 Jul 23 18:03 10.39F435030800
drwxrwxrwx 1 root root 4096 Jul 23 18:03 10.A3653C000000
drwxrwxrwx 1 root root 4096 Jul 23 18:03 12.5EAB0D000000
drwxrwxrwx 1 root root 4096 Jul 23 18:03 12.92400E000000
drwxrwxrwx 1 root root 4096 Jul 23 18:03 1D.81B500000000
drwxrwxrwx 1 root root 4096 Jul 23 18:03 1D.D01101000000
drwxr-xr-x 1 root root 4096 Jul 23 17:58 alarm
drwxr-xr-x 1 root root 4096 Jul 23 17:58 bus.0
drwxr-xr-x 1 root root 4096 Jul 23 17:58 settings
drwxrwxrwx 1 root root 4096 Jul 23 18:03 simultaneous
drwxr-xr-x 1 root root 4096 Jul 23 17:58 statistics
drwxr-xr-x 1 root root 4096 Jul 23 17:58 structure
drwxr-xr-x 1 root root 4096 Jul 23 17:58 system
drwxr-xr-x 1 root root 4096 Jul 23 17:58 uncached
pi@bretraspberrypi:/mnt/1wire $ ^C
pi@bretraspberrypi:/mnt/1wire $ 
 

So, now to find some weather program that uses OWFS!

 

Thanks for all your help Andrew!

 

15 days ago

Posted by:
bcraytor

Users Avatar

Update:

I tried to get it running with the popular open source program WeeWX, but never could figure out how to configure right.  So I backtracked, bought one of the AB electronics Rpi serial port adapter and purchased one of the plug in serial to one wire adapters.

I followed the Knowledge base instructions, but cannot get OWW to see the devices.  Not sure what is wrong.  using /dev/ttyAMA0, so what next? Shouldn't it see it with the serial to bus adapter???

 

Bret 

15 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hi Bret

The first thing I would suggest is to check that the UART port is configured correctly.  The easiest way to do this is to link together pins 8 (TXD) and 10 (RXT) on the Raspberry Pi GPIO header.  Do this without the Serial Pi connected.  This will make anything sent out of the TXD pin go back into the RXD pin.

Next launch minicom using the command "minicom -b 9600 -o -D /dev/ttyAMA0" if minicom is not installed you can install it using "sudo apt-get install minicom"

If the UART port is working correctly anything you type into the minicom terminal should appear on the screen as it is echoed back into the receive pin.  If nothing appears on the screen then there is a problem with the UART configuration and I would suggest going through all of the steps in our knowlege base article again.

Once you know that the UART port is working try connecting the Serial Pi board and join the RX and TX pins together next to the 9 pin connector.  Repeat the steps above with minicom to check that the Serial Pi is sending and receiving data correctly.

If both the UART and Serial Pi are working then that means it is probabaly a configuration issue with OWW or the serial to one wire adapter.  It may be worth posting a message on the OWW support forum as the developers of OWW will have a better understanding of how to configure the program to work with a serial to one wire adapter.

AB Electronics UK Tech Support

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.