How to monitor an actuator's feedback line from a microcontroller? - Page 1
Forum section: electronics / general

author: Skyland
author_rank: Contributor
timestamp: August 31, 2018, 09:01:25 am
content: the AG-020-B electric actuator is controlled from a microcontroller. Terminal 1 is connected to the DC PSU GND, Terminal 2 is connected to the +24VDC via a high side Power MOSFET(TPS22810) as shown below. This is for power saving.Low side MOSFET (AUIPS1021) Q5A and Q5B are used to control the opening/closing of the valve via terminal 3 and 4. The microcontroller I/O lines Valve_Ctrl_1a and Valve_Ctrl_1b provide a 3.3V signal.- Comments are welcome regarding the power and switching circuitry.- Any suggestion on how to monitor the feedback lines on terminal 8 and 10 from a microcontroller. A lamp is not suitable as the system will be enclosed in a box.

author: David Hess
author_rank: Super Contributor
timestamp: August 31, 2018, 09:55:15 am
content: I would use optocouplers either in place of the lamps or across the switches.

author: Skyland
author_rank: Contributor
timestamp: August 31, 2018, 10:11:09 am
content: I think that's exactly what I am looking for, I understand having an optocoupler in place of the lamps but how would that work across the switches?

author: H.O
author_rank: Frequent Contributor
timestamp: August 31, 2018, 10:20:32 am
content: QuoteWhen the switch is open the current passes thru the LED in the optocoupler. When the switch closes it shorts out the LED. Make sure you put the current limiting resistor for the LED in the corrent place so that you only short out / bypass the LED and instead of shorting out the supply.

author: David Hess
author_rank: Super Contributor
timestamp: August 31, 2018, 11:36:08 am
content: Just like H.O says. With the optocoupler wired across the switch (with a series resistor), it detects when the switch is open but presumably not enough current flows to light the lamps although that does not matter.

author: Skyland
author_rank: Contributor
timestamp: August 31, 2018, 04:01:06 pm
content: Quote from: David Hess on August 31, 2018, 11:36:08 amWould you mind drawing a diagram?Also, what type of optocoupler were you thinking of?

author: David Hess
author_rank: Super Contributor
timestamp: August 31, 2018, 05:47:07 pm
content: Quote from: Skyland on August 31, 2018, 04:01:06 pmI am not really setup for that.QuoteAny transistor output optocoupler will work. As far as the circuit goes, the optocoupler input is treated as the LED it is.

author: rstofer
author_rank: Super Contributor
timestamp: August 31, 2018, 10:32:31 pm
content: Or, put an opto between +24 and pin 8 with another between +24 and 10. In parallel with the indicators, not in series. You need to calculate a dropping resistor to limit the LED current.R = (24V - Vf) / Ifwhere Vfis the forward voltage drop of the LED and Ifis the desired LED current.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 01, 2018, 08:11:36 am
content: Something like this. Repeat for 9-10. Note output to MCU is inverted.

author: David Hess
author_rank: Super Contributor
timestamp: September 01, 2018, 11:21:14 am
content: Quote from: donotdespisethesnake on September 01, 2018, 08:11:36 amSwap the positions of the optocoupler output and load resistor for non-inverted operation.

author: Skyland
author_rank: Contributor
timestamp: September 01, 2018, 03:10:05 pm
content: Quote from: donotdespisethesnake on September 01, 2018, 08:11:36 amI assume you meant terminal 8 is +24V and 7 is GND?

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 01, 2018, 08:09:44 pm
content: Quote from: Skyland on September 01, 2018, 03:10:05 pmNo, P7/P8 is a switch, it is not polarised. I'm assuming you do not have a lamp wired in, because the system is in a box, and nothing else is connected to P7/P8.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 01, 2018, 09:50:27 pm
content: QuoteTPS22810 is not rated for 24V operation, you will need something else.Also AUIPS1021 is overkill in this application, but anyway is discontinued. I suggest looking for an alternative.

author: Skyland
author_rank: Contributor
timestamp: September 02, 2018, 09:55:30 am
content: What's overkill about the low side switch?Also, is the 1K resistor at the gate of the low side switch necessary? I've put it there to limit the current but thinking about it the MCU current is in the uA range

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 02, 2018, 02:17:38 pm
content: Quote from: Skyland on September 02, 2018, 09:55:30 amWell, how much current does it need to sink? I didn't find that info in the data sheet. Control signals are usually in the mA range, but maybe not in this case.QuoteIt's probably not necessary but doesn't hurt.BTW, I advise reading the datasheet for AG-020-B, since there are some bits in red you may want to watch out for...