Short answer would be no. The Edison has only 2 hardware serial port. With the Linux overhead, it would be probably too slow to make software serial. Your application is really simple and the Edison is really overkill for this. This could be easily done with a microcontroller with 5 serial port (which is no so common IMO). It would be really easy to do with a Propeller chip from Parallax. Try to re-post your question on their forum : http://forums.parallax.com/ and I'm sure there will be 3-4 persons willing to help you. You could also do that on a small FPGA or CPLD.
Many thanks Fred,
I really don't know where to start with it, so I'm very appreciative of the pointer.
If there isn't unexpected data coming back from those cameras, you can do it with any microcontroller with 2 UARTs and a 4:1 multiplexer or two (depending on whether the data is unidirectional or bidirectional, though the microcontroller wouldn't be able to simultaneously monitor all 4 camera ports). Maybe even one UART and software emulation for the others, if the data rate is low enough. Those will be cheaper than a Propeller, and might have a shallower learning curve than FPGAs.
I'm gonna "fake it till I make it" with this, so if I make a fool of myself, feel free to poke fun at me.
So the purpose of the device I need is because the 4 cameras I have cannot be "addressed", they are hard-coded to be "ADD 01", I can't change that.
However, the camera controller I have to operate the cameras uses ONE single RS232 D9 connector OUT, using multi-camera "addressing" to single-out the PTZ commands to the appropriate camera.
With normal cameras (which can be "addressed") this doesn't pose a problem; I just "parallel" connect to all the cameras RS232 to the OUT of the controller, each camera only responds to it's given "addressed" commands.
But with these "ADD 01" hard-coded cameras, this system fails, as they ALL respond to the same "ADD 01" PTZ commands, thus they all drive at the same time, which I don't want.
So, to overcome this, I thought such a device would take the single controller OUT RS232 command, interrogate it & based on what "address" it is, simply re-address it to "ADD 01" & output it to the appropriate "PORT".
I'm not sure if there is any bi-directional info coming back from the cameras, would that present a problem if there was & I simply ignored it?
As best I can tell (not being either an electronics or a programming dude), the data rate is 9600, 8, N, 1 (no flow control).
I've had a look around & I found a STM32F103ZE which lists 5 UARTS (google search "micro controller 5 uarts"), is this something I should look at??
I guess this is no longer about Edison, so I guess I shouldn't be asking anymore such questions, but you guys seem to know some stuff, so it would be great to get one more final push in the right direction.
1 of 1 people found this helpful
A bit of googling suggests that the PELCO D protocol is unidirectional, so you can do this with a simple, cheap microcontroller. Pick your favorite chip with two UARTs (at 9600 baud, software emulation for the output isn't hard, so you could get away with only one hardware UART -- note that this makes Arduinos an option), and hang something like a 74HC139 (a dual 1:4 demultiplexer, but those seem more common than singles) or 74HC4052 (similar, but bidirectional and supports analog signals, a few cents more expensive but probably a handier thing to have in your box of parts) off of the output UART. Have the micro receive the incoming command, inspect the address, set the multiplexer's address lines, and repeat the readdressed command on the output UART. You shouldn't even need to connect the RX lines, if I've read correctly. Parts cost for just the chips can be under $2, or under $10 for a newbie-friendly version (knockoff Arduino Pro Mini, FTDI breakout, and 74HC4052 in DIP for breadboarding).
Hi again Bunsen,
thanks a HEAP for the advice, I'm kind of following what you're saying & I'm excited!
I'm not going to lie; I don't know how to get it done, but at least with the info both you & Speccy88 have given me, a least I'm further up the road than I was yesterday.