caramoan tour package

caramoan tour package

Author Topic: how to utilize Analog-to-Digital Converter Module of a Microcontroller ?  (Read 10177 times)

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
If the opamp config is single supply and the non-inverting input reaches near zero, the output will have an error.
To solve this the input ground will be raised to 1.65V.
ah ok.. kelangan ko lang pala ng DC offset.. ahihihi  :D
and again, thanks zerow1ng!

problem ko ngayon is yung actual opamp..  :'(
maganda yung specs nung LMV358, particularly yung output voltage swing nya
almost near na sa supply (unlike sa iba na, i think, 1 diode drop less sa supply)..
sana meron opamp na kapareho (or better pa) nito sa office namin para maipuslit ko.. hehe  ;D
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum


Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
You're welcome.
Search for rail-to-rail opamps. This is the term used.
Or if you could not find one, you could use a normal opamp but your input be limited to + swing to VCC-0.7V.
The Cebuano Geek

Philippine Electronics Forum


Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
You're welcome.
Search for rail-to-rail opamps. This is the term used.
Or if you could not find one, you could use a normal opamp but your input be limited to + swing to VCC-0.7V.
hmm,, wala kaming available na rail-to-rail opamps..  :'(
tatlo lang yung opamp candidates na pagpipilian ko:
MC33272A
TSM103W
MC33074A
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum


Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
You're welcome.
Search for rail-to-rail opamps. This is the term used.
Or if you could not find one, you could use a normal opamp but your input be limited to + swing to VCC-0.7V.
kahit siguro hindi rail-to-rail opamps ang gamitin..  ???
naisip ko kasi na instead i-connect yung supply ng opamp sa 3.3V,
iko-connect ko na lang sya before nung 3.3V linear regulator..
ang gamit ko nga palang power supply is yung lumang nokia charger (i think it's around 6V output)..
ang worry ko lang is yung output ng charger (w/c is a SMPS type),
expected ko na mataas ripple ng output voltage nun,
baka magkaproblema ako ng noise sa output ng opamp ?  ???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Philippine Electronics Forum


Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
kahit siguro hindi rail-to-rail opamps ang gamitin..  ???
naisip ko kasi na instead i-connect yung supply ng opamp sa 3.3V,
iko-connect ko na lang sya before nung 3.3V linear regulator..
ang gamit ko nga palang power supply is yung lumang nokia charger (i think it's around 6V output)..
ang worry ko lang is yung output ng charger (w/c is a SMPS type),
expected ko na mataas ripple ng output voltage nun,
baka magkaproblema ako ng noise sa output ng opamp ?  ???

pwede na siguro RC filter yan. Connected sa output ng op-amp.
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Philippine Electronics Forum


Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
pwede na siguro RC filter yan. Connected sa output ng op-amp.
well, audio frequencies lang naman target ko..
yung mga SMPS charger nag-ooperate ata around 100kHz..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
kahit siguro hindi rail-to-rail opamps ang gamitin..  ???
naisip ko kasi na instead i-connect yung supply ng opamp sa 3.3V,
iko-connect ko na lang sya before nung 3.3V linear regulator..
ang gamit ko nga palang power supply is yung lumang nokia charger (i think it's around 6V output)..
ang worry ko lang is yung output ng charger (w/c is a SMPS type),
expected ko na mataas ripple ng output voltage nun,
baka magkaproblema ako ng noise sa output ng opamp ?  ???

No ripples. Opamps configured as unity are self regulating via the negative feedback.
On unity gain the input=output always, even the supply voltage is unregulated.
Check this on a simulator and add a ripple voltage even at 2Vpk-pk on your supply.
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
i'm planning to use this opamp: TSM103W
http://www.alldatasheet.com/datasheet-pdf/pdf/25537/STMICROELECTRONICS/TSM103A.html
and plan ko rin na instead na maglagay pa ng offset sa input,
isang buffer opamp lang gagamitin ko..
then yun remaining opamp with 2.5V internal ref.
gagamitin ko rin as voltage refference ng ADC ko..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
i'm planning to use this opamp: TSM103W
http://www.alldatasheet.com/datasheet-pdf/pdf/25537/STMICROELECTRONICS/TSM103A.html
and plan ko rin na instead na maglagay pa ng offset sa input,
isang buffer opamp lang gagamitin ko..
then yun remaining opamp with 2.5V internal ref.
gagamitin ko rin as voltage refference ng ADC ko..

How would you read AC voltages without offset on the input?
Only the positive swing will be plotted.

Or maybe I don't get what you want to do... can you post a schematic?
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
How would you read AC voltages without offset on the input?
for testing purposes lang muna..
DC (and pulses) lang muna ang ita-try ko i-display sa DIY oscilloscope ko..
for now, I just want to see the actual combined resolution ng ADC ng Pic saka nun nokia LCD..
later na siguro yung AC signals..
saka, wala naman akong pang-generate ng AC signals..  :'(
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
later na siguro yung AC signals..
saka, wala naman akong pang-generate ng AC signals..  :'(
off-topic:
ano ang simpliest way/circuit para makapag-generate ka ng AC signal using single positive supply???
yun sanang nasa audio frequency range ang output..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
You could use inverting but will give a gain of 2. 
Code: [Select]
                +-------+
                |       |
               1M       |
                |  |\   |
Scope IN+o---1M-+--|-\  |
                   |  +-+--o To ADC
                +--|+/ 
                |  |/   o VCC             
                |       |
                |      1M
                |       |
                +-------+----+
                        |    |
                       1M   1uF
                        |    |
                       GND  GND

This will have high value feedback on the opamp and may cause instability or can be disturbed by EMI.
My previous 2 opamp schematic, in my opinion, is the right solution.

The Cebuano Geek

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
off-topic:
ano ang simpliest way/circuit para makapag-generate ka ng AC signal using single positive supply???
yun sanang nasa audio frequency range ang output..

pwede siguro yung wien bridge oscillator, gamit ng ordinary op-amp noninverting configuration with a gain of 3 and uses i think 2 capacitors and 2 resistors sa feedback to set the frequency of the output sinewave. Ideal yan for low freq.

Basa oscillator circuit projects using op-amp, yan ginagawa ng mga students, so i think ok na yan  :)
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
My tagalog really sucks.   :(
I have not understood julznc's question.
Sorry.
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
pwede siguro yung wien bridge oscillator..
parang may nakita na ako gaya nito..
pero, i think, yung output swing nito dependent pa rin sa supply..
as in kung gusto kong ng positive and negative (AC) outputs,
kelangan ko rin ng positive and negative supply..
tama ba?  ???
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
parang may nakita na ako gaya nito..
pero, i think, yung output swing nito dependent pa rin sa supply..
as in kung gusto kong ng positive and negative (AC) outputs,
kelangan ko rin ng positive and negative supply..
tama ba?  ???

tama po
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
parang may nakita na ako gaya nito..
pero, i think, yung output swing nito dependent pa rin sa supply..
as in kung gusto kong ng positive and negative (AC) outputs,
kelangan ko rin ng positive and negative supply..
tama ba?  ???

You can but its no need. Just put a capacitor in series and you will have a negative swing.
The Cebuano Geek

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
My tagalog really sucks.   :(
I have not understood julznc's question.
Sorry.
i was thinking na mag-raise ng question in pure english,
kaya lang baka lalo kayong malito..
kaya tag-lish na lang..

fyi: muntik na kong magkaron ng failing grade nung colege dahil sa subject na English 1.. hehe  ;D
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline 'yus

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4251
  • Pogi/Ganda Points: 299
  • Gender: Male
  • hw -> fw -> sw
    • yus' projects
You can but its no need. Just put a capacitor in series and you will have a negative swing.
ah yung capacitor will serve as decoupling para matanggal ung DC component..
e di mas madali pala, on my part, na mag-generate na lang ako ng pulses (PWM) from another pic, and then maglalagay na lang ako ng capacitor in series dun sa output..
join  - Philippine Electronics and Robotics Enthusiasts Club - www.philrobotics.com

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
You can but its no need. Just put a capacitor in series and you will have a negative swing.

d best  :D
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Philippine Electronics Forum


 

Privacy Policy

Contact Us: elabph@yahoo.com