Gate Valve Drive Electronics

A forum for discussion on the WMT River Control System hardware.
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Gate Valve Drive Electronics

Post by TerryJC »

I've just returned from WMT where Penri and I integrated a viable Motor Drive Board with the Gate Valve Assembly shown at viewtopic.php?f=15&t=57&start=10#p1539.

Penri and I have gone through several iterations of ideas for this function. Initially we considered using the L293D Motor Driver IC see https://uk.rs-online.com/web/p/motor-dr ... s/7140622/, but rejected it because of it's current carrying capacity and the volt-drop across the H-Bridge. We then looked toward MOSFETs to form the bridge and built a prototype board using the HIP4082IPZ MOSFET Power Driver see https://uk.rs-online.com/web/p/mosfet-drivers/0859391/ to drive four N-Channel MOSFETs. Unfortunately we found that this chip brought with it endless pitfalls, so we abandoned that and returned to looking at bipolar types.

I then discovered the L298D Motor Drive Board see https://www.gearbest.com/other-accessor ... gJjxfD_BwE which can do twice the current of the L293D and arrives prepackaged with onboard power supply management and protection for the drive transistors. One major attraction is the price (currently £1.15 each) and the only problem is the length of time it takes to get them from China.

I ordered four and they arrived yesterday. I assembled a single actuator prototype and tested the motor action off load. The attached Application Note gives details of what I did. I then took the prototype to WMT and Penri supplied the valve and it worked well, with very little volt-drop!

Next we need to ad an A/D device to the system so that we can control the position of the Gate and make minor corrections. We had thought that we might need to use PWM to control the speed of the motor, but since it takes just over 1.5 seconds to go from fully closed to fully open and slightly less to close, we now consider that unnecessary.

We will be investigating the A/D design over the coming days and weeks.
Attachments
L298D_Motor_Drive_Board_Application_Note.odt
(871.45 KiB) Downloaded 99 times
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

Sitrep

Using the A/D Converter shown at viewtopic.php?f=15&t=106#p1590 and the circuit attached, I have now managed to digitise the output of the Actuator pot; see the results file which was generated as I manually pushed the Actuator shaft in and out. In fact the Motor Drive Board wasn't powered at the time.

Note that in the results, only Analogue Input 0 (Chan 0) is connected to the pot in the Actuator and the other 3 are grounded. Notice that Chan 1 seems to be reading slightly low, which results in a very small voltage value which is displayed with a large number of decimal places. That's fixable (at least in terms of limiting the number of places displayed (or logged), so I'm fairly happy that the A/D is working well.

The next step is to use the output of the A/D to control the motor to drive the actuator to a position (in percent). I've made a start and will continue tomorrow.
Attachments
results.txt
(2.33 KiB) Downloaded 98 times
Actuator_Motor_Drive_Circuit_(LM298D_Board)_V02.odg
(148.33 KiB) Downloaded 94 times
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Gate Valve Drive Electronics

Post by Penri »

Terry

I'm bound to say that the Ch0 results look very encouraging, interesting read back from Ch1, so many digits and very stable!


Penri
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

Sitrep 2:

I now have a program that monitors the position of the valve and drives the motor to achieve the required position.

However, I have a problem at the moment, because the spring on the actuator tries to return the shaft to the closed position as soon as the power comes off, so the motor simply 'chatters' around whatever position it settles at. Of course in situ, the motor movement is restricted by the stiction in the valve itself, so it will probably work, but I need to get hold of the fully assembled valve to try it.

I don't really like relying on the stiction to make it work; what happens if the stiction lessens as the valve ages or gets lubricated by the water. Unfortunately, I can't really see what else I can do at the moment.
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Gate Valve Drive Electronics

Post by Penri »

Hello Terry

There's a fully assembled valve in the poly tunnel at WMT available for you to use.

The valve stiction, how it may change over time and vary from valve to valve are all unknowns I'm afraid. None of these factors are spec'ed by the supplier (as far as I know), and I doubt whether they would guarantee anything as it's not a factor for them when these things are used as they intend them to be, ie manually.

What we'll do is set up an accelerated life test rig, careful measure the before and periodically measure the impact of wear.

I have noticed that tightening and loosening the 4 bolts that hold the assembly together has an impact on the manual force required to actuate the valve, particularly the initial opening after a period of rest. I haven't characterised this required force against nut/bolt torque as the actuator appears to have no problem in overcoming it.

It was the spring's tendency to extend the rack that prompted me to ask about the possibility of using PCM the drive the motor, if that proves necessary, to balance the motors torque against he spring's closing force. The stiction removed that need, at least for the moment.

For me we need to get some pratical experience of using the valve in anger, particularly with an accelerated life rig and see what happens.


Hwyl

Penri
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

Penri wrote: 14/11/2018, 15:06There's a fully assembled valve in the poly tunnel at WMT available for you to use.
I'll pop in to WMT later today and collect it.
Penri wrote: 14/11/2018, 15:06The valve stiction, how it may change over time and vary from valve to valve are all unknowns I'm afraid. None of these factors are spec'ed by the supplier (as far as I know), and I doubt whether they would guarantee anything as it's not a factor for them when these things are used as they intend them to be, ie manually.

What we'll do is set up an accelerated life test rig, careful measure the before and periodically measure the impact of wear.

I have noticed that tightening and loosening the 4 bolts that hold the assembly together has an impact on the manual force required to actuate the valve, particularly the initial opening after a period of rest. I haven't characterised this required force against nut/bolt torque as the actuator appears to have no problem in overcoming it.

It was the spring's tendency to extend the rack that prompted me to ask about the possibility of using PCM the drive the motor, if that proves necessary, to balance the motors torque against he spring's closing force. The stiction removed that need, at least for the moment.

For me we need to get some practical experience of using the valve in anger, particularly with an accelerated life rig and see what happens.
I agree with your point about the use of an accelerated life rig; it will help us understand what the long-term issues might be.

Perhaps we should torque set the bolts on the valve, to make them more consistent?

Adding PWM isn't a problem, if it proves to be necessary.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

Sitrep3:

I collected the fully assembled valve and tried it out. It works (kind of) but spends a lot of time hunting around the required position before it finally hits on a value that is within the limits. The trouble is I have to set the limits ridiculously wide for it to eventually settle. Not what we want at all.

As suspected, the problem seems to be related to the speed that the motor is driven. Being interpreted, Python is a bit slow to do successive measurements so it overshoots and then the motor has to reverse..... I don't want to convert the program to C because that makes it a bit difficult for non-programmers to follow, so the answer therefore is to implement the PWM function, as we originally suspected we might need to. I reckon that if we run the motor at around 50% PWM, we should slow the motor substantially, so the program should then be able to 'catch' the right value as the shaft goes through it.

I'll have a look into this tomorrow.
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Gate Valve Drive Electronics

Post by Penri »

I've produced simplified models of the component parts of the drive electronics (apart from the USB/Ethernet dongle) and played around with the layout. I've been attempting to keep the baseboard within the profile of the valve assembly and allow enough room for wiring and potentially a connector / connector strip

The attached is a drawing taken from that activity, I'm going to produce a cardboard version of the base board and see how it fits on a real valve before making up a prototype on a plastic sheet to try with real components.
Attachments
Valve control sub-assembly Drawing v2.pdf
(101.15 KiB) Downloaded 88 times
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

I've only had time for a quick look at your models, but have some comments:
  • You have drawn the model with the Motor Drive Board at the top. Is that the orientation that you intended? It seems to me that it would be logical for the Motor Drive Board to be at the bottom, since that is where the actuator will be. This would reduce the number wires that have to crossover.
  • You mention the use of a connector strip. Did you have any thoughts on what form that should take? If you look at the latest (prototype) circuit of the Gate Valve Assy, you will see that apart from bringing in the 12 V to the DC-DC Converter, we will also have to make provision for two connections each to the Pi 0 V and 3.3 V pins.
  • In the final version of course we will also have to bring in the Ethernet. How did you intend to accommodate the Adaptor?
I have attached the latest version of the circuit, which includes the proposed provision for PWM. I have to go out now, but expect to test the PWM and tidy up the code later today.
Attachments
Actuator_Motor_Drive_Circuit_(LM298D_Board)_V02.odg
(147.41 KiB) Downloaded 86 times
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Gate Valve Drive Electronics

Post by TerryJC »

OK. I've been thinking about how we should / could assemble this; particularly with reference to the wiring. The prototype has been wired using the standard jumper cables sold for use with breadboards and for interconnecting GPIO pins and other devices that have the same terminations. The latter type (female-female), look like this:
Jumpers_F-F.png
Jumpers_F-F.png (51.09 KiB) Viewed 1302 times
These are very good for connecting the Pi's GPIO pins to the A/D Board's connections, (they form quite a robust block when adjacent pins are connected), but not so good for connecting to the Motor Drive Board Terminals. However, in my workshop I currently have around 40 plus of these and a similar number of male-male types. I also have around 100 male-female types, so we can interconnect most things by using the male end in the screw terminals on the Motor Drive Board, etc.

The main problem with these is that they are 30 cm long and we also have to include four discrete resistors to protect the GPIO outputs, plus the commoning of the power supplies.

It seems to me that we have a number of choices:
  1. We could use these jumpers as they are and coil up the excess cabling. We would probably need a tag strip of miniature chocolate block somewhere to cater for the resistors and commoned power supply lines.
  2. As above but with an extra piece of Veroboard instead of tag strip.
  3. We could cut the jumpers to length and use in-line splices and heat shrink to join the two ends together or to the resistors to achieve the required length. We can common up the power lines using a multiway splice.
  4. Something I haven't thought of. :)
Whatever we do, wiring is going to be quite time consuming, especially when we think that we have all of the Gate Valves and Sensor Pis to wire. One suggestion could be to draw up a Cable Loom Assy for each higher level assembly and build them on a production line process, like we used to do at work. In that case I would suggest that Method 3 above would be the best approach, since Methods 1 and 2.going to end up with lots of excess wire everywhere.

Thoughts?
Terry
Post Reply