I've got what I hope to be a simple question for all of you!

Let me preface with a little background. We are constructing an ADC circuit used in conjunction with a Raspberry PI to monitor cycles of some industrial machines. If a constant Voltage, Say Vi is sent to the machine, Vi will be returned if the machine is not in cycle, and a lesser voltage, Vo if it is.

To give a bit more detail on the machines, they are industrial plastic injection machines. They are all equipped with a small circuit which I've shown below. When the machine is not running, no current is flowing back from Vin. When the machine is running, the transistor is triggered, so some Vout < Vin is returned. Below is an image of the circuit that is used in the machine:

enter image description here Where Din and Dout are the input & output from our circuit, and Min and Mout are the raw voltages from the machine. The machine itself outputs 0V to Min when not running, and about 24V when running.

The warehouse is currently using a control system which, if we tap into the voltage differentials between the Vin & Vout to the machines, the circuit is quite simple. However, we need to remove the control system entirely so that isn't an option. We discovered that the impedance of the PI isn't enough to get accurate readings so an external voltage source is necessary for what we need, which leads us to my questions today.

Here is a drawing of the circuit which I believe should do the trick: enter image description here

where M0 - M6 represents the machines, and R0 = R1 = R2 ... = R7

A quick thing to note: the software I developed for this analyzes dV/dT to determine peaks and valleys so specific voltages are not required.

Here are my questions / concerns:

  • From Kirchoff's law, I believe the voltages sent to the machines will all be the same. Will the current be the same, or will the current draw when the machines are running throw off the other channels?

  • Does it make sense to attach Vref of the ADC to a channel from the external source?

  • Should the Analog Ground of the ADC be connected to ground of the external source?

  • Will we need to use any series references / OP Amps for this type of circuit?

Thank you in advance for any help. Please bare with me as I am EE noob (Software dude here).

  • 1
    \$\begingroup\$ How can question 1 be answered without precise knowledge about the "machines"? \$\endgroup\$
    – Andy aka
    Jan 2, 2020 at 15:03
  • \$\begingroup\$ Hey @Andyaka Thanks for the comment. I edited my post with a bit more detail about the machines. Please let me know if that's sufficient. \$\endgroup\$ Jan 2, 2020 at 15:17
  • \$\begingroup\$ I don't have the schematics handy either. \$\endgroup\$
    – Andy aka
    Jan 2, 2020 at 15:33
  • \$\begingroup\$ From your explanation, when the machine(s) are not running, they present an open circuit (I might be wrong here - needs clarification) , so you will need to provide pull resistors (I would probably use pull-down). As the source impedance directly affects measurement rate, a bit more information about the output stage of the machine would be useful. \$\endgroup\$ Jan 2, 2020 at 15:34
  • \$\begingroup\$ Hey @Andyaka I've found the schematic I had and edited my post with that. Does this help? \$\endgroup\$ Jan 2, 2020 at 15:58

1 Answer 1


Based on the circuit provided, the machine output looks like this except for the resistor:


simulate this circuit – Schematic created using CircuitLab

You will see that this is an open circuit if the output transistor is off without the resistor present (the resistor is necessary as we will see).

The circuit functionality is quite simple; if the machine is running, there is no current in the output transistor (or in the opto) but the base of the output transistor has been pulled up by the capacitor - measuring this with some instruments might read the value at Din, but for an ADC we need to develop a voltage so I have added a resistor for that purpose.

Adding this resistor will tend to discharge the base capacitor giving known behaviour.

The operation now is:

If the machine is off, Dout is 0V (or very close to it) and if the machine is on (transistors are conducting) Dout will be approximately Din - 1.4V.

Using a 1k resistor will likely work (and you will not need the series resistor although a perhaps 10 ohm in series might be prudent).

The capacitor across the opto also reduces any noise across the device and acts as a glitch filter for the output transistor.

So if you add a pulldown resistor and make your series resistors 10 ohms, the operation is now very simple.

V(ADC) ~ 0V: machine is off V(ADC) ~ Din - 1.4V: machine is on

Note that the ADC will not output 00 for 0V in (from the datasheet) so I would look for any value below 100 (decimal) for machine off as the capacitor may not completely discharge through the base emitter junction of the output transistor; the machine on voltage will vary with temperature and may be as much as 1.5V below Din.

For a 5V reference with Din = 5V (to make things simple) then when the machine is on you should read 0x2C0 or higher.

  • \$\begingroup\$ thanks for the answer, very much appreciated :) Two quick followup questions for you: The 1k pulldown will feedback to the external ground, and the 10 ohm in series will lead to the ADC channels? Second question: since this is a multi channel device, i.e. 8 machines will be monitored by the circuit, when a machine is running, will the current flowing threw the other channels be impacted by this? \$\endgroup\$ Jan 2, 2020 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.