How to read frequency and adjust voltage output

I have a bs2 reading 3 shaft rpms. Presently the hydraulic pumps are controlled by pwm controls with ramping. Problem is variance in output because of heat in hydraulics.
Wanting the bs2 that is already reading the rpms to output a variable .75 -1.25 vdc to keep the shaft speed consistant regardless of any load or temp changes.


  • tomcrawfordtomcrawford Posts: 1,087
    edited 2018-09-01 - 21:11:10
    You really haven't posted enough information to be able to help. A block diagram and current BS2 program would be good.

    That said, I guess the short answer would be to use a DAC or filtered pwm.
  • I'm guessing you want to make a closed loop system PID. That you want the BS2 to maintain a constant RPM. So you need a count sensor and a DAC to output the DC volts.
  • Already using Lm2907 freq to voltage on the alarms but didnt know of any way to tailer it be a control loop
  • This is new and from scratch.
    Currently the bs2 is just reading 3 mag sensors and displaying the rpm on a lcd screen. With rpm on top line and alarm point displayed beneath each output. If rpm falls below setpoint a led lights up and buzzer goes off. I am trying to include the control part to overcome the change in speed due to temperature change. The present control circuit is actually a proportional brake control circuit that i wired to just output a pwm output relative to a 20 turn pot input and included a rc circuit inline to accomplish ramping up to speed. But the fluctuations from temp are enough to change the rpm as much as 100rpm. So was hoping to just let the bs2 take the place of the pot input for the pwm brake control circuit
  • You should add a temp. senor so you can input that signal into the Bs2. This way you can program the temp. error into the code.
  • So you are currently basic open loop? The motor(s) are hard-wired to power and the ten-turn pot just controls a brake?

    I think you ought to be able to replace the pot with a DAC controlled by the BS-2. If the rpm is too high, you add more brake; if it is too low, you back off on the brake. Small steps and some hysteresis so it doesn't oscillate.

    Be sure the accuracy and precision of the sensors is adequate. Likewise the DAC.
  • Actually the pwm output just controls a suar danfoss h1 series electrohydraulic controlled variable 0-50gpm pump with the flow directly feeding a motor responsible for the shaft speed im trying to keep stable. Problem is when first engaged and hydraulic oil is cold.... the rpm is about 80-100rpm overspeed... and slowly comes down to the correct speed over 10min span... leaving the operator having to constantly adjust a knob on the console to keep it correct. Even if they just pause for a few min without load.... it changes and needs constant attention.
  • Let me clear up the confusion with brake topic. There isnt a brake. I just used an existing proportional brake control circuit as a stand alone pwm output that i could easily use a pot to get a very robust and consistent output. And added a r/c network on input to make the start and stop smoother and not drastic. The actual final voltage output controls a variable hydraulic pump swashplate providing the fluid pressure/flow to drive the motor driving the shaft.
  • If I understand what you've written, you already have a Stamp measuring the rpm for the hydraulic motor. You already have a pwm controller that allows you to adjust the hydraulic pump output with a pot, which vastly simplifies your problem. It sounds like it's a fairly well-behaved system where the rpm varies only slowly with changes in fluid temperature. You referred to the brake control as a proportional controller, so it sounds like you have some understanding of control systems.

    So all you need to do is put the Stamp in place of the operator to close the loop. You have the rpm feedback, you know what the desired rpm is so you can calculate an error value, and your hydraulic pump is controlled with a varying voltage. The problem is to calculate a correction that's proportional to the error and use that to correct the output voltage, e.g. turn the knob.

    As the other guys suggested, you can use a digital to analog converter instead of the pot to generate that voltage. You've already got the hard parts.

    Here's a place to start:

    I'm not a Stamp user, but I suspect you can find examples of projects where people have used Stamps for similar things. Incidentally, that link also discusses PID controllers. It doesn't sound like you need integral or derivative terms (the I & D in PID) so just focus on proportional control.

Sign In or Register to comment.