I have a problem whit a project. I need to control 2 hydraulick electro valves accuratly. I use arduino due and H brige for the project. But i cant control them accuratly.
I tryed whit a fix value like 225 (analogWrite pwm)
But the problem is the valve is not stable sometime not even move at all after some time just starts slowly then stop or go even faster vwit the same pwm output.
(Valve starting value = 218-220
Valve max speed value =230 ) i think this narrow space between the values is the problem.
Please some help.
Would a basic Arduino Uno perhaps be better to control valves ?
Can you give a broader view of your project ? What is it about ?
Can you tell how everything is connected, which valves and which controllers do you use, how the circuit is powered, and so on.
The project is for a forklift.( My forklift just for personal use)
For lifting i have hydraulick solenoid valve block whit 2 solenoids. One for lifting and the other for releasing.
The control System is :
Arduino Due R3
L298N Dual H brige module.
Joystick 100k 1 axis.
Joystick connectet to GND and 5VDC.
Signal to A0 pin
Dual H bridge is conected to
2-7 pwm pins.
The Dual H bridge output is conected to the solenoid valve. (I dont have any infonformation about the solenoid valves, they are the factory ones.
I dont have code yet just i tryed to control the valves whit random nunbers set by a potentiometer from 0 to 255 (mapped down from 1024 to 255)
The sistem powered by the battery off the forklift 12v (14vwhen the engine is running)
And the arduino powered whit a step down supply. To make Stable 5V supply for the Arduino and joystick.
Too bad. You should know the recommended PWM frequency and current. The L298N may be too weak. What's the solenoid resistance or short circuit current?
You want to control the fork by the joystick only? Does it have a defined rest in mid position?
Why don't you simply use two buttons, for lifting and release without any further soft- and hardware? Then you could learn more about the solenoid valves.
Please read the post at the start of any forum , entitled "How to use this Forum".
This will help with advice on how to present your code and problems.
Can you please post link to specs/data of the valve assembly?
Do you know if the valves are the type that responds to PWM proportional control?
What frequency does the valve data sheet say what the PWM frequency should be?
Can you please post a circuit diagram, an image of a drawing will be fine.
Please include all power supplies, component names and pin lables.