prop and mcp3208 combo for testing analog experiments
rwgast_logicdesign
Posts: 1,464
So i cant afford a scope just a fact of life.. i pmed beau about his prop base io scope told him what i was up to and he said that his scope isnt sufficent for my purposes.
anyways i got a few microchip mcp3208 adc's on the way. i was reading they should be able to sample up to 100khz. that seems pretty decent.. now i cant write a scope have no where near that kind of skill yet but i was thinking i could use one of these to connect to a prop and load the obex object for it. My problem is im learning about analog stuff like rc time, transforming waves, inductors all that basic stuff and my meters just suck for example rc charge times monitpred with a meter are never what the math should be. im using a 10 dollar wal mart special and a decent 35 dollar meter with a cap meter and frequency timer, but they both seem to suck lol. im wondering if these adcs and a prop could be more accurate trying to test and debug analog m. just plan on feeding the data through the props serial terminal.
anyways i got a few microchip mcp3208 adc's on the way. i was reading they should be able to sample up to 100khz. that seems pretty decent.. now i cant write a scope have no where near that kind of skill yet but i was thinking i could use one of these to connect to a prop and load the obex object for it. My problem is im learning about analog stuff like rc time, transforming waves, inductors all that basic stuff and my meters just suck for example rc charge times monitpred with a meter are never what the math should be. im using a 10 dollar wal mart special and a decent 35 dollar meter with a cap meter and frequency timer, but they both seem to suck lol. im wondering if these adcs and a prop could be more accurate trying to test and debug analog m. just plan on feeding the data through the props serial terminal.
Comments
with what values didi you do the experiments. If the RC-Time-constant is 60 seconds you should be able to measure values close to the math.
With an MCP3208 you should be able to measure faster than with a DMM. There are several MCP3208-objects in the obex. Try them and when you encounter a problem come back
posting your code and a detailed desciption of what you try to achive.
best regards
Stefan
Yes, the MCP32xx will do a 100kHz sample rate, but (anyone correct me if offbase) that is 10uS conversion time PER CHANNEL. So if you are using the MCP3208, and if you are coded to sample and convert all 8 channels, that will become 80uS conversion time for all channels. The prop overhead to handle this may not alter this time to much in PASM. That drops the max sample rate for all channels to about 12ksps. Another consideration would be the fact that none of the MCP32xx family has a sample and hold stage, and whatever is present at the time the conversion starts, that is what is digitized and can give rather misleading results. If you are not sample rate bound, a multiple input device may be sufficient, however, if you want to capture multiple inputs simultaneously, you will either have to design a sample and hold for each of the multiple inputs (with supporting control structures) or the same sample and hold with single channel MCP3201s if you need to have all the data captured on a 100ksps sample rate. By the way, this translates to a max of 50kHz frequency component allowed in to the input of the sample stage. If you exceed this, you will get some very squirlley results due to aliasing. Further while you can recreate the frequency having only two samples per cycle, for acuracy you may want many more samples. The more samples, the more accurate the impression of the input waveform. I have posted an object for multiple parallel capture in the OBEX for the MCP3201, a bit basic (version 0. release) and some improvements to make still, but it does work up to 100ksps.
As to why your bottom feeder meters do not seem to give you the results you expect, their own circuits can possibly alter the actual circuit by their presence. Consider saving and spending 1-2 hundred on a good amprobe meter. Or mid-grade Fluke. Check ebay for scopes, or even ebay or sparkfun for usb scopes that dump to your PC. There are also little projects out there that will show you how to use your sound card as a scope as well. Of course these are severly bandwidth limited, but if your just learning, they would be the cheapest way to get a scope tool for the bench until you are ready for the more expensive toys.
Finally if you are just learning (rest of ya please just hold your noses if you disagree), you can use one of the various simulators out there. There is a bit of a learning curve for these, but they will show you whay you have done, or at least close enough. Most manufactureres have free cut-downs of their commercial offerings. TI had tina, Linear Tech also offers another simulator. TI now also has taken over the virtual bench that national semi had up as well. Linux comes with a couple depending on the distro. So, no reason to buy a fortune in tools and test equipment just to learn.
@kwinn i just cant afford decent equitment at the moment i cant even afford parts. i mostly just get samples or build equitment. basically my arsenal is a propalyzer 112mhz la some dmms and a bus pirate i get by. are u telling me that the mcp3201 is a more accurate choice i can get a few of those. is there neway to tie these chips togather for more bandwith? id love to maybe build a 1mhz scope at some point
I guess tying together several MCP3201-chips would mean you would need e cog for each MCP3201 to get the speed of 100 kHz on each channel.
But again: just for learning take other values that result in a higher RC-constant and you can do it all with the MCP3208.
As you have an internetconnection there are several simulation-sofware like PPSICE, NI Multisim etc.
and a lot of things you can learn just by reading. http://openbookproject.net//electricCircuits/DC/index.html
Did you ever take a look into interactive java simulations like this? http://phet.colorado.edu/en/simulations/category/physics/electricity-magnets-and-circuits
So why does it have to be 1 MHz Scope?
best regards
Stefan
Thinking about sampling more than one MCP3201 per cog may be possible, but w/o sample and hold amps on the input, there will be a T(skew) time introduced between the first MCP on the cog and the next and so on. So it really comes down to skew for my purposes, but if that is acceptable, you could probably run more. But then you might as well go with an MCP32x2/4/8 devices.
But it has been fun when time permits me to play!!!!
MfG
Frank
Basically im really just hoping these are fast enough and accurate enough and easy enough that I can hook them up to a prop load an obex object and the serial object and test stuff then spit the data back out to the serial terminal. Can an ADC measure current also or just voltage? I really want to get into electronics and someday make a living out of lower level stuff, but im one of those people who strive to learn things and be as good as I can, and I feel like knowing how to code and knowing enough to hook a few chips together just isnt enough i need a good analog foundation too if i wanna be well rounded, id love to build a VFO to clock the propeller with but hell thats wayyy over my head!! I mean im struggling learning how to use a transistor as an amplifier right now . Since i cant afford a scope I figured id hopefully slap togather an adc with a quickstart and a serial port and make do... maybe learn a simulator.
Your electronic-knowledge has great improvement-potential. I recommend that you read things like http://openbookproject.net//electricCircuits/DC/index.html
Before trying to understand how a transistor works you should have a basic understanding of Ohm's Law.
f.e. here is a transistor simulation http://www.falstad.com/circuit/e-npn.html
As far as I have tested simulations none of them covers all aspects and the quality of the explanations is mostly only medium-level.
So I recommend whenever you encounter problems in understanding something its not your "thumbness" in 99% of all cases its the low quality of the explanation.
So just google for another simulation/explanation to get additional information that is easy to understand.
best regards
Stefan
Poor Man's Digital Oscilloscope (now with VGA option and screen capture to SD)[/h]
http://forums.parallax.com/showthread.php?130582-Poor-Man-s-Digital-Oscilloscope-(now-with-VGA-option-and-screen-capture-to-SD)&highlight=perry
the difference between that and the real world is quite a big gap though. in a book they always just give u the nubers in the real world u have to hope u can find them in a data sheet (this is not always as easy as i thought it may be) or figure it out with tools. I understand you can use a resistor to calculate the current i guess i just woondered if an adc would just read current like a dmm does. This was few years back im not saying im not a little rusty but i have the fundamentals.unfourtantelly i picked up Make: Electronics and i dont think it was the best book choice, i mean its very hands on and practical but it doesnt spend to much time on theory.
I have seen the poor mans scope. once again i dont really know its usefulness do to speed since. Im not claming i need a fast scope... i dont really know what i need i have no idea how bandwith really relates to analog dc circuits. i understand digital and that the bandwith is how many off and ons a second your circut is doing, but i have no idea how frequency and speed relate to for example an rc circiut i was hoping a scope would help me understand that.
Ill keep an eye out for the book you listed above, what about the art of electronics or even better the free http://www.allaboutcircuits.com/ do you think those would help get me a better footing in the analog realm? Im not to worried about digital I know it will just come come, I already understand quite a bit of it and have been programming for long enough. I mean if you can use sockets in C on a pc, Im sure figuring out spi and i2c isnt to much different!
That book listed above was a lucky find. Far more depth than more contemporary intro books. But yes absolutely to Art of Electronics, the allabout circuits.com link and a flood of other resources. I have personally played around and experimented with so much of both worlds simply because every medical imaging device is a complex combination of analog and digital systems all performing in a specific and critical function to produce a diagnostically usefull image that is acceptable to a radiologist. You can not be a digital or analog only type to service and support these systems.
But absolutely go back to the basics from AC/DC including network theory, so that you can not only gain an understanding of gain, offset, bias, noise sources and mediation, because once you have a handle on these things you can use various resources to design your own on the fly for what you want, not merely adapting what someone else has done for a "loose fit maybe". Also you will be able to use simulation more reasonably. Just like a calculator, if you don't have an idea of what you should get, then whatever you get must be correct, right? You will be able to ask more specific questions since you will already have handled the obvious......
If you want a better Volt Meter, I just posted an update on the NAU7802 in another thread.
2 Channel, 24 bits, 5V, for under $2 So16 or Dip16
http://forums.parallax.com/showthread.php?141965-High-Precision-Propeller-Sigma-Delta-ADC&p=1123481&viewfull=1#post1123481
For time-interval measurements, use the Prop.
What would u guys suggest for a simulator i used a little spice app on my phone it seemed like itd be a whole lot more usefull on a big screen something free and realtively easy to learn, the thing on my phone was so ez u jusr drag and drop meters and scopes and what not it was basically a schematic editor with test tools u droped where u wanted then u hit run off it goes.
It is std i2c, so someone might roll a register example.
They even have DIP16, for hobbyist users.
try this :
http://www.linear.com/designtools/software/#LTspice
I am not sure if you are mixing me up with someone else who responded to this question or referring to a response I made on another thread, but this is my first post on this thread. I have replied to so many of your questions (not a complaint) that I cannot recall all of them.
I would not suggest using one or multiple mcp3201's in place of the mcp3208. Both have a 100K sample/sec. limit, but the mcp3208 is much more flexible and the pinout simplifies laying out a board.
For a 1 MHz scope you would need an adc capable of at least 2Ms/sec, and for decent waveform reproduction at 1 MHz at least 5 times that. A propeller alone could not handle that high a speed of data acquisition. For audio frequencies, as a low speed logic analyzer, or low speed serial protocol analyzer the prop is a great choice
As to samples, no harm there. TI/National Semi are really great on sample parts (mostly smt these days though). And there is nothing wrong with the salvage route either. Used to scrounge parts in late 70s behind some of Silicon Valley's finest. SMT does make this route a bit harder as well...