Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
 Pages:  1    3  4
Author: Subject: Microcontrollers & The Amateur Chemist
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 15-1-2013 at 18:57
Microcontrollers & The Amateur Chemist


So, for quite some time now, microcontrollers have been available cheeply to the general public. This begs the question; why aren't we applying <a href="http://en.wikipedia.org/wiki/Microcontroller" target="_blank">microcontrollers</a> (&mu;Cs) more in the amateur/home chemistry laboratory?

Personally, I have a <a href="http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/ProductID/1/List/1/Default.aspx?SortField=UnitCost,ProductName" target="_blank">Basic Stamp 2</a> (BS2, Rev. F) from Parallax Inc., and I just acquired a <a href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> (RasPi) through <a href="http://www.adafruit.com/category/105" target="_blank">Adafruit</a> &reg; Industries. I'd like to get an <a href="http://www.arduino.cc/">Arduino</a> (or ten) and maybe a <a href="http://beagleboard.org/bone">Beagle Bone</a>, as well.

With the number of cheap readily available sensors (<a href="https://www.sparkfun.com/categories/23?page=all" target="_blank">example vendor</a>;), add-ons, and breakouts available, it's a wonder why every one of us doesn't have at least one of these things helping out in the home lab! I used to have a nice weather station setup (even had it on a dedicated server to upload data to <a href="http://www.wunderground.com/" target="_blank">Weather Underground</a>;), but after moving locations several times and being exposed to harsh Minnesota winters, I had to scrap it.

I'm looking for a few things from this thread:
<ul><li>Suggestions of what I should do with my RasPi or BS2? If they're good, maybe I could make tutorials.</li><li>Replies on what other members are up to in this area.</li><li>Ideas on what &mu;C applications we could develop as a comunity.</li></ul>
On a related note, I just gutted an old flat bed scanner, and am considering trying to interface the linear CCD to a microcontroller and adding a difraction grating (DVD-R shard or eBay) or prisms to make a cheap spectrophotometer. Thoughts?
<img src="http://i.stack.imgur.com/ffTcD.gif" width="50%"/>
The chip is similar to that pictured above. (<a href="http://electronics.stackexchange.com/questions/29941/rangefinder-very-long-range-ultrasonic-or-laser-for-arduino" target="_blank">source</a>;)

Various random links of interest from my bookmarks:
http://www.publiclaboratory.org/tool/spectrometer
http://www.myspectral.com/
http://www.spectralworkbench.org/
https://www.atlas-scientific.com/product_pages/embedded/ph-3...
https://forum.sparkfun.com/viewtopic.php?p=32374
http://fzu.cz/~dominecf/electronics/usb-spect/usb_spectromet...

[Edited on 30.7.13 by bfesser]




View user's profile View All Posts By User
watson.fawkes
International Hazard
*****




Posts: 2793
Registered: 16-8-2008
Member Is Offline

Mood: No Mood

[*] posted on 16-1-2013 at 07:06


This same issue came up a few months ago in an Arduino thread. My response there applies more-or-less identically to this.
Quote: Originally posted by bfesser  
With the number of cheap readily available sensors (<a href="https://www.sparkfun.com/categories/23?page=all" target="_blank">example vendor</a>;), add-ons, and breakouts available, it's a wonder why every one of us doesn't have at least one of these things helping out in the home lab!
It's not much of a wonder to me. There's relatively little talk on the board about fabrication of one's own gear, at least relative to what it might have been fifty years ago. Of all the chemistry-related fabrication skills, glassblowing is the one that you'd think would be popular, but even that one isn't. There's more talk about machining here than glassblowing. I've even seen members here express scorn for chemistry-allied tasks that are not strictly chemistry.

Fabrication is necessary to package electronic sensors so that they're compatible with chemical processes. Consider something that you'd think would be totally standard at this point: a hot plate controlled by a temperature sensor within the boiling flask. You need a thermometer to get the sensor in the flask. While that's available as a standard glass part, it's also a simple glass fabrication: a tapered male blank, a butt joint, and a half-sphere seal at the end. This is just one example, but generally all raw electronics needs packaging to be useful, and packaging generally means some amount of fabrication.

I'll say it yet again here: pursuing amateur science is inherently multidisciplinary, even when you want to focus on one aspect of it. Just get used to that and get on with doing good work.
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 16-1-2013 at 11:10


Huh. Sorry for starting a new thread. I did a few searches, yet somehow completely missed noticing that Arduino thread. Regardless, the focus should be expanded beyond the Arduino. For many applications, an Arduino may be overkill, a cheap <a href="https://www.tindie.com/shops/TAUTIC/8-pin-pic-development-kit/">PIC</a> board would suffice.



View user's profile View All Posts By User
IrC
International Hazard
*****




Posts: 2710
Registered: 7-3-2005
Location: Eureka
Member Is Offline

Mood: Discovering

[*] posted on 17-1-2013 at 01:21


I think you should look at the picaxe for sensor projects. I got a pile of PICAXE-20M2 chips cheap on fleabay as bigger more popular ones came out and built a few useful things like a digital Geiger counter. Although for applications typical for chemistry the PICAXE-08M2+ really makes a lot of sense. Hell of a lot easier to write for than the 16F84A, 877 or similar pics. I think it may be just me though. C really rots my brain. Basic is well developed by picaxe, even free software for writing, testing etc.. Probably so they can sell more chips but who cares if it is free. In my school and even college years none of this stuff existed so I had no teacher. As they evolved from the 4.77 MHZ 8080A and Z80 up with 10 MB full height drives louder than an out of balance turbine in a DC10, basic was most prevalent and what I slowly learned. For whatever reason, maybe just me, basic is more natural and easy for simple machines and sensors, reading, controlling, so on. Closer to English so to speak. If I built a video game C would make more sense. To be honest I think this ease is why the stamp was so popular. Except to me. While I really liked stamps, just too costly.

http://www.picaxe.com/What-is-PICAXE/


To quote: "PICAXE chips are popular because they are very low-cost, and simple to program using free, easy-to-learn software."

Or, my brain hurts less.

My one complaint is blowing 10 or 15 on the programming cable. I cannot find a hacked schematic anywhere to make my own. I just like not being stuck having to buy things like that if I can be a cheap bastard and make one from my junk box.




"Science is the belief in the ignorance of the experts" Richard Feynman
View user's profile View All Posts By User
gregxy
Hazard to Others
***




Posts: 421
Registered: 26-5-2006
Member Is Offline

Mood: No Mood

[*] posted on 17-1-2013 at 10:32


I have used PICs (16F series) for other hobby related things like an electric motor controller for a battlebot, battery charger, and electronic lock. I never used one for anything chemistry related.

I chose the PIC because I had a nice article telling how to use one, plus they are cheap and relatively easy to setup, program etc.
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 17-1-2013 at 13:52


Quote: Originally posted by IrC  

My one complaint is blowing 10 or 15 on the programming cable. I cannot find a hacked schematic anywhere to make my own. I just like not being stuck having to buy things like that if I can be a cheap bastard and make one from my junk box.


2 second google image search for "picaxe cable schematic" yielded this:
<img src="http://www.gammon.com.au/images/PICAXE%2008M%20circuit.png" />

If you can't figure out how to make the cable from that schematic, well...
Just don't forget the 22k&Omega; resistor!

If you really can't make one, I could solder one up if you pay for the bubble mailer.

[edit: changed to a cleaner schematic image]

[Edited on 1/17/13 by bfesser]




View user's profile View All Posts By User
IrC
International Hazard
*****




Posts: 2710
Registered: 7-3-2005
Location: Eureka
Member Is Offline

Mood: Discovering

[*] posted on 17-1-2013 at 17:10


Quote: Originally posted by gregxy  
I have used PICs (16F series) for other hobby related things like an electric motor controller for a battlebot, battery charger, and electronic lock. I never used one for anything chemistry related.

I chose the PIC because I had a nice article telling how to use one, plus they are cheap and relatively easy to setup, program etc.


Do you have a link or copy of it you can post?

Thanks for the diagram bfesser, I have all the parts here to make that quickly. Weird that I googled 'picaxe programmer cable schematic' and did not see that image. But I could be getting senile. I searched web and only looked at links on the first 2 or 3 pages of hits. Just tried it with images search and it is about halfway down the first page. Gotta edit my google prefs to show more per page. Just was getting annoying to scroll through long pages. Thanks for the tip this is useful. I should have done what you did before I ordered one last year. Wasn't that I did not have one I was just bitching that I hate anything I can't do for free out of old used toaster parts. I know don't ask, no I never bothered to tear mine apart and draw it. It looked pretty and I didn't want to mess it up. Or I was too lazy. Or my dog ate it.




"Science is the belief in the ignorance of the experts" Richard Feynman
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 17-1-2013 at 19:53


IrC, you kinda... went on and on there. Feeling okay? Glad I could help, though.



View user's profile View All Posts By User
mayko
International Hazard
*****




Posts: 1218
Registered: 17-1-2013
Location: Carrboro, NC
Member Is Offline

Mood: anomalous (Euclid class)

[*] posted on 17-1-2013 at 22:28


I've been thinking about this kind of stuff too - it seems like some really powerful technology, potentially. Maybe things like DIY detectors for a chromatograph, with a UV LED and a monitoring sensor?

My only actual work in the area was in using an Arduino Uno board in some DIY spectrophotometry projects of mine. I was using the microcontroller to rotate a motor with a diffraction grating on it, sweeping the spectrum over a sensor, which the board was also monitoring. Then there was a python script on the other end of the USB which was monitoring a serial port. I'm not even entirely sure it ever worked. It was a pretty ricketty setup, but fun and educational :) Ultimately I had to harvest the Arduino for it though.

<a href ='http://i1109.photobucket.com/albums/h428/csoeder/DIY/Guts_Closeup.jpg'>big picture</a>

If you want more, I have an
<a href = 'http://topologicoceans.wordpress.com/2011/03/15/diy-spectro-ii/'>informal writeup here</a>

View user's profile Visit user's homepage View All Posts By User
IrC
International Hazard
*****




Posts: 2710
Registered: 7-3-2005
Location: Eureka
Member Is Offline

Mood: Discovering

[*] posted on 17-1-2013 at 23:09


While I'm not sure 6.5 lines = on and on, I'm fine. Thanks for asking. All I was really trying to do was get you to think about the picaxe due to the great, both free and simple language and software used. I have Arduinos of all kinds and hundreds of pics. While useful I keep going back to the axe for the very reason I loved stamps for many years. In this economy cost is an issue and for whatever reason Parallax even after many years of production has never lowered the cost all that much. Just trying to be helpful. I do not remember where anymore but a thread around here somewhere touched on using a flatbed CCD in a home made spectrophotometer. They had a link that was useful. So far I cannot find that thread or the site with the project but if I do I'll post it. In the mean time you could check out Woelens thread. Marvin was toying with your scanner CCD idea and Tacho was hacking hard drives. That was 7 or 8 years ago, some of the members I do not remember seeing any posts from in a long time.

http://www.sciencemadness.org/talk/viewthread.php?tid=4831

But there was another thread around here somewhere you might read as well. I;m too busy to search for it right now. Just taking a short break.

http://www.instructables.com/id/A-simple-DIY-spectrophotomet...

This link above is crude in construction but was useful as it provided already written coding for the Arduino driving a stepper motor. Good for ideas (and the Arduino pde) for what it's worth (I realize your wanting to scan pixels in a CCD).

http://www.inpharmix.com/jps/CD_spectro.html








"Science is the belief in the ignorance of the experts" Richard Feynman
View user's profile View All Posts By User
phlogiston
International Hazard
*****




Posts: 1379
Registered: 26-4-2008
Location: Neon Thorium Erbium Lanthanum Neodymium Sulphur
Member Is Offline

Mood: pyrophoric

[*] posted on 18-1-2013 at 07:11


I have used PIC chips to drive an old spectrophotometer for which the control electronics were broken and that was discarded by a university lab. Also used one to control a ball mill wirelessly, and monitor its speed (rpm). I use PIC chips mostly, programming in assembler or occasionally C.

I've also harvested a linear CCD from a scanner for the purpose of making a spectrometer, but I was hoping to capture emission spectra of flames and could not think of a good way to calibrate the sensor (in terms of the sensitivity vs. wavelength curve).

[Edited on 18-1-2013 by phlogiston]




-----
"If a rocket goes up, who cares where it comes down, that's not my concern said Wernher von Braun" - Tom Lehrer
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 18-1-2013 at 08:05


IrC, Parallax are total bastards. Their prices are lubriciously inflated. I only mentioned it, because I have a BS2 that was given to me as a gift many years ago, and it'd be a shame to waste it. I've never purchased anything from them myself, and probably never will. They just like to take advantage of the American public education system to reap a profit. Reminds me of <a href="http://www.vernier.com/" target="_blank">Vernier</a> <img src="../scipics/_ext.png" />.

<img src="http://www.instructables.com/files/deriv/F13/6TNG/GHUDKGQ2/F136TNGGHUDKGQ2.LARGE.jpg" width="400" />

Seeing this photo from your second link makes me think, why not just integrate the TI-83+ into the circuitry? I used to code TI-Basic in my sleep&mdash;seriously had dreams about it. Funny how they're using it, and the voltmeter, when the Arduino could have easily done all that.

I have an Agilent deuterium lamp in my 'instrumentation' bin. Brand new, never used, from the local surplus shop. I should go dig that out.

[Edited on 30.7.13 by bfesser]




View user's profile View All Posts By User
mayko
International Hazard
*****




Posts: 1218
Registered: 17-1-2013
Location: Carrboro, NC
Member Is Offline

Mood: anomalous (Euclid class)

[*] posted on 18-1-2013 at 12:32


Quote: Originally posted by IrC  
In the mean time you could check out Woelens thread. Marvin was toying with your scanner CCD idea and Tacho was hacking hard drives. That was 7 or 8 years ago, some of the members I do not remember seeing any posts from in a long time.

http://www.sciencemadness.org/talk/viewthread.php?tid=4831

But there was another thread around here somewhere you might read as well. I;m too busy to search for it right now. Just taking a short break.

http://www.instructables.com/id/A-simple-DIY-spectrophotomet...

This link above is crude in construction but was useful as it provided already written coding for the Arduino driving a stepper motor. Good for ideas (and the Arduino pde) for what it's worth (I realize your wanting to scan pixels in a CCD).

http://www.inpharmix.com/jps/CD_spectro.html



I'd seen the instructables site, but the other two are new to me and look like great resources - I'll add them to my FAQ/bibliography page
View user's profile Visit user's homepage View All Posts By User
m1tanker78
National Hazard
****




Posts: 685
Registered: 5-1-2011
Member Is Offline

Mood: No Mood

[*] posted on 20-1-2013 at 06:06


The PIC has always been my go-to uC. For most of my applications, the 18F series was perfect. I didn't stray much from the 18F1320 (relying on fuzzy memory here). I built my own programmer, built motor controls (with feedback), light sensors, IGBT control circuitry (for high current applications), stepper motor controllers, etc, etc..

Damned useful once you get past the programming and hardware hurdles although I never applied it to amateur chemistry. Hmm, now that I think about it, I didn't even know what a spectrophotometer was back then. :D

Tank




Chemical CURIOSITY KILLED THE CATalyst.
View user's profile View All Posts By User
SM2
Hazard to Others
***




Posts: 359
Registered: 8-5-2012
Location: the Irish Springs
Member Is Offline

Mood: Affect

[*] posted on 20-1-2013 at 12:31


If you want to spend just a tiny amount more, go to Mouser, and buy an Atmel 2016. You will be able to control all sorts of nested variables, and EASILY be able to run several independent experiments in paralell. If you are into Nagra hacking, you already should know your way around this sort of micro-programming.
View user's profile View All Posts By User
Harristotle
Hazard to Others
***




Posts: 138
Registered: 30-10-2011
Location: Tinkerville
Member Is Offline

Mood: I tink therefore I am

[*] posted on 21-1-2013 at 06:55


This is a subject close to my heart.

I haven't had time to finish this off, but I have made a homemade gas chromatograph from an arduino. It used a hair drier as the column heater, silica gel from dessicant as the stationary phase in borosilicate glass 8mm from ebay, and ch2Cl2 and freon as the stuff analysed.

At RT, both stick to the column but at 70 degrees (measured crudely with a lm34 sensor) the CH2Cl2 comes off after about a minute, using an aquarium air pump and air as the carrier.

This initial design sucked! The hair drier kept cutting out (its thermal overload switch tripped), so I have replaced it with a coil of nichrome and an old computer fan, driven by a mosfet ( 3055VL interfaces nicely with arduino 5v logic). Initially for proof of concept, I used copper wire in a low propane flame, and LDR as my detector. Later I will use one of those very promiscuous (they detect anything, just about) tin oxide gas sensors ( Figaro 822 is pretty general, but I think the main difference in sensitivity is set by the temp that the heater gets the sensor to, so other models may be hackable by varying the heater temperature).

It impressed my mates, to see the bright blue copper/organic halogen flame, after a minute!

My issues are largely in packaging it up. I just don't get time to finish up a decent job. What I've done isn't complete, but probably would help others.
I would/will change temperature sensor to max6675 and k type thermocouple - it is more robust. I'll post video later (warning: huge even compressed 10x)



The other project I think would be really useful to amateur chemistry would be a melting point/ freezing point curve measurer. You could put a tiny sample in a little nichrome coil fed with a known energy (joules=volts x amps x seconds) then plot the change in temperature. Easy to do with an arduino and a max6675, and a 3055vl mosfet driving the nichrome coil!




View user's profile View All Posts By User
watson.fawkes
International Hazard
*****




Posts: 2793
Registered: 16-8-2008
Member Is Offline

Mood: No Mood

[*] posted on 21-1-2013 at 09:02


Quote: Originally posted by Harristotle  
The other project I think would be really useful to amateur chemistry would be a melting point/ freezing point curve measurer. You could put a tiny sample in a little nichrome coil fed with a known energy (joules=volts x amps x seconds) then plot the change in temperature.
I've advocated this project before. I also suggested using a webcam and host-based video processing to observe phase changes, making the system fully automated.

It's not a huge amount of work to do DTA or DSC in addition, once you've got the point of building a device at all.
View user's profile View All Posts By User
Harristotle
Hazard to Others
***




Posts: 138
Registered: 30-10-2011
Location: Tinkerville
Member Is Offline

Mood: I tink therefore I am

[*] posted on 21-1-2013 at 16:32
homemade GC


A video of the gas chromatograph and some explanation can be found here. If you want the board layout and code, such as it is, drop me a line. (I haven't figured how you can do that from here !).


http://youtu.be/HXUUPwSVDf0
View user's profile View All Posts By User
morganism
Hazard to Others
***




Posts: 105
Registered: 8-12-2012
Location: Az.
Member Is Offline

Mood: No Mood

[*] posted on 22-1-2013 at 01:06


From HackADay, and the Brillouin testing thread.

One guy was using that sensor for it.


here are some of the links for the spectro

http://topologicoceans.wordpress.com/2011/03/15/diy-spectro-...

http://hackaday.com/2010/12/13/building-a-spectrophotometer/...

http://www.asdlib.org/onlineArticles/elabware/Scheeline_Kell...


i bought a gecko testing board from efm, to try and figure out some low power stuff.
Cant see much smaller than 0603 anymore...
View user's profile Visit user's homepage View All Posts By User
luckybot
Harmless
*




Posts: 17
Registered: 10-2-2013
Member Is Offline

Mood: No Mood

[*] posted on 21-2-2013 at 12:13


Just thought I would mention this to anyone looking to get started with uC's. As an alternative to the more popular arduino and PIC options Texas Instruments makes the msp430 launchpad. It's only 5$ and gives you 2 chips and the usb development board. Don't think there is any cheaper way to get started than that. I have one running my DIY magnetic stirrer.
View user's profile View All Posts By User
IrC
International Hazard
*****




Posts: 2710
Registered: 7-3-2005
Location: Eureka
Member Is Offline

Mood: Discovering

[*] posted on 21-2-2013 at 13:45


I have never looked at that although TI used to be popular with me in the 80's. Just finished another robot dog using the picaxe and it is no doubt so much easier for me. Left the Mega and Uno's this time just to get familiar with the axe. For easy programming of the type of gear used by most here the axe is very hard to beat.

Not a boatload of I/O in the 28X1 but one can always go back to the Mega 2560.




"Science is the belief in the ignorance of the experts" Richard Feynman
View user's profile View All Posts By User
radagast
Hazard to Self
**




Posts: 79
Registered: 28-6-2012
Location: NYC
Member Is Offline

Mood: No Mood

[*] posted on 3-3-2013 at 18:36


Quote: Originally posted by Harristotle  
This is a subject close to my heart.

I haven't had time to finish this off, but I have made a homemade gas chromatograph from an arduino. It used a hair drier as the column heater, silica gel from dessicant as the stationary phase in borosilicate glass 8mm from ebay, and ch2Cl2 and freon as the stuff analysed.

At RT, both stick to the column but at 70 degrees (measured crudely with a lm34 sensor) the CH2Cl2 comes off after about a minute, using an aquarium air pump and air as the carrier.

This initial design sucked! The hair drier kept cutting out (its thermal overload switch tripped), so I have replaced it with a coil of nichrome and an old computer fan, driven by a mosfet ( 3055VL interfaces nicely with arduino 5v logic). Initially for proof of concept, I used copper wire in a low propane flame, and LDR as my detector. Later I will use one of those very promiscuous (they detect anything, just about) tin oxide gas sensors ( Figaro 822 is pretty general, but I think the main difference in sensitivity is set by the temp that the heater gets the sensor to, so other models may be hackable by varying the heater temperature).

It impressed my mates, to see the bright blue copper/organic halogen flame, after a minute!

My issues are largely in packaging it up. I just don't get time to finish up a decent job. What I've done isn't complete, but probably would help others.
I would/will change temperature sensor to max6675 and k type thermocouple - it is more robust. I'll post video later (warning: huge even compressed 10x)

. . .



This is brilliant; I love it!
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 3-3-2013 at 19:52


I just got an <a href="http://arduino.cc/en/Main/arduinoBoardUno" target="_blank">Arduino Uno R3</a> in the mail two days ago, and am eager to learn to use it. I also got <a href="http://www.adafruit.com/products/439" target="_blank">TSL2561 light sensor breakout board from Adafruit</a>. I wasn't really thinking about using it for anything in particular at the time, I just wanted a cheap sensor to learn to use the Arduino with. I might try to see if it's any good for making an ad hoc spectrophotometer.



View user's profile View All Posts By User
Harristotle
Hazard to Others
***




Posts: 138
Registered: 30-10-2011
Location: Tinkerville
Member Is Offline

Mood: I tink therefore I am

[*] posted on 28-4-2013 at 18:14
follow up on microcontrollers - GC build instructions


Sorry if this is a crosspost: I wanted to put it in this thread because here was where I first raised the matter, but I misposted to technochemistry.

Code, circuit diagram, and picture of my Gas chromatography setup (arduino powered) can be found here:
http://arduino.cc/forum/index.php/topic,163305.0.html

Cheers,
Harristotle
View user's profile View All Posts By User
smaerd
International Hazard
*****




Posts: 1262
Registered: 23-1-2010
Member Is Offline

Mood: hmm...

[*] posted on 15-5-2013 at 03:56


Just purchased an arduino leonardo. Going to use it for my upcoming polarimeter project. It's amazing how cheap these things are becoming, 25 USD, sheesh. So it begins :).



View user's profile View All Posts By User
 Pages:  1    3  4

  Go To Top