Comparator or Microcontroller

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
It might help if you share part/model number, specs, etc. for your current amp.
The was made 15+ yrs ago, and designed in house so the part number will not help.

What I can tell you is the amp is connected to the (-) side of the relay. The Prox sensors send a (-) to the amp when "energized".
 

ebeowulf17

Joined Aug 12, 2014
3,275
Does the amp have two inputs, one for each direction? If so, do both amps require negative signals, or only one of them? Or are there two separate amps wired to one pump?

I'm still a little unclear on what's needed. I suspect the answer is going to be the npn transistor logic inversion, but I'm not sure yet.
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
Does the amp have two inputs, one for each direction? If so, do both amps require negative signals, or only one of them? Or are there two separate amps wired to one pump?

I'm still a little unclear on what's needed. I suspect the answer is going to be the npn transistor logic inversion, but I'm not sure yet.
The Amp has two inputs, one for each direction. It runs on 12-30VDC.
 
Last edited:

ebeowulf17

Joined Aug 12, 2014
3,275
Since I'm not 100% clear on the "negative" input your amp requires, I propose a simple experiment:

Connect a wire to one of the amp inputs and then touch that wire to ground. Does that make the motor run?

If so, then you can use npn transistors, n-channel MOSFETs, etc to convert your positive signal. If not, I'm not properly understanding the nature of your inputs.
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
Since I'm not 100% clear on the "negative" input your amp requires, I propose a simple experiment:

Connect a wire to one of the amp inputs and then touch that wire to ground. Does that make the motor run?

If so, then you can use npn transistors, n-channel MOSFETs, etc to convert your positive signal. If not, I'm not properly understanding the nature of your inputs.
That is actually what I did, when I was troubleshooting. Going from ground to the amp input makes the relay close and the motor run.
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
You all might think I am hopeless at this point, but I am struggling to place an npn in the sim to work. (I decided to try and use an npn, because I purchase a pack of 5 from radioshack).
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
I am having an issue, I have this circuit hooked but when IN1 = IN2 both of my relays are closing, when I want them to open. upload_2016-2-3_9-36-17.png
If I connect the GND to the Emitter, I cannot get my switch to switch on or off, it stays on.

I am pretty confused now.
 

Attachments

ebeowulf17

Joined Aug 12, 2014
3,275
I am having an issue, I have this circuit hooked but when IN1 = IN2 both of my relays are closing, when I want them to open. View attachment 99960
If I connect the GND to the Emitter, I cannot get my switch to switch on or off, it stays on.

I am pretty confused now.
The emitters should be connected directly to ground. The "top" side of resistors R10 and R11 should be connected to your supply voltage. I'm not sure what's happening with the "RVS_RELAY" and "FWD_RELAY" markings connected to the emitters. Maybe I'm just misreading that schematic, but the connections to the npn transistors don't look right to me.
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
Update: Hooking up the transistors in the "normal" way does not seem to work. I read something about using a npn transistor with reverse biasing, I am not sure if that is what I did. the "FWD_RELAY" is the signal from the old Prox switch I am replacing.

I ended up switching the connections of the inputs to the cooperators. With those inputs switched I got rid of the overlap of an "on" condition on both outputs.

Anyway it works perfect now. I will need to tune it to find a good "buffer" zone for our applications.
 

ebeowulf17

Joined Aug 12, 2014
3,275
the "FWD_RELAY" is the signal from the old Prox switch I am replacing.
Are you saying that this is the part of the circuit that you're connecting to the amp input to drive the motor? The old proximity switches aren't still connected to the new circuit, right?

The junctions marked Out1 and Out2 were what I expected to have connected to the amp inputs. If that's not the case, that would explain why the circuit didn't work as I expected! I'm still a little confused about your schematic and about the most recent changes that made it work, but regardless I'm glad to hear that's it's working for you now. Congrats!
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
Thanks!
Ok, I have another questions for you seasoned EE, what should I look for during testing?

My plan is to hook it up to a test platform and run it back and forth. I am going to look for any overheating and reaction time. Anything else I should look out for.
 

ebeowulf17

Joined Aug 12, 2014
3,275
Thanks!
Ok, I have another questions for you seasoned EE, what should I look for during testing?

My plan is to hook it up to a test platform and run it back and forth. I am going to look for any overheating and reaction time. Anything else I should look out for.
Well, I'm not seasoned at all, so take the following advice with a grain of salt. Hopefully someone more experienced will follow up with more trustworthy answers.

My gut feeling is that this is a pretty simple circuit and there's not much to test once you've got the basic logic running the way you want.

On the other hand, the sky's the limit in terms of testing and verification depending on how critical this system is. You need to ask yourself a lot of questions if you haven't already. Does it control anything with potential life and death consequences? If it fails, can it damage other equipment, and at what cost? Is this a one-off which will always be used by someone who understands and can maintain it? Or will it be in the hands of people who just need it to work without fail? Is it going to be mass-produced? If so, manufacturing tolerances, both mechanical and electrical, need to be accounted for.

On the electrical side, what will the circuit do if one of the input wires is cut and floats as an open circuit? What if it gets grounded out? What if the sensor fails or loses power and stops putting out a voltage for position sensing? I'm guessing most, or maybe all, of those scenarios result in the pump running continuously, trying to achieve a state that can't be reached. Can the pump handle that? Does it have the necessary protections? What about the outputs from this circuit? If one of them gets shorted to ground or somehow crossed with your supply voltage, will it destroy your new circuit? I'm guessing not, but I can't say for sure since I was unclear on the output stage of your last schematic, and you've changed it since then anyway.

Do we know how much current the inputs of the amp source to the new circuit's outputs? Earlier we discussed a test in which you simply ran a wire from amp input to ground and verified that that turns on the circuit. We don't know how much current ran through that wire. You could try doing the same test, but with an amp meter to determine the load. Or you could just try connecting amp input to ground with resistors of different values to see what works. If you can activate the amp circuit with a 10k resistor, then it's a high impedance input and current won't be an issue. If you have to drop down to a 100 ohm resistor to get it to work, that indicates that it's a low impedance input that requires significant current flow to be activated, in which case you'd have to take a much closer look at the output stage of your new circuit.

The difference between finding a simple electronic solution to a problem (which you've already done) and making one that is fail-safe, idiot-proof (or at least idiot-resistant,) easy to mass produce, and tolerant of reasonable variation in manufacturing tolerances of all sorts is night and day. The list of what to check could go on, but I don't have the expertise, nor the familiarity with your application to get it right. Good luck and have fun!
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
ebouwulf17,

Thank you that is a lot of extra questions I haven't asked my self yet.

I am pretty sure we will be running 0.5 - 4.5V sensor with this system, If I could put a circuit that would turn off everything at either 0 or 5V that would be a good protection from the motor running continuously from a short or an open. I am not sure how to do that, but I am sure someone does.
 

Thread Starter

ciscoasanchez

Joined Jan 26, 2016
32
I need some more help.

As a safety precaution I only want this controller to send a signal to the relay when it has over 0.5VDC from either position sensors (the sensors work on a 0.5VDC to 4.5VDC signal). This way if a position sensor is disconnected the controller will not try to find equilibrium and burn out a hydraulic controller. I thought that using an npn would act as a low voltage switch. I thought I understood npn/pnp transistors enough to do this but I am struggling. upload_2016-2-8_14-42-57.png
 

ebeowulf17

Joined Aug 12, 2014
3,275
A few things:
1) I'm still confused about Q1 and Q2. If you're connecting the points marked Out1 and Out2 to your other circuit's inputs, then the transistors aren't reversing the logic and are probably unnecessary.
2) If you want transistors as switches where 3&4 are, you'll want PNP, not NPN (I think the relevant terminology here is high side vs. low side switching.)
3) With a variable input on their bases, those transistors will act as current amplifiers with results that I would have a hard time predicting (depends on Vf and Hfe if I remember right.) I think you need something to turn your 0.5V threshold into a crisp on/off state instead of variable gain on a transistor. The first thing that comes to mind is more comparators, but there might be a simpler/more clever way.

I don't have time to really dig into this now, but if no one else chimes in I'll get back when I can.
 
Top