Jump to content
zeke

One Wire Controller booster

Recommended Posts

I am excited about this one. I finally made some time to work on my one wire controller board tonight.  I placed all the component on it tonight and it looks good to me. 

 

This design has a single DS2482 One Wire Master controller servicing eight one wire ports that will be selectively enabled with analog switches.

 

The MSP430 will talk to the DS2482 via I2C and it will take care of all the communication timing.

 

Theoretically, you could hook up an obscene number of DS18B20 temperature sensors to this. In the lab, I have testing this circuit with about 600 DS18B20 sensors on it. 

 

Practically, you would be limited by the capacitance of the cable as the lengths increased. There was no cable in the lab test.

 

This board will work with any one wire devices so you are not limited to just temperature sensors.

 

 

The intention is to create a mating board that contains an MSP430, power supply, mass storage device and communications. That board will be one of my re-launchpad board designs. Probably the 5529 based design so I can get the USB port.

 

What do you guys think?

 

Edit: Added schematic PDF.

post-112-0-24398300-1410495399_thumb.png

RE-OWC-1-10062.PDF

Share this post


Link to post
Share on other sites

Thanks @@bluehash.  That is a 3D view from Altium. You just press the "3" key and the view changes immediately. I've attached the 2D view.

 

@@yosh, the components near the connectors are the analog switches and ESD protection devices. They are there because of the long lengths of twisted pair cable that could be connected to this device. It acts like an antenna for ESD. The analog switch grounds the One Wire bus through a 330 ohm resistor to bleed off all ESD then it connects it back up to the One Wire Master for regular operation.

 

This design allows the user to select a specific port so that the single One Wire Master can interrogate all devices on that port. I envision using it in a round robin fashion.

 

I made this choice because I know that I could have anywhere between 1 and 300 sensors on a single port so, when you consider that there are eight ports, there could be a theoretical maximum of 2400 One Wire sensors connected to this device.  The true maximum number of One Wire sensors will be limited by the total capacitance on a single port contributed by the cable and the sensors. I have gotten working around 150 sensors spread evenly on 1000 feet of standard CAT5 twisted pair cable.

 

I now want to (and need to) add into the design some Flash memory so I can log all the sensor samples. I like the idea of putting a MicroSD card in the design. I see that I can get an 8GB for $7 locally. Crazy!

 

Uh Oh. I just noticed a Vcc mismatch. I am running the One Wire Master at 5V so I will have to add in bi-directional voltage translation on the I2C pins to make this work. MOSFETs seem like a super easy way to fix this problem.

 

Now I am wondering what voltage the MicroSD card operates at. Hmmmm...

post-112-0-50513900-1410637323_thumb.png

Philips Bi-directional level shifter for I2C-bus and other systems - an97055.pdf

Share this post


Link to post
Share on other sites

I was researching flash memory devices on Digikey.ca when I spotted the Spansion S25FL512S.

 

It's a 512 Mbit (64 Mbyte) Flash Non-Volatile Memory and it costs only $7.92 CAD in single lot quantities.

 

That's about the same price as a 16Mbyte MicroSD card locally.

 

I am seriously thinking of designing in one of these devices.

 

What do you think?

Share this post


Link to post
Share on other sites

I was researching flash memory devices on Digikey.ca when I spotted the Spansion S25FL512S.

 

It's a 512 Mbit (64 Mbyte) Flash Non-Volatile Memory and it costs only $7.92 CAD in single lot quantities.

 

That's about the same price as a 16Mbyte MicroSD card locally.

 

I am seriously thinking of designing in one of these devices.

 

What do you think?

@@zeke I recently did a project with an integrated SPI flash to store log files. Had a FatFS layer to manage files. 

Be warned that if you are using the SPI flash heavily, you may need some kind of wear levelling. With FatFs Elm Chan, writing to the flash every 5 seconds reached max write cycles( 100,000 ) in < 72 hours. Managed to get it down by buffering.

 

SDCards come with inbuilt wear leveling.. that is a plus point.

Share this post


Link to post
Share on other sites

SD card would be good for exporting data if your device had some down time. But if it needs to be running continuously then non-removable would be best add some kind of MSD or get it to spit out CSV I've the USB.

 

If youre worried about wear, you could look at FRAM for the storage. A downside is that is very limited by size though.

Share this post


Link to post
Share on other sites

@@greeeg, I thought of that yesterday. I know I could turn a msp430frxxxx into a virtual i2c memory device.

 

I could also make it the main point of contact or the master controller of the board so it could operate without a launchpad.

 

I think the latest fraunchpad has 64kB of FRAM. I bet they will be increasing that but I don't know when.

 

More research needs to be done.

Share this post


Link to post
Share on other sites

@@bluehash, thanks for tips on wear leveling. That's something I forgot about.

 

If @@greeeg's idea of the FRAM works out then that would be perfect.

 

The sd card needs petit fs to work. It's inconvenient to have to make the file on the PC ahead of time but it works at least.

 

I am happy that there are several options available. Making the choice is the toughest part.

Share this post


Link to post
Share on other sites

@@zeke,

 

I was actually thinking about a dedicated FRAM SPI/i2c 8pin IC. I think Fujistu/ramtron/cypress make them. However a quick digikey search showed max of 1Mbit.

 

SD cards run at ~3-3.6v.

 

You could hard wire a microSD and then buffer into blocks and do RAW writes, write through the entire memory in a circular buffer fashion. this would be a very primitive wear leveling. your controller would need to do RAW read and then pass the results out via USB/UART.

 

Benefit of this is a huge storage space. microSD cards come at a minimum of 256/512mb. Downside is that only your controller can read the card.

Share this post


Link to post
Share on other sites

Well, I just went over to ti.com/fram and found a listing for a fram device with 128KB of FRAM. FRAM! That's FRAM'ing nice!

 

Here is a page that shows a 128KB FRAM in a 64 LQFP.

 

If I could get my hands on a sample of that device, I just might go to a self-powered, non-booster board design.

 

If I retained the ability to stack this onto an LP then I could break open an I2C port and create a pipeline to the LP so it could grab data.

 

Hmm... I wonder if TI would spot me one or two of those MSP430FR5889 devices?

Share this post


Link to post
Share on other sites

Well, I just went over to ti.com/fram and found a listing for a fram device with 128KB of FRAM. FRAM! That's FRAM'ing nice!

 

Here is a page that shows a 128KB FRAM in a 64 LQFP.

 

If I could get my hands on a sample of that device, I just might go to a self-powered, non-booster board design.

 

If I retained the ability to stack this onto an LP then I could break open an I2C port and create a pipeline to the LP so it could grab data.

 

Hmm... I wonder if TI would spot me one or two of those MSP430FR5889 devices?

@@zeke

Would you settle for an FR5989?

http://www.ti.com/product/msp430fr5989/samplebuy

Share this post


Link to post
Share on other sites

Hi Guys,

 

Today, I put some serious effort into my One Wire Master board. Here's a screen grab of the results.

 

post-112-0-82892700-1416726188_thumb.png post-112-0-37013500-1416726191_thumb.png post-112-0-57626500-1416726193_thumb.png

 

I've designed the board so that it can operate by itself (it has an FR5969 on it) or it can operate as a booster board. 

 

When operating as a booster board, it will appear as an I2C Slave to whatever LaunchPad you plug into it.

When operating as a LaunchPad, it will just do its thing (whatever I program it to do).

 

I have also started working on a development support board that will give this board a USB UART, 3V and 5V power, a Reset button and a LiPo battery backup (kind of like a UPS).

 

That layout isn't done yet but this is what it looks like at the moment.

post-112-0-61501800-1416726724_thumb.png

 

It will stack underneath the OWM Booster board.

 

I intend on plugging this device into a server running node.js, collecting the sensor data on a schedule, storing it into a database then displaying that data to a User in a pleasant manner.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×