2

I have a micro turbojet engine (JetCat P100-RX) which is operated through an Electronic Control Unit (ECU).

The ECU has a lot of information about the engine. I want to access that information and also send commands to the ECU to control the engine.

The ECU connects to a Mini I/O device. This connection is shown in the following image:

enter image description here

The details of both the ECU serial connection and the Mini I/O Board are given in this manual page 4. (What I understand here is that the data stream from the Mini Board follows a RS232 protocol.) It looks as shown:

enter image description here

I would like to collect the information from the Tx, Rx and GND pins using the Arduino Uno. How can I do this? The Arduino is connected to my PC through the USB port.

EDIT1: What I tried doing:

I connected the Tx, Rx and GND of the Mini Board to pins 10 and 11 of the Arduino and configured 10 and 11 as serial pins and GND to Arduino GND (Rx anf Tx respectively) using SerialSoftware as follows:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600); // Set to 9600 as the manual says (link above)
}

void loop() {
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
}

My circuit diagram:

enter image description here

But I don't get any output on the Serial Monitor.

While reading online I found out that I need some converter. Following these posts, I have bought a MAX3232. Do I need to use that? How do I use that and what changes do I make in my code?

6
  • 2
    not a question about arduino specifically ... you would have the same question if you used any other microcontroller ... first thing to do is to determine the signalling voltage levels on the RxD and TxD pins
    – jsotola
    Jul 8, 2022 at 15:51
  • The manual for the device shows that TX and RX are 3.3V signals.
    – Wendall
    Jul 8, 2022 at 19:50
  • @jsotola Yes Indeed, the pins are 3.3V. Now where shall I move from here? I am not an electronics guy ;)
    – Atharva
    Jul 9, 2022 at 2:40
  • @Wendall You are right, the manual does say that. Now how shall I connect?
    – Atharva
    Jul 9, 2022 at 2:41
  • Since you are not using the JetCat RS232 adapter (which converts the 3.3V signals into RS-232 levels (which would require the MAX 3232) you should be able to connect directly to the UART of your Arduino. Once you have it working with your hardware THEN try to get it going using a software driven serial port. In my experience, software ports work OK, but not well and almost not at all if I am using interrupts for my own purposes. Since it is a 3.3V signal you MAY have to convert them to 5V. Google around a bit, there are lots of ways to do it. There are 3V Arduinos too, then it will work at 3V.
    – Wendall
    Jul 10, 2022 at 14:59

1 Answer 1

-1

That is relatively easy to do. If you have a Mega or another Arduino that has more than one serial port, great. If not, then softwareserial is what you need. For this to work all grounds must be connected.

Softwareserial can only receive on one channel at a time. On the hardware level you should use a high-impedance receiver to monitor both the RX and TX signals. I use a 74HC14 (74C914 is rated at +- 25 V on its input) or similar device. Place a 50 kΩ resistor from the RX to an input on the IC, do the same with the TX to another input on the IC. The input protection diodes of the 74HC will limit the current, at 50 kΩ 50 V gives 1 mA.

Connect the outputs of the IC to inputs of the Arduino. Each input needs to be configured to receive ASYNC input at the correct baud and other parameters. I have done this many times and it works great. I always did it with UARTs, not software. Note the 74HC device inverts the signal as is normal with RS232. There are various modules available for the Arduino that have a USART, UART or similar serial device on them.

2
  • Thanks for your reply. Para1: Softwareserial-check. What do you mean "all" grounds? I see only 1 GnD pin on the Mini Board. Para2: I don't understand what you are talking about, the voltages on the Mini Board are 3.3V, where is 50V coming from? Para3: How to configure to receive ASYNC input at correct baud rate? Can you show some code as example?
    – Atharva
    Jul 9, 2022 at 2:51
  • What does the Mini board connect to. RS232 is a three wires, one for Tx, one for Rx, and one for Ground. The grounds of each unit need to be connected. That is to simply show the input to the gate is rugged. At 50V you will have 1 mA of current into the HC protection, and not destroy the chip. Sorry on the code, there is a lot of it posted for the Arduino. At best I could only guess as you do not even have the design finished. Be sure you get the number of bits correct, parity correct, number of stop bits correct and of course the baude. Typically is 9600,n,1 (9600 baud, no parity and 1 stop.
    – Gil
    Jul 9, 2022 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.