Using one of the three AXE133Y I/O pins to transmit serial data

wapo54001

Senior Member
I would like to expand a control system by adding a new 5-relay switching board to my system. Unfortunately, my main control board is already produced without that capability built in.

It occurs to me that the AXE133Y that displays my system status has three I/O pins that are controllable from my main control board and could be used to control the relay board without modifying the main board. Using individual pins and combinations of two pins to make up the other two choices would work, but unfortunately I’m already using one of the I/O pins to control display dimming with PWM and that leaves only two available I/O pins which is not enough to control five relays.

So, I’m wondering about converting one of those I/O pins from a simple HI-LOW pin to a serial out pin with which I can send serial commands to the 14M2 on the relay board to fully control the relays. The command sent to the OLED to flip an I/O pin is 255,X where X is a value to control a specific output pin. My idea is to send a control value which can be retransmitted as a serial output on an I/O pin with a value that would tell the relay board exactly what to do with the relays.

Would appreciate some second opinions on this idea – especially if there is a ‘gotcha’ that I haven’t considered. Is there any reason that this is impractical?
 

Jeremy Harris

Senior Member
No reason why you can't do this at all, should be pretty straightforward. A couple of days ago I posted this: http://www.picaxeforum.co.uk/showthread.php?29194-Serial-relay-module about some fairly cheap serial control relay modules. These could, I believe, take your serial output and by using different addresses for each relay on a common line I think you could control five of them OK. I've not tried yet, but I have some on order and intend to test their capabilities as soon as they arrive, as what you're planning is close to something that I have in mind doing.
 

nick12ab

Senior Member
Would appreciate some second opinions on this idea – especially if there is a ‘gotcha’ that I haven’t considered. Is there any reason that this is impractical?
There's no reason why this shouldn't work, but you'll need to have a short delay between sending the command sequence for the serial data and sending any more data to the AXE133 because the serout command will make the AXE133 unable to receive any more data until all the serout data has been sent.
 

wapo54001

Senior Member
There's no reason why this shouldn't work, but you'll need to have a short delay between sending the command sequence for the serial data and sending any more data to the AXE133 because the serout command will make the AXE133 unable to receive any more data until all the serout data has been sent.
Good point! I think the serial output will consist of only a few characters, since I'm only selecting a relay and activating it, so it can be a very short delay.
 
Top