Shop OBEX P1 Docs P2 Docs Learn Events
Building Scientific Instruments with the Propeller — Parallax Forums

Building Scientific Instruments with the Propeller

RJSMRJSM Posts: 68
edited 2015-06-23 00:44 in Propeller 1
For many years I’ve quietly watched these forums with great interest (and I’m yet another Aussie !!). I’ve keenly followed the development of the P1 and then the P2; the problems with the latter it seems may have led some forum members to lose interest and perhaps go elsewhere.

I’d like to echo the positive comments of others that the P1 has been and still is a fantastic development platform and this seems like the perfect time to inject something completely new into this forum.

I’m a chemical physicist with 25+ years in academia. Tiring of university life I moved into the corporate sector with a major scientific instrument company about 4 years ago. I’ve been building scientific instruments since long before the P1 was released (in fact as far back as the late 70’s/early 80’s when I was a grad student at Cornell and postdoc at Stanford) - but nearly all of my recent projects have used the Propeller chip.

In my instruments, Propeller-based hardware teams up with a LabVIEWTM PC-based front end, giving a high quality GUI. For me, the synergy of those two tools comes close to nirvana for rapid development of easy-to-use scientific instruments rivalling the performance of commercial products – but at typically 1/10-1/100 the cost. That’s potentially great news for educators with large teaching labs but small budgets.

To whet your appetite I’ve attached a couple of photos – polarimeter and potentiostat PCB's – both P1-based. Without going into any great scientific detail, the former instrument can distinguish and quantify left and right-handed molecules (for example sugars, like sucrose, glucose and fructose) while the latter accurately measures trace heavy metals like Cd and Pb at parts-per-billion levels in water samples. I've also attached pics showing the LabVIEW front panels that control/acquire data from each of these instruments.

These are just two examples from an extensive suite of analytical chemistry/test instruments I’ve designed and built using the P1. 12 months ago I had the fortunate opportunity to visit Parallax and show Ken, Andy and Stephanie what I’ve been up to.

I’m hopefully now just a couple of months away from launching a website that will put all of this information into the public domain, both to promote science and so that others may benefit from my work. The P1 is here and now and I’ve never really found it unable to do anything I’ve wanted it to – it just works, and works perfectly ! I’m very excited about a P2 in the pipeline but I’m certainly not going to enter a state of paralysis while waiting for either an FPGA image or silicon ! There are just too many projects still waiting to be tackled with what we already have at our disposal.

In the coming months I’ll use this thread to keep you posted about other P1-based scientific instruments I’ve built/am working on and also about how to access my website when it is ready. Hopefully exciting times ahead...
1024 x 1017 - 807K
728 x 748 - 295K
900 x 546 - 173K
1024 x 517 - 343K
«13

Comments

  • jmgjmg Posts: 15,145
    edited 2015-02-28 19:56
    Sounds cool, you probably should also track the good work by ozpropdev
    http://forums.parallax.com/showthread.php/160016-First-attempt-at-building-a-P1V-image-for-the-BeMicro-Max10

    out of that may come hardware that sits between P1 and P2 and would be well suited to instrument development.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-28 20:32
    RJSM

    I must say that you write very well and welcome to the forums.

    I am not a scientific type of person, but I like creative thinkers. A while back, actually several years ago, I thought about trying to interact with the prop through Lab View, because I had a temporary license from a previous employer, but I never followed through with it. It is so cool to see someone actually putting the two of them together and displaying pics. I hope to hear a lot more about your creativity and use of LabView.

    Bruce
  • RJSMRJSM Posts: 68
    edited 2015-02-28 20:56
    Bruce

    thanks very much for your comments. I've been using LV for quite some time now. While the full development environment is quite expensive, LV allows you to take your vi's and generate a runtime executable that is free distributable without any licensing fees. In the education area, that's a real bonus when budgets are often stretched.

    I'm sure you are also aware that once your data is uploaded (in my instruments via USB-to-serial interface) to the PC, LV has numerous powerful algorithms for data processing (things like Savitsky-Golay filters, FFT etc etc) Why re-invent the wheel when all that is already built-in.

    Richard
  • idbruceidbruce Posts: 6,197
    edited 2015-02-28 21:16
    Richard

    To be perfectly honest, I only played with LabView for about a week or two, but pretty extensively during that time frame, just learning the environment. I must say that I was very highly impressed with the software, because it was just simply amazing, with all the various controls and the GUIs that you could create. After having developed software for Windows, I am very GUI oriented. I like it a lot when a GUI looks nice and functions very well. I can only imagine how much time and money NI must have invested into that software.

    Bruce
  • RJSMRJSM Posts: 68
    edited 2015-02-28 21:26
    jmg

    Yes I've been following what ozpropdev has been up to and it is certainly great stuff !

    I've dabbled a bit with FPGA's in the past, particularly for image acquisition from scientific grade CCD's.

    Here's a happy snap of a PCB I put together that allows me to run an 8 cog P1V and access an on-board 256kx16 SRAM via use of ports A and B. The slick yellow module that you see on the PCB was designed by a guy in Brisbane, here in Australia. Sadly, he's no longer making these but has made the design open source, I believe. Same FPGA here as on the DE-0 Nano.

    I'll have more to say about all of this down the track.

    Richard
    1024 x 676 - 825K
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-02-28 21:36
    @ RJSM

    Hi, and welcome to the Forum.

    Excellent designs and it's great to see the info and pictures.t. I was curious about the K1 "Goodsky:DIR - SPST DIR-S8-105-A" and had to look it up. LOL

    I played with Labview for a few months a few years ago. I did 2 of their FPGA courses but never really got to use any of it. Unfortunately I don't have access to the software anymore.

    =======================================================================================
    For anyone else interested:

    Propeller Potentiostat

    U8
    TL074AC
    TL07x Low-Noise JFET-Input Operational Amplifier
    http://www.mouser.com/ds/2/405/slos080l-316255.pdf

    U10
    LMC6001
    Ultra-Low Input Current Amplifier
    http://www.ti.com/lit/ds/symlink/lmc6001.pdf

    U6
    1865 / 623:
    LTC1865 - µPower, 16-Bit, 250ksps 1- and 2-Channel ADCs in MSOP
    http://www.linear.com/product/LTC1865

    U7
    AD623
    Instrument AMp:
    http://www.analog.com/media/en/technical-documentation/data-sheets/AD623.pdf

    U9
    ADG508AKR
    CMOS 4-/8-Channel Analog Multiplexers
    http://www.analog.com/media/en/technical-documentation/data-sheets/ADG508A_509A.pdf

    K1
    Goodsky:
    DIR - SPST
    DIR-S8-105-A
    http://www.goodsky.co.uk/datafiles/DIR.pdf

    U5
    MAXIM Integrated:
    MAX1673
    Regulated, 125mA-Output,
    Charge-Pump DC-DC Inverter

    U4
    FTDI FT245RL
    http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT245R.pdf

    U2
    Microchip
    24LC256
    CMOS serial EEPROM
    http://ww1.microchip.com/downloads/en/DeviceDoc/20001203U.pdf

    U1
    P8X32A_044
    http://www.parallax.com/product/p8x32a-q44

    U3 ? I can't read the numbers (looks like a voltage reg) :)
  • potatoheadpotatohead Posts: 10,253
    edited 2015-02-28 23:11
    Welcome, and thanks a bunch for sharing. I'll be reading with great interest.
  • KC_RobKC_Rob Posts: 465
    edited 2015-03-01 09:10
    RJSM wrote: »
    I’m hopefully now just a couple of months away from launching a website that will put all of this information into the public domain, both to promote science and so that others may benefit from my work. The P1 is here and now and I’ve never really found it unable to do anything I’ve wanted it to – it just works, and works perfectly ! I’m very excited about a P2 in the pipeline but I’m certainly not going to enter a state of paralysis while waiting for either an FPGA image or silicon ! There are just too many projects still waiting to be tackled with what we already have at our disposal.

    In the coming months I’ll use this thread to keep you posted about other P1-based scientific instruments I’ve built/am working on and also about how to access my website when it is ready. Hopefully exciting times ahead...
    Welcome, RJSM! Excellent post. I've said many times that the Propeller has a natural home in instrumentation, industrial as well as scientific, and process control. I also like your attitude regarding the P1: it's easy to use and it just works; more importantly, it's here now. (True, it'd be nice to have 5V-tolerant I/O and few other little things, but one must take what one can get.)

    I'll look forward to seeing your website when it's finished.
  • PublisonPublison Posts: 12,366
    edited 2015-03-01 09:32
    @RJSM,

    Welcome to the forums, but you said you have been around awhile.

    Thanks for the great write up and great pictures.
  • Bill HenningBill Henning Posts: 6,445
    edited 2015-03-01 12:19
    RJSM,

    Welcome! Looks like you build some nice instruments!

    For one-off projects, I've used MakerPlot with the Propeller and assorted microcontrollers - it is not LabView, but has a very affordable lab license.
  • localrogerlocalroger Posts: 3,451
    edited 2015-03-01 13:06
    Add me to the welcome chorus, RJSM. That's some clean and pretty work on those instruments. I'm on the industrial end and it's amazing how often you can glue the Prop to a cheap instrument and make what should be a really expensive instrument. Looking forward to seeing more of your stuff!
  • RJSMRJSM Posts: 68
    edited 2015-03-01 14:10
    Nice to get these positive comments - thanks everyone for the welcome.

    On the subject of making things "low cost, high performance" (is that an oxymoron ?) I continue to be amazed at what is possible.

    I'm a spectroscopist and that basically means using light to record the signatures of atoms and molecules. Spectral signatures can arise due to absorption or emission of radiation. The amount of light that gets absorbed or emitted can be related to concentration - which is why spectroscopy is so important for chemical analysis.

    Sometimes we use very short pulses of light to excite molecules to fluoresce (e.g. pulsed lasers). For example a molecule like quinine (found in tonic water) if excited by pulses of near-UV light will fluoresce in the blue region of the spectrum - and the timescale for the emission is very short - just a few tens of nanoseconds.

    One of the P1-based instruments I've made uses an LED to generate nsec pulses and a technique called photon counting to detect these pulses. The instrument can then be used to measure these very short fluorescence lifetimes.

    Take a look at this LabVIEW screen dump and you'll see a pulse profile of a Nichia 370 nm UV LED, generated and measured by a Propeller. The FWHM of the LED profile here is ~ 2.5 nsec !

    On my website i'll have lots of experimental data like this to demonstrate many of the neat things you can do with scientific instruments.

    Richard Morrison
    1024 x 536 - 282K
  • ozpropdevozpropdev Posts: 2,791
    edited 2015-03-01 15:49
    G'day Richard
    Excellent work mate!
    Looking forward to your future contributions. :)
    Cheers
    Brian

    BTW. A few of us are based in Melbourne and catch up when we can to talk all things Propeller. Where are you based?
  • RJSMRJSM Posts: 68
    edited 2015-03-01 16:06
    G'day Brian
    Small world - i'm here in Melbourne too (Caulfield). Happy to join the local group for Prop discussions.

    Cheers
    Richard
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-03-01 23:35
    Welcome to the forum Richard.
    Totally agreed there is still a lot we can do with the P1.
    Love your projects. Looking forward to hear more about them.
    Ray
  • TubularTubular Posts: 4,621
    edited 2015-03-02 12:03
    Hi Richard

    Looks like our local gatherings are about to get even more interesting.

    Thanks for taking the time to present what you're doing. I think labview is great for getting things going, I'll be interested how the gui translates to the prop, but the prop should be good for this kind of thing.

    That fpga module is interesting - but looks like the fpgamodule.com site has gone. Do you have any other links?

    regards
    Lachlan
  • RJSMRJSM Posts: 68
    edited 2015-03-02 14:27
    G'day Lachlan

    sure - you can find documentation for the FPGA module at https://github.com/thin-layer/helix_4_fpga_module. There's a complete set of Altium design files there and a nice pdf with the module pinout too.

    The modules were not expensive at around $40 - there were 4CE10 and 4CE22 variants; each module had an SRAM but there was also a beefed up version with DDR2 DRAM as you'll see when you get the zip file.

    I communicated with the designer quite a bit around 6 months ago. I thought his modules were just the ticket for dropping into projects and soldering them onto a motherboard was trivial - so I ended up setting one up as an 8 cog P1V as you saw in the photo.

    Sadly though, the modules didn't exactly sell like hotcakes, hence the disappearance of the website, as you discovered. Luckily I bought up the rest of Brent's inventory before that happened ! I did talk to him about doing another production run but that never happened.

    It would be great to have a local gathering - how regularly do you guys do that ?

    Richard
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2015-03-02 15:04
    Richard, another welcome from me too. I agree wholeheartedly that the Prop is well-suited for instrumentation that is focused on doing one task well, where it involves several processes going on at once, front end, data processing, storage, communications, UI.

    You Aussies really stick together, all while hanging upside down on the earth!
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-03-02 15:42
    ...
    You Aussies really stick together, all while hanging upside down on the earth!
    Heck no ! We are the right side up and you northern hemisphere guys are hanging upside down.

    Want proof...
    Land (earth) is heavier than water.
    There is more land in the northern hemisphere and more water in the southern hemisphere.
    Hence the land part would fall to the bottom
    Therefore, Oz is on top ;)
  • TubularTubular Posts: 4,621
    edited 2015-03-02 17:31
    RJSM wrote: »
    G'day Lachlan

    sure - you can find documentation for the FPGA module at https://github.com/thin-layer/helix_4_fpga_module. There's a complete set of Altium design files there and a nice pdf with the module pinout too.

    The modules were not expensive at around $40 - there were 4CE10 and 4CE22 variants; each module had an SRAM but there was also a beefed up version with DDR2 DRAM as you'll see when you get the zip file.

    I communicated with the designer quite a bit around 6 months ago. I thought his modules were just the ticket for dropping into projects and soldering them onto a motherboard was trivial - so I ended up setting one up as an 8 cog P1V as you saw in the photo.

    Sadly though, the modules didn't exactly sell like hotcakes, hence the disappearance of the website, as you discovered. Luckily I bought up the rest of Brent's inventory before that happened ! I did talk to him about doing another production run but that never happened.

    It would be great to have a local gathering - how regularly do you guys do that ?

    Richard

    Really interesting little module, thanks for the links Richard. Wish I had known about it at the time.

    Regarding how regularly - too early to establish a pattern, but every few months (or when another prophead is in town, or someone has something new/interesting that needs appraisal). Always worthwhile.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-03-02 17:51
    Hi Richard, very nice professional job, both in hardware and software, well done. I like your use of LV and it would be good if something like that were available for IOS/Android over serial Bluetooth so we could really make use of our pocket tech.

    It seems there are a few Prop guys in Melbourne and I always like visiting the place although normally I don't have much time but if we all can make a date in April sometime then I may pop down for a couple of days.

    How about a hands-up firstly from all the Aussies reading this and secondly who might be interested in a workshop get-together down in Melbourne in April? I gather that there are a number of suitable places we could meet.

    If there is enough interest we could maybe formalise it into more of an UPEDU (down under) or at least plan such an event. Maybe we might even have a P2 image by then.
  • TubularTubular Posts: 4,621
    edited 2015-03-02 18:11
    April sounds good.

    Peter (and others) if you ever have a few hours spare down here, let us know. It's a standing offer.

    We all seem to be out east / south east and fairly flexible
  • RJSMRJSM Posts: 68
    edited 2015-03-08 01:28
    I’ve just completed some lab experiments using the Propeller and I’d like to pose a few questions that pertain to its application in an instrument for detecting light.

    Optical detectors such as photomultiplier tubes and photodiodes produce small currents. Less well known is the fact that LED’s can also be used as optical detectors.

    I’m currently documenting a USB-enabled, P1+LV-based instrument that measures and logs very small currents and voltages. My instrument allows direct connection of a large number of sensors - with all necessary data acquisition circuitry on-board.

    The tests I’m carrying out at the moment are using a water clear 5mm LED (in this case a turquoise green emitter), using the instrument to measure the photocurrent produced by this LED under illumination.

    Questions :

    How tiny a current/voltage do you think it might be possible to measure with a low cost, Propeller-based instrument ? The instrument is to draw its power from a laptop’s USB port and I’m interested in demonstrated, not theoretical performance.

    What current would my LED detector produce in the dark, and then under ambient room light conditions, and how much noise would one expect in these measurements ?

    If one were to shine red, and then blue light from LED’s onto this detector, what response(s) might we expect ?

    Before spilling the beans, I’d be curious to hear the thoughts of others !

    This instrumentation project is really nicely suited to use of a P1 Propeller and the results I think are quite remarkable. I hope be in a position to post some data (that will answer the above questions) and more technical information about this instrument in the coming week.

    Richard
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-03-08 03:23
    RJSM wrote: »
    In my instruments, Propeller-based hardware teams up with a LabVIEWTM PC-based front end, giving a high quality GUI. For me, the synergy of those two tools comes close to nirvana for rapid development of easy-to-use scientific instruments rivalling the performance of commercial products – but at typically 1/10-1/100 the cost. That’s potentially great news for educators with large teaching labs but small budgets.

    One tenth to one hundreth the cost........ This is something I have long suspected to be true of the Propeller. It is also indicative of there being enough of a difference in cost and market price of finished product to allow innovators to make a reasonable profit for their efforts. (Maybe as an educational device supplier.)

    The Chinese have even gone so far as to translate the Propeller Manual into Simplified Chinese. That seems to indicate that they too see the value in this alternative architecture.

    The public consumer may be fickle as to which processor gets the buzz, but having people that really invest a great deal of time in creative research on Parallax's side is greatly appreciated.


    ++++++++++++
    I can't answer the LED question, but would like to see the answer as well.

    I do know that the Red LED will accept a broader bandwidth of light than a Blue LED, with other colors in between in the ROY G BIV sequence of colors. There has been a few projects using LED as touch switch sensors sampling the voltage/current produced from ambient light.

    +++++++++++++
    Also, I think Parallax would love to hear your thoughts on what the Propeller 2 might add to your present scheme.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-08 04:22
    RJSM,

    I presume you are aware of the work on LED light detection by Forrest Mims. He as many publications on the topic especially w.r.t. atmospheric measurements: http://www.forrestmims.org/publications.html
  • RJSMRJSM Posts: 68
    edited 2015-03-08 04:34
    Yes Heater,

    Forrest Mims was the pioneer in that application of LED's. He has done some wonderful work on atmospheric aerosol and column ozone/water vapor measurements using LED detectors, and who could forget his classic Engineer's Mini-Notebooks, published by Radio Shack. Inspirational stuff !

    Richard
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-03-08 08:59
    The voltage readings produced for any LED @ any light condition is dependent on the the wavelength for that color of LED

    re: What current would my LED detector produce in the dark,

    Zero

    re: : What current would my LED detector produce and then under ambient room light conditions,

    it is dependent on the brightness of the light source and the color of the LED .Also the shape of the LED may affect it (round vrs square, flat vrs round etc)

    Red will produce the less current , red, yellow, and green will produce the most current.

    re: If one were to shine red, and then blue light from LED’s onto this detector, what response(s) might we expect ?

    You will have less current flow with the Blue LED


    What current would my LED detector produce in the dark
    None
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-03-08 10:17
    My gut feeling is that the Propeller is preferred for scientific tools as it is easier to code deterministically that an interrupt driven microcontroller. And the use of Spin and PASM are preferred over any form of C (Catalina C or Propeller GCC).

    Am I correct or off in the weeds?
  • prof_brainoprof_braino Posts: 4,313
    edited 2015-03-08 10:31
    RJSM wrote: »
    ...detecting light. LED optical detectors.

    The tests I’m carrying out at the moment are using a water clear 5mm LED (in this case a turquoise green emitter), using the instrument to measure the photocurrent produced by this LED under illumination.

    Questions :

    If one were to shine red, and then blue light from LED’s onto this detector, what response(s) might we expect ?

    Hi Richard

    I did the Forrest Mimms LED as light detector experiments, and originally used a BASIC Stamp to measure the rctime (time to discharge to zero) for a reverse biased LED to discharge under various lighting conditions. One set of results was:
    Blue LED can detect light from a Blue LED.
    Green LED can detect light from Green and Blue LEDs.
    Red LED can detect light from Red, Green, and Blue LED.
    Red works best with red. I was about to determine if same color works better or red works better for all cases, but I was distracted by another project and 15 years went by.

    In any case, the current is very small, but if you can reverse bias the detector LED, it will discharge in a short time (under half a second?), and sooner with more light applied. I only used two LEDs, but with a proper instrumentation amplifier circuit it might be more senstive.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-08 10:34
    Loopy,

    Do you have any evidence that "the Propeller is preferred for scientific tools" ?

    My guess is that the world is full of thousands of scientific tools and some vanishingly small percentage of them use a Propeller.

    Certainly a vanishingly small percentage of the world knows anything about Spin/PASM. Be sure determinism is not unknown outside of Spin/PASM.

    The control software of the F-35 Joint Strike Fighter is in C++. A deterministic, real-time application if ever there was one.
Sign In or Register to comment.