Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Eliminating noise from the Netduino 2 plus - optocoupler?

netduino2 optocoupler

  • Please log in to reply
5 replies to this topic

#1 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 15 March 2014 - 10:26 PM

I built a circuit using 2 opamps, 3 CR filters (hi/lo pass), a half-wave rectifier, and a smoothing capacitor that gives me a 0-4.5v output that is proportional to the sine wave I get from a piezo ultrasonic transducer that is receiving a 40khz signal. Basically, it's a measure of distance from the transmitter.

 

I'm driving it with a 9v battery, and it works like a charm. The transducer ouputs 20-200mV and I get a clean signal all the way through, as confirmed by my scope.

 

However, when I hook up the Netduino 2 plus to the same battery, it adds a horrendous amount of ripple, right about at 40KHz, so I can't filter it out. I tried up to 1000uf capacitor across the battery, and it helped, but it's still too much - it's drowning my signal at distance. I want to read the voltage on one of the analog input pins and drive a 7-segment display. All that is working - I just need to stop stomping on my signal.

 

I think it's due to the power regulator on the Netduino, but I can't be sure.

 

I was thinking I could use an optocoupler and separate power supplies, but I discovered that, like op-amps, optoisolators have their own entire set of concepts to learn. It took 6 months just to get this far ;-}

 

Any hints on how to proceed? all I need is to take 0-4.5v from one circuit and map it to 0-3.3v in another circuit with good linearity. I'd love to stick with one battery, but I can live with two.

 

Thanks!

 



#2 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 15 March 2014 - 11:50 PM

may have figured this out. If so, this may be of use to others. 

 

Short version: use a resistor when referencing your signal to ground.

 

Long version: I am using the LM386 audio op-amp, which like many others, amplifies the differential between two inputs. When you reference one of them to ground, you create a path for signals to flow from your power supply into the op-amp. 

 

I remedied this by using a 100K resistor instead of a wire. Perhaps obvious to some, but not a noob like me.



#3 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 16 March 2014 - 07:05 AM

Can you post your circuit diagram for the analogue electronics?

 

One thing that comes to mind (7am on a Monday morning after a week off work) is whether the "ground" is the negative terminal of the battery or whether it is a virtual ground at 4.5V.

The op-amp may not like having an input tied to a power rail....

 

Paul



#4 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 16 March 2014 - 03:53 PM

It's to the negative terminal of the battery. Sorry, I don't have it diagrammed out, but parts of it that show the issue are straight out of the typical applications section of the data sheet, "Amplifier with gain=200" here http://www.ti.com/li...mlink/lm386.pdf



#5 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 16 March 2014 - 06:05 PM

Yes I think you had it right.

 

The data sheet has the +ve input connected directly to ground in one of their examples.

Also the words at the start say: "The inputs are ground referenced while the output automatically
biases to one-half the supply voltage."

 

Now I am confused about why the resistor helps. :unsure:



#6 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 16 March 2014 - 07:33 PM

I was about to suggest that it forms some sort of lowpass filter on the input, but the resistor is in the wrong place. Maybe I'll flip it tonight and see if that is equivalent.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.