Need help with my invention (to be built some day)

Discussion in 'Embedded Systems and Microcontrollers' started by John P, Oct 10, 2011.

  1. John P

    Thread Starter Senior Member

    Oct 14, 2008
    I have an idea for a microcontroller system that I could use some ideas on. What I've got in mind is a network of processors, small ones like (say) the PIC16F690, joined via RS-485 (2-wire party bus). The basic purpose is a distributed data collection and delivery system. There would be a "master" which could query the other processors or give them orders, which would set up how the pins would be used--some pins as analog or digital inputs, some as outputs, some doing PWM or getting input from keypads or driving LCD units etc. The master would interface to a computer via USB, which would be how the inputs and outputs would be programmed, and it might be powered off the port if the network wasn't too big. But it would be a nice feature if the user could unplug the computer (assuming an alternative power supply was connected) and let the network keep working as it was programmed to do, assuming that there was a need for a system that passed data among the processors rather than always to or from the computer.

    All this is exactly what microcontrollers are made for, but is there any way that a user could set up any sort of complex operation without writing code? I can imagine simple stuff like "Set up pin 8 of unit 3 as an input, and pin 4 of unit 9 as an output; drive the output from the input." That could be programmed via text or a simple graphical process on the computer. But what about logical combinations, or delays, or handling analog quantities or digital quantities made up of multiple inputs? Maybe the answer is that just as microcontrollers are made to do the processing, computer languages are made to tell them how to do it! But I have this notion that it should be possible to set the difficult stuff up in advance so that a user could make it do all it's capable of doing without writing code. Or is that a dream?

    I'd appreciate suggestions.
  2. BMorse

    Senior Member

    Sep 26, 2009
    This type of "networking" you speak of, has been used in home automation for a long time, they now use wireless connections (ZigBee, WiFi, MiWi, etc.) instead of ethernet you should check out some home automation sites such as this one >>
  3. John P

    Thread Starter Senior Member

    Oct 14, 2008
    Thanks for the response, but I may not have explained everything I wanted to achieve. I'm thinking of the world's cheapest processor network, except possibly Roman Black's Blacknet. Radio is way too costly, and when I said RS-485, I meant it, not Ethernet. I'm thinking there might be a 4-wire cable (using RJ11 phone plugs/jacks maybe) that would carry both data and power: another problem with radio is that each unit has to have its own power supply, and I want to avoid that.

    I can imagine that most of the units could be pre-programmed with the ability to accept orders to operate their I/O pins in various ways and send or receive data, but I can't see how the master unit, that connects to the computer and might run the network on its own, could avoid being programmed in a real live computer language.
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    Hi John_P and thanks for the mention of my "Blacknet". :) Unfortunately most people consider that type of thing as very obsolete technology by modern standards, and it's only my personal hobby preference of testing "zen minimal" type solutions that leads to things like the Blacknet, and maybe a few other people that just want something really cheap and/or need only low functionality that might be tempted to build something like it.

    The world these days is constantly pushing to faster datarates, higher amounts of data transferred per message and more data (sometimes a stupidly high amount of data is sent) per-function performed. It annoys me a bit and is unneccessary for the most part but it SELLS COMPUTERS. The constant drive to new higher data use standard sells a huge amount of hardware! How many people are happy with a 56k modem these days? You need the fastest and biggest and are forced to upgrade every couple of years.

    I don't think there will be any real commercial market for your minimalist network system. And even if you established it as a product, someone would release a network with more features, higher datarate, more whizz-bangs and your product would be obsolete. That's just the way it is. :(

    Now in an attempt to say something helpful, you could look up "command intepreters" or "interpreted language on microcontroller" as this is similar to what you are talking about. Each device on the net acts as an interpreter and the data sent is actually the "interpreted language" that the devices then respond to and do whatever task required.

    BASIC is an interpreted language (usually) but you can design your own interpreted language with only a few simple commands and send those commands over your network as you like.

    It's a cool idea, and I wish you luck.
  5. John P

    Thread Starter Senior Member

    Oct 14, 2008
    Judging by your reply, Roman, you're thinking the same way I am! I'm imagining something simple and cheap, but quite capable of moving small amounts of data around for simple sensors, controls and displays. The toughest part seems to be the customized software that inevitably has to be used. Could the answer be Great Cow Graphical BASIC ( )?

    Or if it's acceptable to make the user learn BASIC (non graphical) maybe it's possible to make a system based on slave units that can do the various things when they get orders, plus a master that's something like this:

    Whether it could ever be commercial, I don't know. I was thinking of the hobbyist market more than the throbbing sinews of industry.
  6. MrChips


    Oct 2, 2009
    John, your idea has some merits. I have worked in this area called distributed processing. I have designed industrial systems using individual micros all linked via RS-485. In these applications, each module is programmed to perform specific tasks, akin to PLCs. While RS-485 has advantages, I would not shy away from Bluetooth or ZigBee etc. There are advantages to going wireless.

    At this stage I would not worry about the hobbyist market. One of the difficulties will be conceiving possible applications. A project like this will undoubtedly evolve over time. You will have to develop the language to be used to communicate between units. The trick is to be able to have a far reaching vision from the start so that the basic structure is in place.

    One approach is to create autonomous units and let each unit decide its own function. You can imagine an army of ants and each ant has a unique function, soldier, worker, scavenger, waste clean up etc. The folks at the robotics lab at MIT have done work along these lines where they have created an army of robotic insects all working towards a common goal.

    It might be best to start off with some simple applications. Don't let technology be the driving force. We have enough hardware at our disposal to make any dream come true.