Shop OBEX P1 Docs P2 Docs Learn Events
5 Sensor Inputs, On/Off Button, 3 PWM Outputs- Can Stamp do it? — Parallax Forums

5 Sensor Inputs, On/Off Button, 3 PWM Outputs- Can Stamp do it?

Mech_E_TravisMech_E_Travis Posts: 3
edited 2006-12-30 14:15 in BASIC Stamp
Hello,
My company is constructing a test stand for product development. This test stand will be fully automated and run for sustained periods (3 months at a time) mostly unattended. The purpose of the stand is to test industrial hydraulic equipment. It has three basic hydraulic functions, each controlled by a Danfoss PVG120 valve section. This is a full proportional, solenoid controlled·valve. The stand also has five sensors: 2 flow, 3 temp, 2 pressure, each with 9-24V 4-20ma output. The stand will aslo be fully web connected so that the low man on the totem pole (me) doesnt have to drive out to check on it on his days off. My question is really twofold:

1.) Can I use a basic stamp to control something of this complexity? It sounds like a longshot to me, but it is going to cost 1200+ in PLC and expansion module otherwise, and would definatly be preferable to me.

2.) Even if I can't use·it to control the system,·can I rig the stamp to simulate my sensor outputs for PLC program testing (so I can do it at my desk!)?

Thanks so much for helping a Mechanical Engineer bumble through this circuit stuff.

Travis Sewell

Comments

  • James LongJames Long Posts: 1,181
    edited 2006-12-28 18:09
    I have a problem with this situation. I'm a former Automation Technician.....so I have a good understanding of the situation.

    The biggest problem is the resolution of the analog to digital conversion. When dealing with hydraulics, the pressure can get pretty high. I'm worried that the conversion would give you something like 50 psi for each bit of resolution. (I haven't calculated....but it could be that bad).

    The problem is not within the stamp....the problem is in the interfacing with it.

    I think it could be done.....but it could take much longer than the regular old brick (PLC).

    Each sensor would have to have an ADC input to the stamp (Not hard there are 8 channel ADC out there...but they read 0-5volt differential). Since these are not voltage based....they are amperage based, you would have to have a separate chip to convert the amperage signal to a digital format. There is one out there....I think Al Williams sells one. The problem is the voltage. I'm not sure how to get an amperage based signal down to 5 volts without killing the signal.

    I don't know......it sounds like a HUGE amount of work to get right.

    Your probably better off with a PLC.......

    Not bursting your bubble.....there may be someone on here that has the answers that I don't,

    James L
  • Mech_E_TravisMech_E_Travis Posts: 3
    edited 2006-12-28 18:16
    I appreciate the response. I agree that the 4-20ma sensors are a pain in the neck. Would it help if I was able to get these sensors in 0-5v output instead? I am still in the "getting ready to order stuff" stage, and this is definatly still possible.

    Also, 50 PSI resolution would not be too bad. The hydraulics we are dealing with are 2500 nom. and not of any high precision. The main reason for the sensors is to be able to shut the unit down automatically if pressure drops suddenly (burst hose) or climbs for some reason.

    Post Edited (Mech_E_Travis) : 12/28/2006 6:21:29 PM GMT
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-12-28 18:21
    Getting the 4-20mA to 0-5V isn't hard, simply drop it across a 250 resistor and feed it to the ADC for a range of 1-5V.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    StampPlot - Graphical Data Acquisition and Control
    AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
  • James LongJames Long Posts: 1,181
    edited 2006-12-30 12:49
    Martin said...
    Getting the 4-20mA to 0-5V isn't hard, simply drop it across a 250 resistor and feed it to the ADC for a range of 1-5V.
    wow.....never thought of that.....but they would have to be·some high precision resistors, to be able to figure out your end units.

    Travis.

    If the cost is about the same....you would have less trouble with 0-5v signal out.

    Micro controller·E-Stop huh. Neat idea.

    James L
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-12-30 14:15
    Actually, using the resistor is how both the loop current (4-20mA) is produced and converted to a voltage in a PLC. An non-inverting (+) input of an op-amp is fed the V signal at the sensor corresponding to the measured value, and op-amp is used to convert it to a current with a resistor on the inverting input (-). The loop current has to be sufficient to produce the same voltage drop across the resistor on (-). As signal voltage increases, current increases to maintain a balance across the 2 inputs.

    For detection, the current is sent through a resistor with a diff-amp across it. The higher the current, the higher the voltage drop.

    The nice thing about the current loop is that current is the same everywhere in the loop, so if you have 500 ft of cable, it'll be the same as 5 ft. Unlike voltage which would have a drop based on a number of things. As long as the total resistance (Rinv+Rred + Rcable) x 20mA doesn't exceed the rail voltage of the driving op-amp, it works great.

    This is why many industrial sensors use 4-20mA. Plus that 4mA can be used to excite the device too allowing a 2-wire sensor.

    It's a great example of ohm's law in action. It was meant to be discussed in the "Process Control" text, but wasn't. shakehead.gif
    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    StampPlot - Graphical Data Acquisition and Control
    AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
    1082 x 348 - 37K
Sign In or Register to comment.