Author Topic: Driving electric motor from pressure sensor reading  (Read 6386 times)

Offline rschultz

  • PLUS+1 Novice
  • *
  • Posts: 3
  • Karma: +0/-0
Driving electric motor from pressure sensor reading
« on: May 10, 2018, 09:52:20 PM »
I just entered the world of Plus+1 programming and I'm needing some assistance with a code.

Does anyone have an example of how to turn an electric motor bi-directionally based off the reading of a pressure sensor. This would be for an application such as actuating a butterfly valve - As the pressure increases the motor turns one direction, and as the pressure decreases the motor turns the opposite direction.
I'll be using a 0-14psi sensor and a 12vdc motor...I don't think the Danfoss pressure sensor (hardware) blocks in Plus+1 will work for my application.

Any insight and/or direction would be super helpful. Again, I'm a total rookie when it comes to programming.

Thanks!

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: Driving electric motor from pressure sensor reading
« Reply #1 on: May 11, 2018, 08:12:01 PM »
Unfortunately, if you're starting from the beginning there's really no way to just jump into developing your application; you really need to attend the training class or do some self training.  My recommendation if you aren't getting training is to go to page 502 of the user manual.  There's a little tutorial in there to get you started.  If training is an option then you'll want to contact your local distributor.
Controls Engineer
Hydra-Power Systems

Offline rschultz

  • PLUS+1 Novice
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Driving electric motor from pressure sensor reading
« Reply #2 on: May 11, 2018, 09:06:44 PM »
Hey Tom,

Thanks for the response. I recently completed the Fundamentals training a couple of weeks ago, and I will be attending the Advanced training next month. The Fundamentals training seemed to focus mostly on the user interface and functions. I understand the user interface and I can understand most of the functions (Plus1 online help is quite useful.) It's my lack of experience with electrical mumbo jumbo that is hindering me. I have a mechanical background and don't have much experience when it comes to electronics and programming.

I've started programming my application and I'm to a point where I'm stuck. Basically, I have a 0-10000 in .01% output from a 2 Pt sensor and I need to get that converted or tied to a voltage to turn a motor. I know it's silly and amateur and I probably sound like an idiot, but I can't wrap my mind around what I need to do with the sensor output percentage.
I find it far more helpful to ask for help than wasting time trying to figure out a whole new world on my own.
I'll keep playing around with it, but if there's any assistance out there, I'd gladly take it.

Offline niteRider

  • PLUS+1 Developer
  • ***
  • Posts: 45
  • Karma: +3/-0
Re: Driving electric motor from pressure sensor reading
« Reply #3 on: May 11, 2018, 10:04:40 PM »
You need to determine what your Target pressure needs to be, and use that value (converted into the 0-10000) as the target (setpoint) to a PID block.  You then use the current value of the pressure sensor as the feedback to the PID and the PID output feeds into a PWM driver on the output to drive the motor.

Assuming that there is a 'target' pressure that you can correlate to how much drive you want to send to the motor, that is...