News » Modbus and back...

Modbus and back 8/12/08

Well, it's been a while since I updated anything on this site...

Having had a change of job a wee while back (The full time sort), and having some round the house domestic type projects I've not done a lot of fiddling in the shed, as it were.

But I have had an epiphany of sorts.

I started out the Myio project intending to make a 'sorta modbus' interface / protocol. I quickly realised I could just do the whole of modbus in a pic16F870, so off I set on a journey to make a modbus RTU.

Well, in the middle there, around about the last update I typed, I made the Parallax Basic Stamp 1 RTU.

Turns out it's been running non-stop since then, give or take some power cuts, and I've had a whole lot of fun with that and the 'sorta ladder logic' tool that I wrote for it.

So, having gained a bit of free time over the last couple of weeks I decided to get back to my modbus unit, which has led to some soul searching, and a change of direction to something halfway between the BS1 RTU and a full blown modbus RTU.

My reasoning can be shown thusly:

DIY Modbus RTU

Pros                  Cons
----------------------------------------
Standards based Complex coding exercise
RS485 interface Sledgehammer for my needs
Not 'all my own work' = not all that satisfying
Large(ish) micro required.

BS1 RTU

Pros                  Cons
----------------------------------------
Simple Blocking serial routine
All my own work! Slow
BS1's are cool, but not cheap
RS232 interface (short cable runs)

So, what I really want is to re-invent the wheel with an RS485 connected, simple RTU that is 100% of my own creation. Unfortunately that means the standards based bit goes out the door, but heck, this is a hobby, who needs standards anyway? I'm using RS485, it's a standard, that's enough.

On that basis, I'm back at the drawing board with the whole RTU project. I've learned a great deal from my modbus coding experiment, and working with the BS1 as an RTU, so the effort wasn't wasted by any means.

My new goal is a set of small modular RTUs that provide a small number of IO channels per device, using an RS485 interface and a somewhat simplified protocol. I'm thinking I'll use one of the 18 pin PICs, probably the 16F88.

I've got some ideas for some automation projects to use the as-yet un-designed, un-built RTUs, and I'm relatively clear in my mind as to how I'll go about building them.

Watch this space .. :-)

Powered by Etomite CMS.