0
\$\begingroup\$

I have a question regarding RS232 communication between a VectorNav VN-100 Gyro, Mbed LPC1968 uC and PC. I am using gyro to measure the number of rotation and processing it in the uC and displaying the number of rotation on a seven segment display. here is the top level diagram of the system (please ignore the power distribution, it uses a inbuilt battery)

block diagram

All the electronics are inside a steel container, so what I want to do is to be able to reach gyro through the connector to send various commands. Since, gyro is already connected (tx, Rx) to uC how can I connect it to the connector? Here is the pin out of the gyro, enter image description here

Pin 2 and 3 are connected to uC so can I use pin 8 and 9 with MAX232 in order to connect the gyro to the PC?

[Updated to include model numbers of Gyro and MCU]

\$\endgroup\$
1
  • \$\begingroup\$ The recommended strategy would be to send configuration commands from PC to the uC, which in turn would configure the gyro. Whether an independent connection via RS232 would work depends on the exact model of your gyro chip which you didn't specify. \$\endgroup\$ Commented Aug 15, 2016 at 10:02

1 Answer 1

1
\$\begingroup\$

Pin 2 and 3 are connected to uC

According to the information you supplied, those pins are at RS-232 voltage levels. Therefore you must be using a MAX232 or similar to convert those to logic level (TTL or 3.3 V etc) for use by your MCU.

Doesn't it make more sense to use the signals on connector pins 8 & 9 to connect to the MCU instead, since those are already at 3.3 V levels?

can I use pin 8 and 9 with MAX232 in order to connect the gyro to the PC?

As I explain above, it seems to make more sense (based on the info you supplied) to use the RS-232 signals at pins 2 & 3 for any external RS-232 connection. That way you don't need to add a MAX232 or similar, for the connection to the PC serial port, since the signals would already be at RS-232 levels

Update: Now that you have supplied the Gyro model number, one limitation I noticed in the VectorNav VN-100 Gyro user manual is that a firmware update is only possible via UART #1 which I think is connected to external connector pins 2 & 3 (you need to double-check that). Therefore you need to consider how you would do a firmware update to the Gyro, if you still choose to have pins 2 & 3 connected to the internal MCU.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your answer SamGibson, the sensor I am using is VectorNav VN-100 and the MCU is Mbed LPC1968. I am just using Gyro to read the orientation and send it to the MCU. MCU itself is not sending anything to Gyro. So as you mentioned I dont need to use Max232 if I use the TTL input for the MCU and RS232 directly to the PC right? Gyro needs to be calibrated once in a while so it would be handy to do it without taking it out of the steel container, that is the reason why I want to access the gyro directly from PC. \$\endgroup\$ Commented Aug 15, 2016 at 12:08
  • \$\begingroup\$ @ElectronicCurious - Now that you have given the model of the Gyro, I have updated my answer above to remove the concern about the possibility of only one underlying hardware serial port. "So as you mentioned I dont need to use Max232 if I use the TTL input for the MCU and RS232 directly to the PC right?" - I don't see why you would use 2 x extra MAX232 if you didn't need to. Why did you decide to do that? According to the Gyro manual, only UART#1 (which I think is connector pins 2 & 3 i.e. RS-232) can be used for firmware update. You need to consider that, depending on how you do updates. \$\endgroup\$
    – SamGibson
    Commented Aug 15, 2016 at 13:07
  • \$\begingroup\$ thanks a lot for the answer, indeed you are right UART#1 is the pin 2 and 3. Using this directly to Pc will definately make life easier when ther firmware update is necessary and also reduced the use of MAX232. \$\endgroup\$ Commented Aug 15, 2016 at 14:49

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