Hi all
Iam newbie in ardino and form.i done small things in ardino. Now i want to controll Mitsubishi D720s VFD to controll reverce and forward to using ardino mega .I use max485 (TTL to 485 module )for communication purpose to VFD .I use chat gpt make the coding .iam not expert in coding .use i2c 16*2 display for status of the vfd . The project iam thinking a simple washing machine the motor controll by vfd. Now I face issue the vfd can't communicate with mega2560. I use mode bus master library wire library i2c library.as chat gpt give
The brude rate 9600 set in vfd slave adress 1 ardino d1 pin used for ttl send and receive selection.d18,d19 use for Rx tx for max485 board and vfd RDA +,SDA+ connect to max 485 A data pin. RDB-,SDB- to max485 B data pin.i use serial monitor to communicate status error getting 226.my question is it possible mega to vfd D720s can communication.chat gpt saying is it possible.i done lot of search not yet find the project.your valued advice required.i miss some thing here connection or some parameter setting pls help
Thank you
welcome to the arduino user-forum.
You did well to give a somehow detailed description of your project and the hardware you were using.
Still more and more precise information is needed to really help you.
English seems not to be your motherlanguage. I recommend that you use
Deepl for translating.
The translation might be not perfect but the translation will still be much better than directly poorly chosen words from a rather limited personally known english vocabulary.
From your first post I really had problems to understand what you want.
Regarding chatGPT. The problem with AI is: You have to write down a very precise prompt to really get a functional code. As long as you don't know much about programming you are unable to write down such a precise prompt. And this is the reason why AI is not a big help to beginners.
You should post a datasheet of this
If chatGPT wrote you code that does use the IO-pin D1 for send and receive selection that is a really bad thing. Because IO-pins D0 and D1 are used for the communication for flashing the compiled code and for the Arduino-IDE serial monitor.
Keep totally away from IO-pins D0/D1.
It is very likely that this is caused by an too unprecise prompt to chatGPT.
So please follow my recommendation to use DeepL for translating and provide the datasheet of the Mitsubishi D720s VFD Variable Frequency Drive
First, thank you for the response, and sorry for my poor language. I will try to improve it.
I am using a Mitsubishi FR-D720S VFD drive. I want to control the drive's forward and reverse functions using RS485 communication. The intention behind this project is to control a washing machine whose original control board is damaged. The motor is driven by the VFD. I am planning to use an Arduino Mega to control the VFD, pressure switch, and drain valves, and I'm using ChatGPT to help write the code.
Now, the big problem I’m facing is that my Arduino Mega 2560 is not able to communicate with the VFD. I tried a baud rate of 9600, with slave ID 1. The DE and RE pins of the MAX485 module are connected to pin D1 of the Arduino.
The VFD communication ports are connected as follows:
RDA+ and SDA+ to MAX485 A pin
RDB- and SDB- to MAX485 B pin
The MAX485 RO and DI pins are connected to Arduino pins 18 (TX) and 19 (RX).
Is there any issue with this connection? How can I fix it? Please help. Attached VFD manuval
Hi, @santhosh-ptb
Please post your code.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Thanks.. Tom....
![]()
Well to get code from an AI that really works, you have to write a very detailed prompt for the AI.
Writing such a very detailed prompt needs knowledge about programming.
This means: in most cases if a beginner that does know only a few things about programming the prompt is too unspecific. GPT will guess too many things and this is the reason why the AI created code does not work or is working only partial.
| Parameter | Description | Value | Notes |
|---|---|---|---|
| Pr.117 | Communication station number | 1 | Must match node.begin(1) |
| Pr.118 | Baud rate 96 = 9600 bps (default) | ||
| Pr.119 | Stop bits / parity / length | 0 | 8 data bits, even parity, 1 stop |
| Pr.120 | Communication protocol | 0 | 0 = Mitsubishi (computer link) |
| Pr.79 | Operation mode | 2 | 2 = RS-485 control |
| Pr.340 | Operation mode at power ON | 2 | Ensures it starts in RS-485 mode |
"After a long search, I found some connection issues. Now the communication is working, but the VFD is not responding to the given commands."
This doesn't match the datasheet I found at all. Do you have some datasheet for this?
Do you have the VSD "ENABLED" and or the EMERGENCY STOP type terminals connected?
Even though you are using 485, there are other hadware connections you need to do to enable the VSD.
Have you setup the VSD parameters to get it to use the 485 command line?
VSD are usually set for "Terminal" or "Keypad" control mode by "default' not 485.
Tom....
![]()
Hi Tom,
After a lot of searching, code changes, and parameter adjustments, I’ve finally managed to control the VFD through Modbus RTU. Everything is now working perfectly!
I’ll be sharing the full set of parameters and code—it could really help beginners who are trying to do the same thing.
Thank you so much for your support!
