Controlling RS232 Equipment via Photon and IFTTT Go Button

I have been a little disconnected from Spark/Particle for a while and things certainly have changed. I received my Photon and want to attempt a project. It seems simple enough but I am looking for some guidance before I start as I am unsure about RS232…
I want to control a monitor that has RS232 input to turn ON and OFF.

  1. I think this can be done with a simple Serial.write command to the serial port?
  2. For the hardware, can I use SparkFun RS232 Shifter - SMD? I presume plugging this into the monitor would take care of the level shifting or would I have to provide a 12v Power supply for the monitor side?
  3. I was hoping there would be a shield for RS232 for the photon but possibly the closest would be the upcoming Shield-Shield and use an Arduino RS232 Shield.
  4. Finally I would like to activate this via the IFTTT Go Button. This would allow me to turn the monitor ON and OFF via simple iPhone button.

Any guidance would be appreciated and if there is an existing similar project on the RS232 side that you can refer me to it would be appreciated. I looked around but mostly found only 5v Serial Particle to Arduino type projects.


My experience has been to use a max232 chip caps and wall wart power supply to make this work.

This is probably pretty much what you are talking about with the spark fun device

1 Like

The wall Wart is to supply the power for the Photon and VCC of the RS232 Shifter?

The SparkFun device seems to have the RS232 to Particle side (RX) covered but I question the TX direction. It uses the logic side VCC for transmit voltage and the core/photon 3.3v is barely adequate to cover RS232. I would look more closely at that before committing. The suggestion from @hardwater is proven and reliable.

1 Like

Yes that would be fine. What a max232 does is use the caps to make a charge pump to create the ( as I remember +/- 15 volts).

Looking at the sparkfun device I bet it will work just give the same +v & gnd to it that you are going to use to power the photon. That assumes your supply can provide enough power. Most anything you would probably choose would.

I believe MAX232 creates +/-10v but who’s counting. Well within spec.

1 Like

Thank you for the replies. Sorry if I sound dumb but just want to double check before frying anything - The description on the Sparkfun device says power the board at 5V and the unit will convert RS232 to 5V TTL, So i understand that INCOMING RS-232 signals will be converted to 5V or whatever level i power the board with. Does this also mean that OUTGOING signals will be Upconverted to 10V?, I presume this is supplied by the Monitor side?

Taking a further look at the schematic.

This is what I would try. Connect the photon to a supply with Vin & gnd. Connect the level shifter as follows

3v3 to vcc on level shifter
gnd to gnd
TX to TX
rx to rx

That should work fine the only risk is that the photon voltage regulator cannot supply enough power, but I do not think that will be an issue

Thank you.
I will order some boards this week and give it a try.

Sorry for the bumping of this topic, but I’m looking into building something similar and was wondering if you did get it to work eventually?

Would be great to know the hardware you used to accomplish this, also jumping into a new project with rs232

Seconded on wondering what hardware was used?

@dylanger, which hardware are you referring to? If you are looking for an RS232-to-TTL converter, you can use something like this:

Anything using the Maxim MAX232 family of chips will work. Make sure you get a board that is rated to work with 3.3v to 5v. :wink:

Hey Peekay,

I’m actually working with Cisco Devices, these devices usually output 12Volts, would this still be okay? 12V into the MAX3232 then from the MAX3232 into the Particle Photon

Much like this:

Would this work?

My other question was could I use the 12Volts being supplied from the RS232 port and use it to power the Photon, as well as have the RS232 signals be converted to UART?

Its my understanding the MAX3232 IC needs either 3.3V or 5V to operate also?


@dylanger, the spec sheets for the MAX3232 indicate they can handle the full +/-25v voltage range defined in the RS232 spec.

There are two parts to the MAX3232 - One is the RS232 interface which uses those 10uF caps as charge pumps to create the +/- voltages required by the RS232 spec. So, the +/- 12v from the Cisco device on the RX/TX lines is fine. The other part is the low voltage interface logic which uses 3.3v - 5v. Ideally, you would power the MAX3232 with 3.3v so its logic outputs work with the Photon’s 3.3v GPIO. Since the MAX3232 is a low current device, you could use a number of small (50-150ma) LDO voltage regulators to get the 3.3v.

The RS232 spec does not include a 12v supply on any of the RS232 pins unless it is added by the Manufacturer. I have seen some designs that “harvest” power from the DTR/RTS/TD pins but I would not rely on that. Where were you proposing to get that voltage?

Perfect! The specific device I’m looking at is this guy

So could I power the MAX3232 with the VCC and GND from the particle, I’d assume that’s outputting 3.3Volts?

Would all of the GNDs be connected? Example, Particle GND --> MAX3232 GND --> DB9/RS232 GND? Most sketches I’ve seen the GND seems to disappear.

Hmm thinking about the “Harvesting” of power from RS232 isn’t a good idea as some devices vary, I was thinking getting it from one of the RS232 pins?

Thank you for your help! :smile:

@dylanger, I would power the RS232 board from the photon’s 3V3 pin. Connecting all the grounds is absolutely required.

As for powering the Photon, I would not rely on power from the RS232 pins UNLESS Cisco specifically specifies that pin as a 12v power source with a max current load. Since I doubt they would do this, I suggest powering the Photon for a good and reliable source. :wink:

1 Like

Thank you very much for your help PeeKay123!

1 Like