Connecting HCM375B-232-68N with arduino

@jim-p
I tried your diagram with new connections still no RX value received.
Output:
Running
TX: 68 4 0 4 8
My question is rx pins receives the bytes and tx pins transmits the bytes so why dont we reverse the connections of rs232 and arduino (Rx-Tx) pins ?
Like RX pin of rs232 should be connected to TX pin of arduino i.e pin-5.

That is not always true.
There are two types of devices that use RS232, a DTE and DCE.
Your computer is an example of a DTE, for it, TX is an output and RX is an input.
For a DCE, the opposite is true, TX is an input and RX is an output.
So when you connect a DTE to a DCE you connect TX to TX and RX to RX.
For other devices that don't use RS232, like the Arduino, TX is an output and RX is an input but there are exceptions here too.

The HW-044 converter you have is supposed to look like a DCE, however I have seen some that were done wrong and were wired to look like a DTE. You may well have one of the bad ones but we just don't know. Also, I could not find any information online about the HW-044.

If you want to continue testing, there is one more test you can run to figure out the connections on the HW-044.

1 Like

Thankyou for all the information.
Yes absolutely I have to continue testing until I achieve my task.
Yes, please do tell the way to figure the hw-044 connections or if I need to purchase another rs232 module do guide me.

@jim-p In my first post I told you that I tried to get the hex values from compass using only male D-type connector and an arduino.
I connected the (D-type to usb) in the computer and ran the compass through it's own rion software, at the same time I connected arduino tx and rx pins with rx and tx of compass, applied my code mentioned in post#1 and received some in-accurate hex values but one thing interesting was that I received those set of values only when my compass was working on it's rion software.
Maybe we could connect arduino and D-type but this time we send hex command through arduino ?

OK, let's test the HW-044 and see if it's working and connected right.
Connect as shown in the diagram below.
There is now a jumper wire between pins 2 and 3 of the DB9
Run the test code.
The D1 and R1 LEDs on the HW-044 should blink fast.

// HW-044 test

#include <SoftwareSerial.h>

#define rxPin 4
#define txPin 5

SoftwareSerial mySerial (rxPin, txPin);

void setup()  
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  mySerial.begin(9600);

  Serial.begin(9600);
  Serial.println("Running  ");
}

void loop() 

{
  mySerial.write (0xA5);
  //Serial.write (0xA5);

  delay (200);
  
}

@jim-p
I just attempted this and no blinking was observed only D1 was ON.

Try swapping the RXD and TXD pins on the HW-044

Yes , I also switched the pins but no change.

Then, unfortunately it appears that the HW-044 is no good.

You will need to buy a new one but please buy a different brand and from a different seller.

@jim-p
Sure, Is it possible that if you can mention any rs232 component which you think will be best for our requirements so that this problem does'nt occur again.

You take a chance when you buy small electronic devices from places like Amazon, Ebay, Aliexpress and Alibaba. It may be OK, it may not.
I only buy from reputable parts distributors like Digi-Key, Mouser, and Jameco or from hobby places like Adafruit, Sparkfun, Seeed Studio and Pololu.

Are you able to buy from any of those places. Depending on where you live the shipping charges can be outrageous.

Yes, Due to shipping charges we avoid buying components from international websites because the shipping will cost us more than the equipment therefore we prefer to buy from our local distributers.

I understand.
Then, all I can recommend is to buy a different brand (NOT a HW-044) and from a different seller.
You are not the first person who has had problems with these converter boards

Ok I will buy as soon as possible than report to you.

Post a link to the webpage of the one you intend to buy and I will try to see if there is anything that does not quite look right

The famous rs232 to ttl product is MAX3232 , so I am planning to purchase this what do you say ?

I don't see anything wrong. I guess you really have no choice but to try it

1 Like

may be worth get two or three RS232-TTL modules - i recently had two die on me

if you are purchasing a new compass try to get one with a TTL interface - much easier to connect to a microcontroller than RS232 - easy to connect to a PC with a USB-TTL dongle

1 Like

@aashley
I am terribly sorry but I have given you some bad advice.
I assumed that the D1 LED was connected to the TX pin like on the board I have but I see that on the HW-044 it is just a power LED.
So those test that you just did mean nothing, your board may well be OK

My sincere apologies
Let me know what I can do.

@jim-p
It's okay , atleast you are trying to help me out , however I have bought the MAX3232