Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help on general project design

Status
Not open for further replies.

mdredmond

New Member
Hi Folks,

Hmm. Not sure why some of my text is being turned into asterisks...

I need to build a uC based device and being of very limited experience, could use a little high-level guidance on its general design and parts selection.*

Fundamentally the thing is quite simple: *I need to monitor the states of 8 banks of 16 SPDT switches. *I need to read both the NO and NC contacts on these switches (so 32 inputs per bank). *Associated with each switch (but independent from it) is a device that I might need to activate by setting its input high. The device will be triggered by the uC, not directly by a switch (i.e., the state of the switch must be read by the uC and the device may or may not be activated in response). So there are 16 outputs per bank.

This would be simple enough for me to do except for the following constraints:

1. *The banks of switches and devices are remote from each other and from the uC by up to 30 feet.

2. *The device input pin must be >= 12V

3. *Communication with the banks must be RS485 to accomodate a future device alternative. *If this happens we will simply shunt the RS485 over to the devices directly, *bypassing everything else below.

4.*Each switch+device must plug into an RJ45 jack so I intend to have a PCB (I'll call it 'the remote board') with each bank of devices. *I can place any support ICs necessary on those boards.**

5. Connection between the uC board and the remote board that drives a single bank must be no more than 8 wires (a single ethernet patch cable) and this cable must also provide +12V and ground.

I am not constrained in my choice of uCs and have settled on a .NET Micro Framework board because it provides some features (full ethernet and http stack, USB client, etc.) that I need. *Very high pin count w lots of IO choices. *I think its safe to ignore the uC for now and assume it will do whatever I need it to.

So it will look something like this, where each dashed line is a Cat-5 cable:

* * * * * * * * * * *RS485 over Patch Cable

uC Board * <--------------------------> Bank 1 PCB (up to 16 switches / devices)
* * * * * * * * * ^---------------------------> Bank 2 PCB. *"""
* * * * * * * * * ^---------------------------> Bank 3 PCB. *"""
* * * * * * * * * ^---------------------------> etc. up to 8. *"""

So *I have 8 wires going to each bank and before doing anything else, four are used: *+12V, Gnd, RS485+ and RS485-. *To simplify the serial comms I think I should make it synchronous and that blows another wire for the serial clock, leaving 3 wires. *BTW, speed is not a big deal here. *If I can get the states of the inputs a few times a second that would be fine.

My thinking thus far is... At the remote board, drop the power down to 3.3 or 5V. *Send the RS485 into a level converter like a Max483. *And here is where I reach the limits of my ability to figure this out. *Following is my thinking out loud...

I might want to use two*cascaded 74HC595s to send the output signals to the devices. *These are 12V so I'll use switching transistors here (part selection? Current is <25mA on each of the signal inputs).

For reading the states of the switches 74HC165s might do. *Four (yikes!) cascaded will give me 32 inputs. *Would be nice to read both the NO and NC contacts with one pair of chips rather than four chips. *Or maybe even use one chip and some sort of 1-4 multiplexer. *Any way to do this?

I have three wires left on my cable that could be used with a 3-to-8 port expander (part selection?) for enabling/disabling/latching any of the other chips used. *If I can just use 2 of these then I can use the third to provide 5V and avoid a power supply on the remote board.

Parts count is getting kind of high - 6 or 7 chips so far for each remote board. *It sure would be nice to have a single chip with 32 inputs, 16 outputs, serial in and few/no external parts instead of 6-8 individual ICs. *Does such a thing exist? *Some sort of PLC perhaps? *Don't know anything about this.

As is obvious, my knowledge and in particular my familiarity with the parts available in the erector set is very limited. *Can anyone give me some general direction, things to look up or look into? *I'm certainly not looking for a design - just a push in the right direction and I'll go learn whatever I need to.

Thanks for any help!
 
Last edited:
Hmmm, where to start...

Howdy, in no particular order:

> on output I'd go with opto-couplers: protection for the uC, 12+V @ 25mA is Easy, they come in quad packages.

> I'd be leaning on putting a uC on each bank/board: RS485/std async serial is Straightforward (com protocol would address each board), 30' versus scanning/output speed is predictable & faster, going direct is built in

> multiplexing would work well given maximum scan speed

> there are very high pinout general purpose uCs that would just need input clamps and output drivers (optos)

> as to chip family selection, others here will have to chime in on the simpler/est platform to learn/develop. I started coding in '78, as such, a bad guide for a newby

You might visit a local junior/community college and see if the electronics instructors would have any guidance or candidates for assistance. Good Hunting... <<<)))
 
Status
Not open for further replies.

Latest threads

Back
Top