Difference between Arduino serial communication and Computer serial communication

I'm trying to make a Wemos D1 Mini talk to a motorized serial device with a specialized motherboard. I have been able to get the device to respond to commands over serial-usb on termite on 8n1 9600, but it won't respond to the Arduino when issued the same commands. I bought a Max3232 thinking that it originally had to do with way the Wemos was communicated through UART, But I am still encountering the same issue. Is there a difference how the Wemos communicates through serial vs how termite or a regular computer does?

Here's a picture of my code configured for the Max3232.

The MAX323 is a level shifter that converts a signal from TTL (0V to 5V) to RS232 (12V to -12V). The Wemos D1 probably uses 3.3V logic (0V to 3.3V) which will generally work with TTL (0V to 5V).

might be helpful to have a diagram with devices

the max232 not only shifts the level but the levels are inverted ~5V = ~-12V

are you sure this is typically true? are the switching thresholds that similar?

Works for me. 5V CMOS switches at about 2.5V so 3.3 is high enough to count as a 1.

of course a HIGH 5V output should be above the 3.3V switching threshold but is HIGH 3.3V output high above the 5V switching threshold?

Check the datasheet. Section 30.2 DC Charcteristics.

Max LOW input = 0.3V
Min HIGH input = 0.6V

Min HIGH output (20 mA, Vcc=3.0V) = 2.3V

Since 2.3V is well above 0.6V then, YES, an output on a 3.3V Arduino will be read properly by a 5V Arduino input pin.

Good chart:

Logic Levels - learn.sparkfun.com

while i've seen a mix of technologies, CMOS, LS, don't know if i've ever seen a mix of voltages.

what happens when you drive a 3.3V with the output from a 5V device?

Some 3.3V inputs are 5 Volt tolerant; no worry.

For 3.3V inputs, non-protected, the input voltage will likely damage the input gate unless current limited by a high resistance.

Personally, I'm a fan of level-shifters on even 5V tolerant pins.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.