Author Topic: 20mV DC to ~5V DC  (Read 4736 times)

0 Members and 1 Guest are viewing this topic.

Offline SauliusTopic starter

  • Newbie
  • Posts: 9
  • Country: lt
  • Green green green green....
20mV DC to ~5V DC
« on: January 05, 2016, 11:33:37 pm »
Hello, Very green electronics guy here XD

Can I use some opamp to boost 20mV signal to 5V and than send these 5V directly to an arduino? If yes do you have any suggestions for what opamp would suit best for this application? Or maybe I should use an inamp or some other device?

Thanks
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: us
  • takin' it apart since the 70's
Re: 20mV DC to ~5V DC
« Reply #1 on: January 05, 2016, 11:40:38 pm »
Can I use some opamp to boost 20mV signal to 5V and than send these 5V directly to an arduino?

Of course you can... in general.

If yes do you have any suggestions for what opamp would suit best for this application? Or maybe I should use an inamp or some other device?

Unfortunately, you have told us nothing about your application, so it's hard to make a circuit recommendation. What is the signal source? Is this a differential signal? What is the source impedance? What frequency range and bandwidth are we talking about? Does it need to go to DC? What are your noise requirements?

Wiring up an ordinary, cheap (or fancy, pricey) opamp (or maybe better, two) for a total of 250x gain is not a big deal, but it might not work for your app, depending...
« Last Edit: January 05, 2016, 11:45:28 pm by djacobow »
 

Offline bugs

  • Contributor
  • Posts: 31
  • Country: 00
Re: 20mV DC to ~5V DC
« Reply #2 on: January 05, 2016, 11:48:44 pm »
I think you have to be a bit more specific. What is the application? What is the signal or sensor you want to use? What do you want to do with it? What is your power source / what voltages do you have?
Perhaps you already know some part numbers?

What you now ask is the equivalent of: What tires do I need for my car, it's red. :)
 

Offline SauliusTopic starter

  • Newbie
  • Posts: 9
  • Country: lt
  • Green green green green....
Re: 20mV DC to ~5V DC
« Reply #3 on: January 06, 2016, 02:15:14 am »
I think you have to be a bit more specific. What is the application? What is the signal or sensor you want to use? What do you want to do with it? What is your power source / what voltages do you have?
Perhaps you already know some part numbers?

What you now ask is the equivalent of: What tires do I need for my car, it's red. :)

Thanks for reply,

The signal is from the force gauge. After certain force threshold is reached the signal jumps from 0 to 20mV and stays at 20mV until the force goes down below the threshold, than the signal drops back to zero again.
It's going to be used in the laboratory press to control the applied force.
 

Offline Falcon69

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: 20mV DC to ~5V DC
« Reply #4 on: January 06, 2016, 02:19:28 am »
i am guessing this is part of his other thread "A simple delay circuit".  Someone in that thread mentioned to him that he should use an MCU like an Arduino or something. Perhaps changing the 20mV to ~5volt is easier to interact with the Arduino?

 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Re: 20mV DC to ~5V DC
« Reply #5 on: January 06, 2016, 02:27:16 am »
The signal is from the force gauge. After certain force threshold is reached the signal jumps from 0 to 20mV and stays at 20mV until the force goes down below the threshold, than the signal drops back to zero again.
It's going to be used in the laboratory press to control the applied force.
Sounds like a job for a comparator.
« Last Edit: January 06, 2016, 02:31:07 am by AlfBaz »
 

Offline bugs

  • Contributor
  • Posts: 31
  • Country: 00
Re: 20mV DC to ~5V DC
« Reply #6 on: January 06, 2016, 08:47:52 am »
We are getting closer :) Do you have a part number for the pressure gauge?
Having a 20mV on-off signal sounds strange. Perhaps it is an open-collector? Did you try a 10k pullup to 5v on it?
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10220
  • Country: nz
Re: 20mV DC to ~5V DC
« Reply #7 on: January 06, 2016, 08:58:56 am »
I guess if you had an 'Arduino Mega 2560' you could put the ADC into differential mode with the gain set to x200.
Then feed the signal straight into the arduino with no opamp or anything.
Might need a voltage divider as well. Im not sure how well differential mode works at the rails.

Also not sure if the arduino library supports changing the adc gain.
« Last Edit: January 06, 2016, 09:01:27 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline andybarrett1

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
Re: 20mV DC to ~5V DC
« Reply #8 on: January 06, 2016, 08:23:23 pm »
If the 20mA is just a simple on/!off control why not use it to saturate a transistor

2n2222 or maybe even a fet 2n7000

 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: 20mV DC to ~5V DC
« Reply #9 on: January 06, 2016, 09:07:01 pm »
Are we quite sure that the sensor isn't a 4-20 mA loop device?

At any rate, if the sensor signal is indeed just going from 0 to 20 mV, then it is trivial to implement this using a LM358 op-amp as comparator.  Feed the op-amp with regulated voltage from a 78L05 regulator. Make a voltage divider of 100K and 401R, from Vreg to Gnd, and feed the 20 mV reference signal from this divider into the inverting input of one of the op-amps in the 358. Feed the sensor signal voltage into the non-inverting input. The output will then flip from Low to High when the input signal exceeds the reference voltage from the divider. This output signal can then be read easily by the Arduino, using either an analog or digital input pin. Then the Arduino can do whatever is needed as far as switching mosfets or transistor+relay or whatever.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1960
  • Country: us
Re: 20mV DC to ~5V DC
« Reply #10 on: January 06, 2016, 10:01:40 pm »
You started out asking for a simple delay.  Everyone starts out saying they want a
to device to just do this.  I have a simple pholosiphy, The customer is always wrong.
This is not to be rude, the customer just does not see the total system.  Tripping
at 20mv sounds simple, but on that signal there is noise. Amplifying that signal allows
you to filter out higher frequency noise and get a voltage level a microprocessor can
use. Averaging over several A/D readings gives a more reliable value.  Any amplifier
offset can be subtracted out in software and the range can be linearized if that is
needed. Latching, delays and timed periods are easily set up in software.  More important,
they are easily changed when what you thought you wanted isn't what you wntede at all.
What you appear to want isn't simple.  Those here that are capable of doing an all hardware
design are unlikely to put that much effort into giving a turnkey design. Learning to
write some simple Arduino software is your best chance of completing this project.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: 20mV DC to ~5V DC
« Reply #11 on: January 06, 2016, 10:26:51 pm »
While I agree with most of that... here's some evidence that the LM358 can do the trick.

Without even using a trimmer, just fixed resistor values in the divider for the inverting input of the LM358N, I was able to achieve the results below, highly repeatable.

Fluke DMM indicates "signal" voltage (from PSU through another divider). Discriminability is OTOO 0.2 mV, hysteresis about the same. A more accurate tripping closer to 20.0 mV can be achieved by using a trimpot finely to adjust the setpoint divider, if actually needed.

(Pay no attention to the green paper. It is covering up another circuit on the same breadboard, not in use or powered for this test.)
« Last Edit: January 06, 2016, 10:36:51 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: 20mV DC to ~5V DC
« Reply #12 on: January 07, 2016, 12:11:05 am »
Here, I give you this for nothing. What can I say... it works. At least it does what I think Saulius wanted in that other thread.  :-//

The sketch waits for the signal at Pin 7 to go from Low to High ( connected to the Output of the LM358n comparator) then it pulses an output for 100 ms (or whatever length of time is desired) then pauses for one second (or whatever) then pulses the output again, and goes back to waiting for another transition from Low to High on the comparator output.

Code: [Select]
/*---------------------------------------------------------------------------//
   simple timer program to work with LM358n comparator circuit
   to trigger relay or mosfet when 20 mV signal level is reached
//---------------------------------------------------------------------------*/

int relayOn = 100;  // set relay ON time in ms here
int pause = 1000;  // set pause in ms between relay actuations here

void setup() {
  pinMode (10, OUTPUT);   //  connect relay driver or mosfet Gate here
  pinMode (7, INPUT);        //  connect Output from comparator here
}

void loop() {

  while (digitalRead(7)==LOW) {
    // do nothing, wait for signal to go HIGH
  }
 
  // when signal goes High, actuate relay for relayOn time
  digitalWrite(10, HIGH);
  delay(relayOn);
  digitalWrite(10, LOW);
  delay (pause);  // pause
  digitalWrite(10, HIGH);  // actuate relay again for relayOn time
  delay(relayOn);
  digitalWrite(10, LOW);
 
  while (digitalRead(7)==HIGH) {
    // do nothing, wait for signal to go LOW again to reset cycle
  }
}

 :popcorn:
The easiest person to fool is yourself. -- Richard Feynman
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf