PressureSensor, ADC, BS2, LED
Archiver
Posts: 46,084
hello all,
Im trying to get an LED to light with a varing intensity equivelant to the
pressure read by a pressure sensor. There will be an MPX5010DP pressure sensor,
LTC1298(AD conv.), BS2, and an LED. Ive had some help but do not know how to
put in all together. Any suggestions? I have code and circuit descriptions for
the LTC1298 to read the pressure sensor, but it just sends the info to the DEBUG
window. I also have had some examples given to me of how to vary the intensity
of an LED(though I never got any to work on my prototype board). I need to
integrate these two circuits. I need the LTC1298 program to control a program
that sends out a varying voltage to the LED. So what I need exactly is a
circuit and program for varying an LED's intensity(Detailed description and
program) and a way to combine it with my already working program and circuit for
the input(pressure sensor and LTC1298). Can someone please help me. I'll
continue to research on my own but i could use the help. I
wish I had enough experience to lend help to others but Im new to
microcontrollers, so you wont see me posting help to others(just incase youve
seen my questions, but saw no help going out in the other direction)
thanks,
gooey_lou@y...
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.
[noparse][[/noparse]Non-text portions of this message have been removed]
Im trying to get an LED to light with a varing intensity equivelant to the
pressure read by a pressure sensor. There will be an MPX5010DP pressure sensor,
LTC1298(AD conv.), BS2, and an LED. Ive had some help but do not know how to
put in all together. Any suggestions? I have code and circuit descriptions for
the LTC1298 to read the pressure sensor, but it just sends the info to the DEBUG
window. I also have had some examples given to me of how to vary the intensity
of an LED(though I never got any to work on my prototype board). I need to
integrate these two circuits. I need the LTC1298 program to control a program
that sends out a varying voltage to the LED. So what I need exactly is a
circuit and program for varying an LED's intensity(Detailed description and
program) and a way to combine it with my already working program and circuit for
the input(pressure sensor and LTC1298). Can someone please help me. I'll
continue to research on my own but i could use the help. I
wish I had enough experience to lend help to others but Im new to
microcontrollers, so you wont see me posting help to others(just incase youve
seen my questions, but saw no help going out in the other direction)
thanks,
gooey_lou@y...
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
The ADC input is in steps so your program sees those steps.
PWM output is also in steps. If you chouse to use PWM output into
an op-amp (read the app notes on the Parallax site) your output will
be 0 to 5 volts out of the op-amp.
Your task is to read up on the PWM to try that as a way to output a
signal.
Dave
--- In basicstamps@yahoogroups.com, gooey <cantyant@y...> wrote:
> hello all,
>
> Im trying to get an LED to light with a varing intensity equivelant
to the pressure read by a pressure sensor. There will be an
MPX5010DP pressure sensor, LTC1298(AD conv.), BS2, and an LED. Ive
had some help but do not know how to put in all together. Any
suggestions? I have code and circuit descriptions for the LTC1298 to
read the pressure sensor, but it just sends the info to the DEBUG
window. I also have had some examples given to me of how to vary the
intensity of an LED(though I never got any to work on my prototype
board). I need to integrate these two circuits. I need the LTC1298
program to control a program that sends out a varying voltage to the
LED. So what I need exactly is a circuit and program for varying an
LED's intensity(Detailed description and program) and a way to
combine it with my already working program and circuit for the input
(pressure sensor and LTC1298). Can someone please help me. I'll
continue to research on my own but i could use the help. I
> wish I had enough experience to lend help to others but Im new to
microcontrollers, so you wont see me posting help to others(just
incase youve seen my questions, but saw no help going out in the
other direction)
>
> thanks,
>
> gooey_lou@y...
>
>
>
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster.
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>intensity(Detailed description and program) and a way to combine it
>with my already working program and circuit for the input(pressure
>sensor and LTC1298).
first hack:
DO
GOSUB Read_pressure ' result={0 to 4095}
PWM 0,result/16,200 ' pwm duty depends on pressure
LOOP
' p0
/\/\--->|---- Vss
' 150 led
The pwm might need to be scaled into narrower range of result
pressure readings.
This program updates the pwm intensity once every 0.2 second. If you
need to the program to do much of anything else, you will have to add
external circuitry like the op-amp Dave mentioned, to hold the
intensity value while the program goes off to do those other things.
> hello all,
>
> Im trying to get an LED to light with a varing intensity equivelant
to the pressure read by a pressure sensor. There will be an MPX5010DP
pressure sensor, LTC1298(AD conv.), BS2, and an LED. Ive had some
help but do not know how to put in all together. Any suggestions? I
have code and circuit descriptions for the LTC1298 to read the
pressure sensor, but it just sends the info to the DEBUG window. I
also have had some examples given to me of how to vary the intensity
of an LED(though I never got any to work on my prototype board). I
need to integrate these two circuits. I need the LTC1298 program to
control a program that sends out a varying voltage to the LED. So
what I need exactly is a circuit and program for varying an LED's
intensity(Detailed description and program) and a way to combine it
with my already working program and circuit for the input(pressure
sensor and LTC1298). Can someone please help me. I'll continue to
research on my own but i could use the help. I
> wish I had enough experience to lend help to others but Im new to
microcontrollers, so you wont see me posting help to others(just
incase youve seen my questions, but saw no help going out in the other
direction)
>
> thanks,
>
> gooey_lou@y...
I assume you are using the LED intensity to provide visual feeback as
to the pressure.
You may wish to fiddle with the PWM command lighting an LED. It has
been some time, but I recall seeing a noticeable change over the range
of Duty = 0 to 60, but after that my eye had trouble discerning levels
of brightness.
Peter H Anderson
http://www.phanderson.com
> --- In basicstamps@yahoogroups.com, gooey <cantyant@y...> wrote:
> > hello all,
> >
> > Im trying to get an LED to light with a varing intensity
equivelant
> to the pressure read by a pressure sensor. There will be an
MPX5010DP
> pressure sensor, LTC1298(AD conv.), BS2, and an LED. Ive had some
> help but do not know how to put in all together. Any suggestions?
I
> have code and circuit descriptions for the LTC1298 to read the
> pressure sensor, but it just sends the info to the DEBUG window. I
> also have had some examples given to me of how to vary the intensity
> of an LED(though I never got any to work on my prototype board). I
> need to integrate these two circuits. I need the LTC1298 program to
> control a program that sends out a varying voltage to the LED. So
> what I need exactly is a circuit and program for varying an LED's
> intensity(Detailed description and program) and a way to combine it
> with my already working program and circuit for the input(pressure
> sensor and LTC1298). Can someone please help me. I'll continue to
> research on my own but i could use the help. I
> > wish I had enough experience to lend help to others but Im new to
> microcontrollers, so you wont see me posting help to others(just
> incase youve seen my questions, but saw no help going out in the
other
> direction)
> >
> > thanks,
> >
> > gooey_lou@y...
>
>
> I assume you are using the LED intensity to provide visual feeback
as
> to the pressure.
>
> You may wish to fiddle with the PWM command lighting an LED. It has
> been some time, but I recall seeing a noticeable change over the
range
> of Duty = 0 to 60, but after that my eye had trouble discerning
levels
> of brightness.
>
> Peter H Anderson
> http://www.phanderson.com
Interesting comment. Visual representation of pressure could be
brightness, but that is often relative to the ambient lighting.
Flashing could be more accurate, and series of flashes could offer
more accurate and more useful information.
Dave
be roughly proportional to the log of pressure:
DO
GOSUB Read_pressure ' result={0 to 4095}
' may need offset & scaling here
result = NCD result * 16 ' log conversion
PWM 0,result,200 ' pwm duty depends on log(pressure)
LOOP
' p0
/\/\--->|---- Vss
' 150 led
>You may wish to fiddle with the PWM command lighting an LED. It has
>been some time, but I recall seeing a noticeable change over the range
>of Duty = 0 to 60, but after that my eye had trouble discerning levels
>of brightness.