Shop OBEX P1 Docs P2 Docs Learn Events
Best microcontroller to use? — Parallax Forums

Best microcontroller to use?

steamnutsteamnut Posts: 5
edited 2012-04-06 08:38 in General Discussion
Hello,
I need to read an analog signal and output it for later processing. Output to a monitor screen is fine as I can copy it into Excel and analyze it there. I need to record about 5 minutes of data at a rate of one point/.5 msec. I have tried a BS2 with an 0831 A/D and it cycles at 9 msec, An Arduino Uno does 8 msec and an Arduino Mega does 3 msec. So I am not there yet. Sooo, does anyone know if there is a microcontroller that will handle my needs? Any help would be appreciated!
Roger

Comments

  • LeonLeon Posts: 7,620
    edited 2012-04-05 06:08
    If you want to stick with the Arduino, there are the 32-bit Digilent chipKIT boards:

    http://www.digilentinc.com/Products/Catalog.cfm?NavPath=2,892&Cat=18

    The Uno32 is $26.95.

    A $20 LPCXpresso board will provide similar performance:

    http://ics.nxp.com/lpcxpresso/~LPC1114/

    They are a lot faster than the 8-bit Arduinos, and should achieve the required performance. Both have 10-bit ADCs.
  • Mark_TMark_T Posts: 1,981
    edited 2012-04-05 06:31
    "Best" could mean many things: cheapest, fastest to get working (depends on your prior experience), lowest power consumption, smallest board area, most radiation hardened, aesthetically most pleasing (!), most likely to still be available in 40 years time....

    As for speed issues - is the bottleneck a baud-rate thing?
  • steamnutsteamnut Posts: 5
    edited 2012-04-05 06:36
    I hadn't thought of the baud-rate thing but that is a good point--is there some way I can test it?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-05 06:57
    What kind of resolution does the ADC need to be?

    Hanno uses an ADC08100, an 8-bit parallel ADC, to read a video signal.

    It could easily read 2,000 times a second. The data could then be written to a SD card.

    I'm sure there are other ADC that could do what you want, I just thought I'd share my limited knowledge.

    (I've use an ADC08100 myself in this project.)

    A Propeller (the best microcontroller) could interface with the ADC and write the infomation to the SD card.

    I think a delta-sigma solution would also work which just requires a few passives (I don't know much about this). Phil has used delta-sigma ADC to read a NTSC signal with the Prop here and here.

    You'll still need some way to log the data if you use delta-sigma ADC. Besides the SD card option, you could send the data directly to a PC and have the PC record it. Phil has a program that lets a Prop update a csv file on a PC.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-04-05 08:27
    Overall, the Propeller clocks significantly faster than any Arduindo and always will. But many of the aspects of signal processing that you mention are vague.
  • al1970al1970 Posts: 64
    edited 2012-04-05 12:41
    Hi Roger:

    If your data point is 1 byte wide then a PIC 16f887 can do what you want. They have built in ADC. You can also write a program to record to a SD card; all using just the one chip.

    Al


    steamnut wrote: »
    Hello,
    I need to read an analog signal and output it for later processing. Output to a monitor screen is fine as I can copy it into Excel and analyze it there. I need to record about 5 minutes of data at a rate of one point/.5 msec. I have tried a BS2 with an 0831 A/D and it cycles at 9 msec, An Arduino Uno does 8 msec and an Arduino Mega does 3 msec. So I am not there yet. Sooo, does anyone know if there is a microcontroller that will handle my needs? Any help would be appreciated!
    Roger
  • LeonLeon Posts: 7,620
    edited 2012-04-05 13:08
    Overall, the Propeller clocks significantly faster than any Arduindo and always will. But many of the aspects of signal processing that you mention are vague. A Pentenium chip can clock even faster, has loads of memory, and handle up to 64 bit. What is the frequency range of that analog signal = audio, video, UHF, or radar?

    It's one point every 500 us, which is actually quite slow.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-05 13:08
    A Propeller can do what you want. It can do sigma-delta analog to digital conversion fast enough with only a couple of passive components added. You need to store about 0.6MB of data. That could be stored directly on a PC compatible SD card or you could use a 1MB flash chip that gets dumped later to your PC for analysis.
  • steamnutsteamnut Posts: 5
    edited 2012-04-06 04:11
    Thanks for all the responses. I am looking to measure pressure in a steam engine cylinder to tell what is exactly going on (power, flow blockage, etc.) This is a link to my steam powered trike one minute video that I am going to use it on.
    http://www.youtube.com/watch?v=CS7NCaUa8M8

    A couple of things mentioned in the responses triggered my solution. I had an SD card shield for the Arduino but hadn't gotten around to playing with it. So I tried it with a uno and I get a reading every 400 usec so it fits my needs. Plus I don't have to have the computer on board so that is a huge plus. That said, I am building a new engine and will need a reading every 150 usec so will have to go to some of the other solutions.

    To answer some of the questions. The signal varies from DC to a max of 60 hz in the new engine and I would like 100 readings per cycle. 8 bit resolution is fine. I appreciate all the solutions offered and am looking forward to experimenting with them.

    Roger
  • steamnutsteamnut Posts: 5
    edited 2012-04-06 05:48
    One other problem I seem to have is that I am saving the data to a .txt file and when I try to open the file in Excel, I get a "File not loaded completely" message and only the first 65536 points are entered. Anyone have an idea how to load the entire file?

    Roger
  • steamnutsteamnut Posts: 5
    edited 2012-04-06 08:16
    Well, I found one solution to the problem--go to my wife's computer and use Excel 2010 which she has installed.
    Roger
  • LeonLeon Posts: 7,620
    edited 2012-04-06 08:38
    I use Open Office Calc and 65536 is the maximum number of rows you can have in a single spreadsheet. Excel 2003 was the same. Excel 2010 can have over 1 million, apparently.
Sign In or Register to comment.