proposal: full 1-wire (Dallas) support a la i2c

kranenborg

Senior Member
For future devices I propose the implementation of full 1-wire (Dallas) support, implemented in a way similar to the i2c commands currently supported on the X parts. This would allow the creation of valuable, cheap systems with a very small form factor. Furthermore, the fact that many devices can be connected to a single wire is very useful for sensor/data logging type of applications. I think this would make the PICAXEs stand out wrt competition. Currently available devices that come in a transistor or transistor-like casing that can be easily managed by hobbyists/students are:
* temperature sensor (DS18B20 already supported by the specific readtemp commands, but i-Button type sensors could be supported as well)
* 4Kbit eeprom
* Addressable switches
* digital pot
* timer/clock
For (semi-)professional applications smaller package sizes are not a problem, and then even more devices like a/d converters are at reach.
Imagine for example an 08M successor combined with a 4Kbit eeprom (in a standard transistor casing) , that would make a very neat and small but very powerful datalogging system. i2c remains for the larger/faster systems.

 
 

Technical

Technical Support
Staff member
Note that Dallas already produce an i2c to 1 wire chip, so if you want full i-1ire control you can presently do it via this chip. Will look up the number later...
 

petersz

New Member
Re I2C chip OWD bridge?
I presume the previous reply refers to the Dallas DS2482-800. Its useful to some extent but still requires for a multitude of dedicated device wires. I recently tried to log simultaneously 24 DS18B20 temperature sensors in a house heat loss study. Single wire loop support for multiple sensors would have been very handy in reducing the wiring. If the I2C proposal addresses this issue I would strongly support it.


 
 

kranenborg

Senior Member
Ideally, it should support the type of application mentioned in the previous posting, using parasitic power, so that only one twisted pair cable is required.

 
 

kranenborg

Senior Member
A note to petersz posting: a DS2482-100 (8-pin SOIC) allows a multitude of 1-wire devices on a single line (the diagram in the data-sheet shows this), so this device would probably have been an ideal solution for his application (nice and relevant type of multi-sensor application!) . The device even has control for active pullup for parasitic power functionality in case of very long wires or a very large number of devices, so a single two-wire cable connecting all sensors/switches/eeproms/pots etc. remains feasible even under difficult conditions.

Still I would like the functionality of the DS2482-100 to be incorporated into all future picaxes, as this would provide the picaxes (and the 8-pin devices in particular) with extremely large performance/price and performance/packagesize ratios
 

Jeremy Leach

Senior Member
I'm new to Picaxes but not to electronics. I've been reading up a bit about 1-wire - would have thought that a 1-wire interface is possible via purely code ? Perhaps not in Basic but in assembler? I'd be interested in people's views on whether this would be possible. Perhaps issues with timing / interrupts ? I'm aiming on building a weather station around the datalogger board. Barometer and temp sensor as part of unit indoors then 1-wire interface to outdoor sensors. Readings on LCD. Only need to connect to PC to download results (the Picaxe seems a great way to datalog - I've looked at many other weather station solutions but many require PC operational all the time)
 

kranenborg

Senior Member
Currently Maxim/Dallas offers two options that may be used with the picaxe:
1) DS2480B: RS232(5V)to 1-wire interface
2) DS2482-100: I2C to 1-wire bus master
Option 1) should be currently possible as the PICAXEs may run their serial comms at 9600 Baud, and the DS2480B uses the data signal to calibrate its internal clock.
Option 2) is a very elegant one and has my preference as it does not consume additional I/O lines. However this is a very new chip that currently has die problems and therefore you do not get samples. However problems should be over soon, and I am very eager to experiment with it. Maxim offers also extensive documentation on the design of the accompanying software to implement 1-wire operations, and I think they can be implemented directly by the PICAXE X-parts

Regards,
Jurjen

 
 

alexb

Member
Having succesfully used the readowsn (pin) instruction to read a single 1-wire device,I am about to opt for the DS2480 as a 1-wire interface between the PICAXE and several 1-wire devices. Typically, after serial number identification, 1-wire devices require a command byte to be sent. I would think that a new BASIC instruction similar to the readowsn could be implemented considering most of the low-level coding for driving the selected pin would have already been coded into the PIC. A new BASIC instruction eg sendowcmd pin, (byte) would send the nominated command byte to the 1-wire bus and with appropriate timing control receive the response. This would certainly give the PICAXE more scope.
Thanks
 

Auda

New Member
I was silly enough to think that it was already included in the code when I bought my data logger kit. As others have said it would be a great improvement to be able to read/write to multiple devices on the one pin.
A couple of other things that I would like to see is getting upload and download the right way around when a programme is send to the data logger it is being uploaded and when I ask for the data back it is downloaded to my computer. I am the one initiating the transfer so the terms are relative to my computer not the picaxe. There is realy no excuse for this sort of mistake its just sloppy.
The other one is the use of the term pin that doesnt relate to the little legs on the chip very confusing.
Rant mode off.
Auda
 
Top