# Connecting HCM375B-232-68N with arduino

**URL:** <https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324>\
**Category:** Networking, Protocols, and Devices\
**Created:** [January 10, 2024, 9:57am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324 "2024-01-10T09:57:10Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 9:18am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/21 "2024-01-11T09:18:46Z")

</div>

@aashley  
Just to be clear  
Connect the compass DC5V and the Converter Vcc to the Arduino 5V  
Connect the Compass GND and the Converter GND to the Arduino GND

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 9:55am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/22 "2024-01-11T09:55:21Z")

</div>

@jim-p  
I am using arduino IDE environment/software.  
if I am wrong please clarify/explain your question.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 10:02am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/23 "2024-01-11T10:02:41Z")

</div>

Post the code you are using on the UNO to talk to the compass

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 10:03am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/24 "2024-01-11T10:03:29Z")

</div>

@horace I have tried swapping the pins but still no ability to receive any character entered over serial monitor.

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 10:04am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/25 "2024-01-11T10:04:40Z")

</div>

@jim-p I have mentioned the code in my first post apart from that I have not used any code for compass and arduino communication.  
If you have any please guide.

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 10:37am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/27 "2024-01-11T10:37:04Z")

</div>

@jim-p  
**Just to make sure before connecting everything please confirm that is it the right connection diagram shown below:**

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/6/3/5/63541bdc608ccbd0d6f514d703153e2982fc1196.jpeg)

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 10:48am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/28 "2024-01-11T10:48:55Z")

</div>

The compass GND pin needs to connect to the HW-044 GND Pin and to the 5VDC power supply GND.

Pin 5 on the DB9 connector is a GND that you can use. Make sure the connections are good and not loose.

Otherwise the other connections are correct

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 10:58am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/29 "2024-01-11T10:58:40Z")

</div>

Means I can short the grounds of , 5v DC battery,DB9 Connector and compass. Right ?

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 11:05am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/30 "2024-01-11T11:05:02Z")

</div>

Yes. basically ALL grounds must be connected together at some point.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 12:49pm UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/31 "2024-01-11T12:49:05Z")

</div>

Maybe this will make it clear

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/7/6/2766aeaf9bf42573580a09b2e27df5ffa690e3de.png)

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [January 11, 2024, 12:50pm UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/32 "2024-01-11T12:50:29Z")

</div>

> [@aashley](#):
>
> @horace I have tried swapping the pins but still no ability to receive any character entered over serial monitor.

you should by connecting pins 2 and 3 of the D-type connector be able to run a loopback test (doubt if it will work with SoftwareSerial is Ok with AltSoftSerial)  
unfortunately both my RS232-TTL modules are dead - probably burned out part of the MAX3232 transmitter/receiver circuits at some time - looking at the loopback signal on an oscilloscope the signals are rubbish  
some more RS232-TTL modules on order

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 11, 2024, 4:47pm UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/33 "2024-01-11T16:47:34Z")

</div>

Thankyou so much both of you  
@horace @jim-p as it is very late here , i'll attempt these both tasks tomorrow and give you updates.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 11, 2024, 4:57pm UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/34 "2024-01-11T16:57:21Z")

</div>

Good night

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 12, 2024, 5:02am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/35 "2024-01-12T05:02:43Z")

</div>

@jim-p  
Hello , I attempted your simulation along with the code but there was no data obtained.  
**However I didnt have 5V supply therefore I used another arduino , Hope this doesnot bother anything right ?**  
Below attached is the output

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/4/d/5/4d569223de092eecf9efa67ef3877458959ce4f2.png)

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 12, 2024, 5:37am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/36 "2024-01-12T05:37:14Z")

</div>

@horace  
Yes when I only used Arduino 8 and 9 pins it worked absolutely fine.  
However when I connected hw-044 module it didn't worked, swapped the pins of hw-044 along with D9-connector but no difference.  
**My connections:**  
rs232(RX-8)arduino  
rs232(TX-9)arduino  
rs232(gnd-gnd)arduino  
rs232(vcc-5v)arduino  
d9connector(2,3 pins together)

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [January 12, 2024, 7:04am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/37 "2024-01-12T07:04:52Z")

</div>

my RS232-TTL modules were working a few days ago communicating with a [Quectel EC21 modem](https://forum.arduino.cc/t/arduino-uno-and-quectel-ec25/1208548/5)  
at the moment neither are working - I have been doing some experiments with a Sierra Wireless Fasttrack Xtend FTX009 modem and have apparently damaged both the modules  
waiting for new modules to arrive

---

<div class="post-metadata">

**Author:** ![aashley](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@aashley](https://forum.arduino.cc/u/aashley)\
**Post date:** [January 12, 2024, 7:38am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/38 "2024-01-12T07:38:57Z")

</div>

@horace ok i'll also wait for your modules to arrive so that we can do together :')

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [January 12, 2024, 7:46am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/39 "2024-01-12T07:46:23Z")

</div>

unless @jim-p has ideas to help

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 12, 2024, 8:01am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/40 "2024-01-12T08:01:28Z")

</div>

From the diagram you gave, I thought you had another 5VDC supply.

Using an Arduino to supply power is OK but you can use the same Arduino that is running the software to supply the power(see diagram below)

The Arduino should have only printed the word "running" once.  
Did you reset the Arduino after you started the serial monitor?

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/d/a/6/da67c4e6670d904d04b4bf2213c34cbb90fa0cbe.png)

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [January 12, 2024, 8:38am UTC](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324/41 "2024-01-12T08:38:06Z")

</div>

The link to the data sheet you provided is **NOT** for the model you have.

Please confirm that you have the HCM375B-232-68N and NOT the HCM375B-232-MP

The command responses are different

[Previous page](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324.md?page=1)

[Next page](https://forum.arduino.cc/t/connecting-hcm375b-232-68n-with-arduino/1209324.md?page=3)
