Welcome, Guest
Username: Password: Secret Key Remember me
  • Page:
  • 1
  • 2

TOPIC: Simulating Analog Sensor Inputs

Re: Simulating Analog Sensor Inputs 8 years 11 months ago #15241

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 365
  • Thanks received: 352
When developing an embedded application using analog sensor inputs, testing at specific sensor levels can be difficult.  For example, in my icemaker controller project, actions need to occur at certain water levels.  Using the actual sensor and a reservoir is time consuming, requiring filling and pumping out water to check sensor points.

Fortunately, simulating sensor operation is easy.  Many sensors, including my pressure sensor, output a 0 - 5v signal proportional to the input parameter.  A potentiometer (variable resistor) can easily simulate the sensor signal.

wiper which is a sliding contact along the resistive element.  The circuit acts like a voltage divider.  If the wiper is positioned near the ground terminal, the output voltage approaches zero.  As the pot's knob is turned, and the wiper movers towards the 5v input, the wiper terminal will be at a higher voltage.

Simulating a range of sensor values is as simple as turning the knob.

 

Read full article...

Re: Simulating Analog Sensor Inputs 8 years 5 months ago #6686

i need to simulate the output of ADP5100 pressure sensor...it has an output impedance of 50ohms and the output varies from 0.45-4.5 volts...how do i do it?

Re: Simulating Analog Sensor Inputs 8 years 5 months ago #6691

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 365
  • Thanks received: 352
i need to simulate the output of ADP5100 pressure sensor...it has an output impedance of 50ohms and the output varies from 0.45-4.5 volts...how do i do it?

Simulate it with a pot exactly as shown in the article. The input impedance of a PIC is greater than 1K, so the output impedance of the pressure sensor is fine - as long as the input impedance is greater than the output impedance, you're good to go.

You could use a 1k pot with good results and measure the voltage between ground and the wiper to verify ADC readings.

Re: Simulating Analog Sensor Inputs 8 years 5 months ago #6712

  • MrDEB
  • MrDEB's Avatar
  • Offline
  • User is blocked
  • Thanks received: 14
For better accuracy Barney might I suggest using a multi turn pot instead of a single turn. Seeing how you need to go from .45v to 4.5 and assuming you want a fine adjustment.
A single turn pot might go from .45v and JUMP to .5v just inserting a screwdriver or ? to adjust.
Using say a 15 turn pot then .2v per turn is approximately what you will obtain.
Perhaps adding a resistor(pot2) from pot1 to ground, then zero pot1 and adjust pot2 for your desired .45v.
Then you have pot1 adjustable FROM .45 to 4.5v as desired.
this is all dependent on input voltage.

Re: Simulating Analog Sensor Inputs 8 years 5 months ago #6714

  • MrDEB
  • MrDEB's Avatar
  • Offline
  • User is blocked
  • Thanks received: 14
another possible idea for adjustable voltage reference
http://www.national.com/mpf/LM/LM10.html#Diagrams

Re: Simulating Analog Sensor Inputs 8 years 5 months ago #6715

  • jmessina
  • jmessina's Avatar
  • Offline
  • Senior Boarder
  • Posts: 44
  • Thanks received: 189
I think the original idea was how to do it SIMPLY, and not create another whole project just to get a variable 0-5V output to test out your code.
The following user(s) said Thank You: Jon Chandler, W4GNS
  • Page:
  • 1
  • 2
Time to create page: 0.286 seconds