What did i do wrong? RS485 to TTL? - Page 1
Forum section: electronics / projects

author: nardev
author_rank: Unknown
timestamp: February 03, 2024, 03:41:34 am
content: At first i thought it's a straightforward replica of a board "serial to modbus" Aliexpress board, i needed a custom PCB so that i don't make my own soldering etc.I made this design and ordered test batch from jlspcb with assembly and unfrotunately it doesn't work.This is the walk-through, what i have tried:This is actually the board that i was trying to replicate but with addition of my own connectors:https://www.circuitstate.com/pinouts/max485-cd4069-rs-485-module-with-auto-data-direction-control-pinout-diagram-and-pin-reference/#MAX_SpecificationsThe IC's i have used:CD4069Gthis one:https://www.lcsc.com/product-detail/DC-DC-Converters_CD4069-S14-T_C91444.htmldocs:https://datasheet.lcsc.com/lcsc/1811081920_UTC-Unisonic-Tech-CD4069G-S14-R_C91444.pdfMAX3485ESAthis one:https://www.lcsc.com/product-detail/RS-485-RS-422-ICs_Analog-Devices-Inc-Maxim-Integrated-MAX3485ESA_C1545222.htmldocs:https://datasheet.lcsc.com/lcsc/2108141630_Analog-Devices-Inc--Maxim-Integrated-MAX3485ESA-_C1545222.pdfI don't suspect on other protective diodes, fuse, indication LEDs etc. This circuit should work pretty much without any of those.I went through and i compared with the original working module, it looks like everything is there. The only issue was that it looks like on the "aliexpress module" TX/RX were mixed up so i connected with usb TTL tx to tx and rx to rx, but "aliexpress module" works ok like that.- I checked all the connections and short-circuits, everything looks ok and is same as on the "aliexpress module"- Just in case, i have tried mixing tx/rx etc, switching A/B for the modbus device, it doesn't help.- All i see is if i send message with serial, TX LED blinks but nothing i return.Any suggestions, help?What else can i check?The device i'm powering the module with has enough 3v3 and device i'm communicating with has propper voltage diference on A and B. Everything is withing the specs as far as i know. Below 12V and above -7V.Here is the schematics and the rest of BOM

author: MarkT
author_rank: Frequent Contributor
timestamp: February 03, 2024, 09:06:46 am
content: What do you have to help troubleshoot the circuit?First check to make is that every IC has power and ground, and that the circuit pulls the expected current from the supply (each chip's datasheet will give an estimation of current consumption).

author: jonpaul
author_rank: Super Contributor
timestamp: February 03, 2024, 12:16:44 pm
content: Source of the ICs used?You sourced ONLY the bare PCB or had the PCB vendor obtain and place/solder parts?Chinese firms use PULLS OR KNOCKOFFS of most popular ICs to save a few cents.Most are marginal or junk.Suggest to get genuine ICs from a USA source and replace the CD4069 and MAX3485 , thne try againj

author: temperance
author_rank: Super Contributor
timestamp: February 03, 2024, 12:29:53 pm
content: Is R13 open circuit an all boards? You will need those because RS485 drivers only source current and termination resistors are required to pull the line differential voltage back to zero.

author: mikerj
author_rank: Super Contributor
timestamp: February 03, 2024, 01:51:43 pm
content: You've made capacitor C2 one thousand times higher in value than the original i.e. 100n vs 100p. This provides timing for the TX/RX turnaround so could be impacting the operation. (unless the original schematic is incorrect, and this is a correction?)

author: ajb
author_rank: Super Contributor
timestamp: February 03, 2024, 07:00:06 pm
content: Quote from: temperance on February 03, 2024, 12:29:53 pmNo, in RS485 the differential lines are actively driven in both directions depending on the line state. A logic '0' is one line high and the other low, a logic '1' is one line low and the other high, and a differential voltage of zero is not a valid line state. Termination resistors (R14) are used to suppress reflections from the end of the line. A bias network (R11 & R12 plus the termination resistor) are used to keep the line in a valid idle state when it's not being driven -- although many modern receivers will interpret a differential voltage of zero as the idle state, and will work fine even if the line isn't biased.Quote from: mikerj on February 03, 2024, 01:51:43 pmThe required timing will vary with baud rate and how long the remote device needs to turnaround from rx to tx, so it's possible that neither value is right. Driving the DE/RE lines from the host would avoid that problem. If using a USB-UART converter like the FT232 or similar, some of those have a pin assigned for controlling a driver enable line, specifically for this sort of situation, although it isn't brought out to the header on most boards.

author: nardev
author_rank: Unknown
timestamp: February 03, 2024, 09:00:23 pm
content: Quote from: ajb on February 03, 2024, 07:00:06 pmI did make that mistake with cap value, i'll check what's on the "Aliexpress" version.Unfortunately, i don't have enough pins to drive DE/DR directly.

author: nardev
author_rank: Unknown
timestamp: February 04, 2024, 06:20:42 am
content: OMG yest it was wrong caps.Thank you all guys for looking into this.