Go Down

Topic: How to keep sensor always at same value via actuator with opamp? (Read 436 times) previous topic - next topic

tlhsglm

Hi fellows, i need a help really i stuck on electronics.

I want to make a circuit setup like in this video @1.23 https://www.youtube.com/watch?v=ta7nlkI5K5g

I'm not doing this circuit because i will make differences, these are :
I will use a TCRT1000 it is a optical sensor that gives measurement data in the range of 4 mm's.I want to set the TCRT1000 to 750.When the sensor giving 750 the voltage of the sense is 3.5 volts.The maximum point that can measure - in my setup- 850(it's about 4.1 volts).

At the very first start, previously there is no electric, when started the sensor will measure about 850(Maximum mesurement).And it will give energy to electromagnet.Electromagnet's max voltage will be 24volts or 36 volts but lets say it's 24volts.

When electromagnet powered up it will pull the beam and sensor measurement will decrease.But if the sensor measurement goes under 750 i must cut the power off of electromagnet and beam will go up so the sensor measerement will increase and when comes 750 it have to set it on 750.

So i will find the electromagnet's voltage to make it on that level lets say it is 18 volts.But when i put a mass to beam it will go up and measurement will increase.If i do a sytstem like dependent on sensor's measurement 750(3.5 volts) equal 18 volts for electromagnet and 3.6 volts equals 20 volts 3.8 volts equals 22 volts...It will never find the balance.So in measurement 750 it can give 18 volts or 24 volts to electromagnet dependent on mass.

I thought i may make a PID circuit.If i do a circuit like in this link https://www.youtube.com/watch?v=YLGLrEwEiTQ
And put a diode on first op amp's end to achieve "if it goes under 750 do nothing just wait" can i achieve what i want?

Or kindly can you give me an different idea or example link or what do i have to search?

Paul_KD7HB

You have, obviously, given this project a lot of thought. But, what have you actually gotten to work?

Paul

Grumpy_Mike

Quote
I will use a TCRT1000 it is a optical sensor that gives measurement data in the range of 4 mm's
No it is not. It is simply a reflective optical sensor designed to give a digital signal to measure if an object is in front of it.

The signal you will get from it will be subject to change depending on the reflecting surface and the ambient IR light. I also don't think the output will be linear with distance. If you want to accurately measure distance you need to use one of the "time of flight" sensors.

Are you experienced in electronics, because this is not a beginners project. Especially as you seem to be using a volt meter rather than a current meter. This implies that there is a series's resistor somewhere. If you remove it and replace it with a more appropriate one your voltages will be in a much more manageable range.

raschemmel

Quote
https://www.vishay.com/docs/83752/tcrt1000.pdf  
Quote
• Peak operating distance: 1 mm
The only comment I have is that if you watch this video and think of it as "Z",
and then read your post and think of it as "A", there is no universe where you get from "A" to "Z".

tlhsglm

No it is not. It is simply a reflective optical sensor designed to give a digital signal to measure if an object is in front of it.
Yes you are true.You know it better than me but is it effects system so much?I want to use this sensor for now because i have no tof sensor and for now i don't want to buy.But i will keep in mind thank you.
Yes i'm not beginner.Can you please answer my question at below of this message.

@Paul_KD7HB yes of course i worked for doing the PID from arduino via direct bit banging PWM.So the PID output was my pin high delay(with a couple of proving).But in that way i simply couldn't making difference on voltages and it was not effective.

@raschemmel I've renounced that now, you are right.It is depending on my changes on the post.

If i do a circuit like in this link https://www.youtube.com/watch?v=YLGLrEwEiTQ

If i put a diode on last op amp's end to achieve "if it goes under 750 do nothing just wait" can i achieve what i want?The diode because electromagnet is pulling the beam whatever it's polarity.

Grumpy_Mike

Quote
If i put a diode on last op amp's end to achieve "if it goes under 750 do nothing just wait" can i achieve what i want?
No I don't think that will work. All it will achieve is a voltage drop which will be compensated for by the rest of the circuit. It will also mess up the breaking effect of the feedback circuit. What is this 750 it is going under? I am not clear on what you mean here.

jremington

The design of the circuit in the video you linked is very poor, and not worth trying to reproduce. The video producer made it clear that he had great difficulty getting it to work correctly, and that this was just a "one off" experiment.

Using a meter movement to make a microgram balance was done much more simply, and well documented in Scientific American many years ago.

Simplest version

Better version

tlhsglm

The design of the circuit in the video you linked is very poor, and not worth trying to reproduce. The video producer made it clear that he had great difficulty getting it to work correctly, and that this was just a "one off" experiment.

Thank you for answer, what are the shortcomings of the circuit?and you talking about the pid video right?

@Grumpy_Mike
I want to set the beam in zero position and the measuremnt sensor gives me 750 on this zero position.Electromagnet pulls the beam so when it is powered the measurement sensor's value decreases.When its pulling and sensor giving value under 750, there is no need to pull just i need to stabilize it on 750.And i havent any electromagnet to push it to up.But gravity pushing it up.It's my fault to did'nt tell this the beam is like a balance beam, it have a support on middle of it.One side have electromagnet on side have mass.

Grumpy_Mike

Quote
e measuremnt sensor gives me 750 on this zero position
750 what? Things have units, what is the units of which you want 750 of them?

Using the map function you can have any range of numbers mapped to another arbitrary range of numbers. There is no need for the sensor to give you a specific number.

tlhsglm

750 what? Things have units, what is the units of which you want 750 of them?

Using the map function you can have any range of numbers mapped to another arbitrary range of numbers. There is no need for the sensor to give you a specific number.
The TCRT1000 using with arduino giving number 0 to 1023 depending onjects reflectanse as you told.When beam on highest position sensor gives 850 value via serial to arduino.When beam comes a little lower sensor giving me 750.

jremington

Quote
what are the shortcomings of the circuit?
It doesn't work.

tlhsglm

It doesn't work.
Can you please explain why because i really want to learn.i will be appreciated.

jremington

The circuit design is just plain wrong. The loop gain is far too high and there is no damping. It is not even clear what all the parts actually are, for example whether the light detector is a photodiode or phototransistor.

So, it is extremely difficult to get the circuit to balance, as the video author clearly states.

Grumpy_Mike

Quote
The TCRT1000 using with arduino giving number 0 to 1023 depending onjects reflectanse as you told.
AND as you were told this is not a distance sensor. The relationship between the reflecting distance and the voltage on the output transistor depends on many things most of which are not under your control.

The two things that are under your control is the collector current of the transistor and the amount of IR light generator.

The first is determined by the value of the pull up resistor between collector and some positive voltage and also the actual voltage you are pulling up to. The second is determined by the current you put through the IR LED, giving you more or less light.

Things you can't control is the gain of the output transistor, this will be different from device to device. The optical transfer efficiency and the temperature.

You can get the analogue to digital converter to give a 0 to 1023 reading over a distance of 10cm or down to a few mm depending on these factors. You can even get a zero voltage without any IR light coming from the device at all, and it only goes high when the sensor is shielded from all external light.

Therefore a reading of 750 can correspond to any distance at all and, by itself, is totally meaningless. Further more if you look at Fig. 8 - "Relative Collector Current vs. Displacement" in the data sheet you will that the output voltage only changes linearly with distance over the range of about 2.5 to 4.5V

TomGeorge

Hi,
What is your electromagnet?
The opto- interrupter is possibly the only way you will get it to work.

I have worked on sensors that use this principle to measure fine turn angles.
You use the very small proportional response that  the IR detector has between the slit being completely covered completely exposed to the IR Emitter.

If the  TCRT1000 has a similar response, it is for you to experiment.

Have you tried to measure the TCRT output for fine differences in distance to see if there is a  fine proportional response area?
Have you got any parts and tried to see if your concept will work?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up