Switch to make Arduino controll a VFD

Hi.

Wonder if what I'm thinking about may be done with the Arduino the way I'm thinking to do it. I have a 5 position switch. I want to control a VFD (that again control a engine). The VFD has ground (GRND) and 4 digital inputs (X1, X2, X3, X4). Different combinations give different values. X1 is on. X2, X3 and X4 defines the speed. For example: GRN to X1 + X2 the engine starts at lowest speed. GRN to X1 + X3, the engine starts at second speed GRN to X1 + X2 + X4, the engine starts at max speed When I measure GRN to X1 I get 5V.

The idea is that I should be able to connect GRN on the switch to GRN on the Ardino to GRN on the VFD. The switch pos1 is connected to pin 1 Arduino, pos 2 to pin 2 and so on for all position from 1-5 Pin 7 is connected to X1 on the VFD, Pin 8 to X2 on the VFD and so on

When the switch closes, for example pos 2, that will cause a input signal on pin 2. When the Arduino reads pin 2 it will output HIGH on pin 7 and 9 and start the engine at slowest speed.

Will this work, can I connect the GRN on the Arduino board and the VFD to the same ground? And if so can I send signals from the Arduino to the VFD? Dont want to just tray it out, in case I might fry the VFD - that would NOT be a good thing. Totally newbey so any input would be appriciated.

Regards, TEK

Don't take this the wrong way but it sounds like you are just guessing. You have not posted a datasheet. You seem to be making assumptions about the operation mode of this VFD. (would it be nice if people took the time to explain their abbreviations ?) So it would seem you have a VARIABLE FREQUENCY DRIVE ? How does that relate to an engine ? What engine ? Are you going to give us any part numbers or any concrete data at all ? How about a datasheet ? Does this thing have any numbers on it ? Do you know what is at the other end of these wires with the "X" labels ?

Will this work, can I connect the GRN on the Arduino board and the VFD to the same ground? And if so can I send signals from the Arduino to the VFD? Dont want to just tray it out, in case I might fry the VFD - that would NOT be a good thing. Totally newbey so any input would be appriciated.

How are we supposed to answer this without knowing what it is you are talking about ?

Hi

Jupp, see your point.
And yes, guessing a whole lot here, as I’m very unsure about the electrical part.
Not guessing about the Vertical Frequency Driver and the connections there. Hoped to not go into to mutch details, but I see that it might be nessesarly
The more general question would be: Can ground be connected between different devices

But - ok, lets dig a bit into the details.

The switch is a Rotary Switch 2 Pole 5 Position (see attached image)
Arduino: Mini USB Nano V3.0 ATmega328P 5V Micro-controller Board
The VFD is a Newforever S100. A VFD is a motor driver that controls a 3HP spindel (the engine). The VFD can be controlled externally by control signals. It can be controlled in several ways. What I have tested and verified is that by connecting GRN to X1 it will start. By connecting GRN to X2, X3 and X4 I can control the speed. There is many other options, but no one that I have the need for in this case. The manual to the VFD is attached.
I also add a picture of the VFD itself and the connection panel for the VFD.
The engine itself is in reality not of interest in this case, as the Aurdino only will control the VFD and have no direct relation to the engine - but for your interest I also have add a picture of the engine itself (in next post, to many pictures)

300645910911_3.jpg

NOWFOREVER MANUAL E-100.pdf (630 KB)

nowforever.jpg

nowforever controls.jpg

Engine, a water cooled 2.2KW/3HP spindle driver.

Hope this helps.
Anything I have left out that is missing now, let me know. I will do my best to give any information I can.

When it comes to controlling the VFD:
The VFD has one digital pin for on/off (X1) and 3 (X2, X3 and X4)for controlling speed. Speed is controlled by adjusting the Hz the VFD sends to the engine. By using X2, X3 and X4 you can select the Hz for the VFD.
The VFD in my case is operating in the range of 150Hz (1000RPM on the engine) to 400hz (24000RPM on the engine)
The different combination is as follows:
GND-X1 = ON
GND-X2 = 150Hz
GND-X3 = 200Hz
GND-X3+X4 = 350 Hz
GND-X2+X3+X4 = 400Hz

As I said , apparently you are using a VARIABLE FREQUENCY DRIVE http://en.wikipedia.org/wiki/Variable-frequency_drive

Ok, before we go any further , can we agree on some terms ? "ENGINE" : Is this an INTERNAL COMBUSTION ENGINE ? If so what is the VFD used for ? (you mentioned "starting " the engine) . So are you saying the "ENGINE " has an ELECTRIC motor to START it and the VFD drives this starter motor ?

raschemmel: As I said , apparently you are using a VARIABLE FREQUENCY DRIVE http://en.wikipedia.org/wiki/Variable-frequency_drive

Yes

raschemmel:
Ok, before we go any further , can we agree on some terms ?
“ENGINE” : Is this an INTERNAL COMBUSTION ENGINE ? If so what is the VFD used for ? (you mentioned "starting " the engine) .
So are you saying the "ENGINE " has an ELECTRIC motor to START it and the VFD drives this starter motor ?

Engine: a 2.2KW electrical motor
The VFD controls if the direction, the speed (rpm) it is running on as well as a bunch of other parameters as ramp up speed+++
The VFD has a separet on button to start the engine. So when operating it you can first select the speed (by adjusting hz), but the engine will not start to rotate before “on” is connected.

Yes, I know all about VFDs . I worked with them at a previous job. What country are you in that they call an electric motor "an engine" ? Engine is a word I have only heard used in reference to internal combustion engines. Anything that is purely electrical is called a motor.

I said this:

As I said , apparently you are using a VARIABLE FREQUENCY DRIVE

because you said this:

Not guessing about the Vertical Frequency Driver and the connections there. Hoped to not go into to mutch details, but I see that it might be nessesarly

The idea is that I should be able to connect GRN on the switch to GRN on the Ardino to GRN on the VFD. The switch pos1 is connected to pin 1 Arduino, pos 2 to pin 2 and so on for all position from 1-5 Pin 7 is connected to X1 on the VFD, Pin 8 to X2 on the VFD and so on

When the switch closes, for example pos 2, that will cause a input signal on pin 2. When the Arduino reads pin 2 it will output HIGH on pin 7 and 9 and start the engine at slowest speed.

Will this work, can I connect the GRN on the Arduino board and the VFD to the same ground? And if so can I send signals from the Arduino to the VFD? Dont want to just tray it out, in case I might fry the VFD - that would NOT be a good thing. Totally newbey so any input would be appriciated.

What do you mean by "GRN"? Do you mean GROUND ? If so, the abbreviation is GND, not GRN. I will not discuss this subject unles we agree on terminology. I don't want to hear anything about an "ENGINE" or GRN any more ok ? It's MOTOR and GND. or find someone else.

Hi, is this the only thing you will be getting the arduino to do, if it is, then you are wasting a controller.
If all you are wanting to do with the switch is pull those X terminals to gnd in certain configurations, then use diode switching with your rotary switch, its cheaper, simpler and you don’t need to provide a power supply.

Tom… :slight_smile:

He can use an analog switch (see attached)

ADG511_512_513[1].pdf (141 KB)

First, thanks for the input. I did not know about diode switch or analog switch. I will look into those and see if I find out how those can be used and where it is possible to get the needed hardware.

But I'm still interested in knowing if my method will work because: - This is just one part of what the Arduino bord will do (it will also control a stepper motor with two mecanical end stops, and - ideally - monitor water flow and temp and shut off the motor if either the warerflow stops or the temp gets high) - I have the hardware (dont need to buy anything more) - I'm interested in learning the Arduino as well as how to wire different stuff together And please note, this is a hobby project for my own use, where 70% of the reason is learning about new cool stuff...

From what I see in the Docs for the analog switch, I'm kindof trying to use the arduino as a analog switch.

Raschemmel: - I will try to obey to all your demands. I'm really sorry that I offended you so deply by using the wrong expression. I did mean ground - and again, my deapest appologieses that I did make it so hard for you to understand. In opposit to you I have not worked with VFD's before, neither with the Arduino, and for sure not attemted to explain electrical circuits in a foreign language (or any language for that sake)

TEK73,
I wasn’t offended in the slightest. I just can’t discuss a subject using terms that I am not accustomed to. Obviously I can translate your terms into my term easily. The point is that we are not alone. The whole world could be reading this conversation (very unlikely) , maybe three or four other people. For someone who has worked with electronics for 30 yrs, to suddenly start calling GND GRN (which means the color GREEN) in electronics, sometimes used for earth ground, it is a little awkward, and sort of goes against the grain, if you know what I mean. It would be better for everyone ELSE if we use terms that they ar accustomed to . About your question,

The idea is that I should be able to connect GND on the switch to GND on the Ardino to GND on the VFD. The switch pos1 is connected to pin 1 Arduino, pos 2 to pin 2 and so on for all position from 1-5 Pin 7 is connected to X1 on the VFD, Pin 8 to X2 on the VFD and so on When the switch closes, for example pos 2, that will cause a input signal on pin 2. When the Arduino reads pin 2 it will output HIGH on pin 7 and 9 and start the engine at slowest speed. Will this work, can I connect the GND on the Arduino board and the VFD to the same ground? And if so can I send signals from the Arduino to the VFD? Dont want to just tray it out, in case I might fry the VFD - that would NOT be a good thing.

Let’s break this down into smaller parts,

The idea is that I should be able to connect GND on the switch to GND on the Ardino to GND on the VFD.,

This is called COMMON Ground. You should AVOID this with the VFD . You should use OPTO isolators , like the ones used by the VFD. (see page 18 ) or use relays.

The switch pos-1 is connected to pin 1 Arduino

NO, this could be made to work but should be AVOIDED. It is not about damaging something , it is about the fact that pin-1 on the arduino is the Serial port Tx pin and used for communication between the arduino and your PC. We don’t want to connect this pin to anything that is not related to that function, just on general principles. Any one else with arduino experience knows this pin can be used for other things but you are a Newbie and I think it is best for you to just consider that pin as DEDICATED to the function Tx (Transmit) for the Serial port and leave it at that. You can’t use that pin, we can choose another.

pos 2 to pin 2 and so on for all position from 1-5
Pin 7 is connected to X1 on the VFD, Pin 8 to X2 on the VFD and so on

There is no reason to use a rotary switch for an interface with Arduino. Four push button would be sufficient. The rotary switch only makes sense if you need it to distribute a signal. If you are interfacing to a computer you can program it to perform different functions for each push button.

When the switch closes, for example pos 2, that will cause a input signal on pin 2.
When the Arduino reads pin 2 it will output HIGH on pin 7 and 9 and start the engine at slowest speed.

Well NO ,this would NOT work because a HIGH on the arduino would have no effect on the VFD. It’s basically a case of APPLES & ORANGES. The arduino outputs are TTL signals:

That means they a 5V logic signals. The VFD Xn inputs shown on page 16 of manual are OPTO ISOLATORS (See page 18 of manual)
The manual was written in China and the person who translated it used the word INSULATION in the signal description
“Optical Coupling Insulation” (This is a Chinese to English Translation ERROR. He MEANT to say ISOLATION but didn’t know that word so he used INSULATION which is the plastic covering on the wire you use. Point being, the Xn inputs are OPTO ISOLATORS

Will this work, can I connect the GRN on the Arduino board and the VFD to the same ground? And if so can I send signals from the Arduino to the VFD? Dont want to just tray it out, in case I might fry the VFD - that would NOT be a good thing.

WELL, SHORT ANSWER, NO IT WILL NOT WORK , because you have not read the manual and do not understand the difference between TTL and Opto-Isolated inputs.

CAN YOU ACCOMPLISH YOUR OBJECTIVE USING ANOTHER APPROACH ?
YES

OPTIONS

  1. Use mechanical switches as shown in schematic on page 16.
    Either this type:
    http://www.banggood.com/100pcs-Mini-Micro-Momentary-Tactile-Tact-Switch-Push-Button-DIP-P4-p-917570.html
    or this type:
    http://www.ebay.com/itm/Panel-Mount-SPST-Momentary-Game-Yellow-Square-Head-Push-Button-Switch-/321293949770?pt=LH_DefaultDomain_0&hash=item4ace9c9b4a

  2. Use Opto-isolators that are driven by arduino pins (LOW sinks the led current for the Opto , The Collector of the Opto is connected to an Xn input. The Emitter of the Opto is connected to GND on the VFD. Logic HIGH on arduino does nothing so that is the OFF state for that Xn input. Logic LOW on arduino completes the path to ground for the Opto led because the only the input side of the Opto Isolator is connected to the arduino. The Output side of the Opto (the transistor) is connected to the VFD.

  3. Use small 5V relays to perform the switch function shown in schematic on page 16 of manual. Like these:
    http://www.banggood.com/5V-4-Channel-Relay-Module-For-Arduino-PIC-ARM-DSP-AVR-MSP430-Blue-p-87987.html

This is the recommended approach. It is the safest and provides the greatest amount of isolation between uC and VFD.
I URGE you to consider this option. There is no possibility of damaging the VFD using this method and the relays are designed for arduino interfacing & control.

NOWFOREVER MANUAL E-100.pdf (630 KB)

That was a great reply!
And yes, you were spot on according to Pin 1.

I really appriciate that you explained this.

I had a suspicion that connecting them together would not be a good idea, but was not sure - I will look closer at your suggestions and find a solution that ensures separetion between the VFD and the Arduino.

When it comes to the rotary switch, I want the “user interface” to be a 5-position rotary selector with quite a large knob.
Even if there is electronics in the backend - I want large and easy accessible knobs for the user (me), as well as “mecanical” feeling.
This will end up in my garage/woodshop, and will from time-to-time be operated with globes on.
So push buttons is not a desiered solution.

I will read up a bit and then see what solution I will continue with.

There is no reason you could not do that. The arduino doesn't care what kind of switch it is. Just connect it the way you described and program the arduino to look for a LOW (because the common of the rotary would be connected to GND) You really should make a point to read the manual from cover to cover. The analog input is something you could use with the arduino but you would need a x2 amplifier running off a 10 to 12V supply . (a car battery or any 12v battery would work) to use the analog input because it requires 0 to 10V. Also, there are some other features in the manual that are convenient (relays etc). Read it. Then you know what all your options are.

"You really should make a point to read the manual from cover to cover."

What do you mean, exactly, when you write "the manual"? From this page I see the "Learning" tab - is that what you refer to as "the manual"?

“You really should make a point to read the manual from cover to cover.”

What do you mean, exactly, when you write “the manual”?

I said that in Reply#14. I was referring to the manual you posted in Reply#2 and I re-posted in reply#14
I posted a PDF copy of the VFD manual at the end of Reply#12. The same manual you posted in Reply#2. Is there another manual ?

This Manual (see attached)

“You really should make a point to read the manual from cover to cover.”

So, why did I say that ? Have you LOOKED at the MANUAL ?
Do you know what is on pages 17,18, & 19 ?
Did you know it supports ANALOG INPUT AND OUTPUT ?
Which means if you added an 0-10V analog output circuit to your arduino (x2 non-inverting OP AMP with low pass RC FILTER
(4.7K ohm, 1uF) then you could have a CLOSED LOOP SYSTEM that sends a command to the VFD and displays the RPM of the VFD on an LCD .

NOWFOREVER MANUAL E-100.pdf (630 KB)

There is no need to SHOUT.

I was asking about what you ment with "the manual" as this is a arduino forum, and my mind was focused on all the arduino + related hardware stuff that I do not have a grasp off - not the VFD. So - my natural respons what that you ment a manual that was about arduino and different type of circuits that is working in relation to the arduino. Not that you was referring to the VFD manual.

And yes, I HAVE LOOKED at the manual. And yes, I know that there is A ANALOG control mechanism. But I have had more than enough challenges to get the VFDs digital control to work using the Xn to work. That the manual is a useless peace of crap* that has wrong setting, wrong number of possible input values and wrong functional values does not make it any better (and yes, the original I have in Chinese is also wrong - it is not just that I have downloaded the wrong version from the internet). But, after combining info from different manuals, as well as a lot of testing, controlling the VFD using the Xn inputs is something I know works - and what more is - it gives me what I want. I do not need, nor want, an analog control. I need, and want, to be able to select a few different predefined speeds using a large good knob - the digital inputs should be able to provide that. For a knowledable person it might very well had been easier to use the analog control - but for me, right now, going for the digital feels like a easier solution where I now have enough knowledge about all the factors.

Your advice and use a 4 channel relay module seems easy and straight forward - so my plan is to go for that solution.

  • Based on what I have found in a manual for a S100 (not E100) there seams as if some of these VFD's may be delivered with different chipsets (or processors or what it might be called), and that the number of possible settings varies between the different "chipsets" - and my VFD seams to have a different "chipsets" than the one described in the manual. All the main concepts are the same, and many of the possible settings are the same. But the documentet position that you should set the value is incorrect. For example, the doc says that there is 2 Xn that controls the speed. But it is actually 3 Xn that controls the speed. The doc says that at a given position you should be able to set the wanted frequency, but that position actually only accept 1 or 0 - because it is actually for setting someting completly different.

Glad you did your homework and found a solution that works for you. Keep in mind the VFD relay options in case you ever need them

Why not just add three relays and run the VFD logic through them? Have the Arduino control them and then you don't need to worry about separate ground path and if you ever need to replace the drive you won't need the same one.