Sciencemadness Discussion Board

Microcontrollers & The Amateur Chemist

bfesser - 15-1-2013 at 18:57

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]

watson.fawkes - 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.

bfesser - 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.

IrC - 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.

gregxy - 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.

bfesser - 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]

IrC - 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.

bfesser - 17-1-2013 at 19:53

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

mayko - 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>


IrC - 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





phlogiston - 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]

bfesser - 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]

mayko - 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

m1tanker78 - 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

SM2 - 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.

Harristotle - 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!





watson.fawkes - 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.

homemade GC

Harristotle - 21-1-2013 at 16:32

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

morganism - 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...

luckybot - 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.

IrC - 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.

radagast - 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!

bfesser - 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.

follow up on microcontrollers - GC build instructions

Harristotle - 28-4-2013 at 18:14

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

smaerd - 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 :).

IrC - 15-5-2013 at 10:11

http://www.ebay.com/itm/Mini-ATMEL-AVR-ATMEGA-STK500-USB-ISP...

Right now you can get a nice Mini ATMEL AVR ATMEGA STK500 USB ISP Programmer for almost $49 off normal price. I do not know how long the sale will last but I ordered one from this ebay seller while the price was this low. Looks like He has plenty in stock right now.


bfesser - 18-9-2013 at 05:31

I'm betting that those are the counterfeit ones I've heard about.

I've been struggling to get one of the SparkFun <a href="https://www.sparkfun.com/products/9825" target="_blank">Pocket AVR Programmers</a> <img src="../scipics/_ext.png" /> to work over the last couple weeks. Does anyone here have any experience with these? I've drawn the conclusion that purchasing one of these was a mistake. All I want to do with it at this point is flash updated code to the <a href="http://www.atmel.com/images/doc2543.pdf" target="_blank">ATtiny2313</a> <img src="../scipics/_pdf.png" /> in my <a href="viewthread.php?tid=25882">Geiger counter kit</a>. I'm about ready to withdraw a little from my savings account and order a proper <a href="http://store.atmel.com/PartDetail.aspx?q=p:10500054#tc:description" target="_blank">AVRISP mkII</a> <img src="../scipics/_ext.png" />

[Edited on 18.9.13 by bfesser]

arsphenamine - 18-9-2013 at 05:45

Quote: Originally posted by bfesser  
I'm about ready to withdraw a little from my savings account and order a proper <a href="http://store.atmel.com/PartDetail.aspx?q=p:10500054#tc:description" target="_blank">AVRISP mkII</a> <img src="../scipics/_ext.png" />
Get the AVRISP mkII at ~$35 from AVR, Mouser, Digikey, Newark, et.al.

The Arduino development environment supports it, as does the Windows Atmel Studio. Think of it as the gold standard for AVR embedded flashing.

The only thing you need to remember is that it will overwrite the bootloader in an otherwise serviceable Arduino.

--

Rotary Telephone Pulse to DTMF with PIC

bfesser - 18-9-2013 at 09:10

I've got another (unrelated) project going...

Yesterday, I picked up an old <a href="http://en.wikipedia.org/wiki/Rotary_dial" target="_blank">rotary dial</a> <img src="../scipics/_ext.png" /> telephone (ITT 500, made in Canada) from the local surplus shop, which I plan to restore and gift to my father. After a little research, I've found that <a href="http://en.wikipedia.org/wiki/Pulse_dialing" target="_blank">pulse dialing</a> <img src="../scipics/_wiki.png" /> is no longer supported by the service provider my parents subscribe to. [curses newfangled technology&mdash;everything's fucking digital now...]

I managed to find a <a href="http://bygselvhifi.dk/misc/telephone-pulse-to-dtmf-converter/#!prettyPhoto[puls2dtmf]/1/" target="_blank">neat little circuit</a> <img src="../scipics/_ext.png" /> that I'd like to try out which will generate <a href="http://en.wikipedia.org/wiki/DTMF" target="_blank">DTMF</a> <img src="../scipics/_wiki.png" /> signals from the dial's pulses using a PIC12F675. On the bright side, this'll be a great opportunity for me to learn to etch PCBs&mdash;something I've been meaning to do for years. On the down side, I've invested my time and funds (unsuccessfully) toward <a href="http://en.wikipedia.org/wiki/Atmel_AVR" target="_blank">AVRs</a> <img src="../scipics/_wiki.png" /> up to this point, and have not worked with the <a href="http://en.wikipedia.org/wiki/PIC_microcontroller" target="_blank">PIC</a> <img src="../scipics/_wiki.png" /> &micro;Cs before.

Of course, there are many other ways I could go about converting the telephone, but none of them have the appeal and simplicity of this one. In addition, I'd like to preserve as much of the original circuitry and mechanics of the phone as possible, so replacing the guts with a RasPi or Arduino with direct <a href="http://en.wikipedia.org/wiki/Voice_over_IP" target="_blank">VoIP</a> <img src="../scipics/_wiki.png" /> is out of the question.

My question is this: Should I bother trying to build and program one of these myself and risk miserable failure (again), or should I just wait until I can afford to buy a commercial adapter?

[I didn't have a question before writing this&mdash;just needed to rant to let out my frustration.]

watson.fawkes - 18-9-2013 at 12:14

Quote: Originally posted by bfesser  
I managed to find a neat little circuit that I'd like to try out which will generate DTMF signals from the dial's pulses using a PIC12F675.
That "neat little circuit" is nothing but a power supply and a crystal frequency reference (possibly not even needed) for the microcontroller chip. All the pulse detection and tone generation is done in software. Nothing an AVR can't do, and all the software development could be done on a stock Arduino.

watson.fawkes - 18-9-2013 at 12:30

Quote: Originally posted by IrC  
Mini ATMEL AVR ATMEGA STK500 USB ISP Programmer
Quote: Originally posted by bfesser  
I'm betting that those are the counterfeit ones I've heard about.

And what would that be a counterfeit of, exactly? It's a flash programmer for all the devices listed. Smells more like your prejudice against the Chinese again, rather than anything about the device itself.

phlogiston - 18-9-2013 at 13:53

Although some people can debate endlessly about the differences between AVR's or PIC's, the reality is that there is not all that much of a difference. There is a wide range of each series available with similar peripherals, for similar cost.
If you have invested in AVR tools and built up some experience with it, why change? Especially for a simple application like a DTMF generator, the simplest chips of either range can do the job, both at a cost of less than 1 Euro.
I use PICs mostly myself, primarily because I have grown familiar with their design and peculiarities. They are very cost effective. The microcontroller part of my circuits is usually less than Eur 2,-. I don't think the Arduinos come close to that yet, but I must admit I haven't checked anytime recently.

[Edited on 18-9-2013 by phlogiston]

watson.fawkes - 18-9-2013 at 15:44

Quote: Originally posted by phlogiston  
I use PICs mostly myself, primarily because I have grown familiar with their design and peculiarities. They are very cost effective. The microcontroller part of my circuits is usually less than Eur 2,-. I don't think the Arduinos come close to that yet, but I must admit I haven't checked anytime recently.
The small chips in the AVR series uses are about the same price, depending on chip features. The Arduino itself isn't nearly as cheap, but it's a development board, even if it's inexpensive enough for some folks just to embed one in their projects.

bfesser - 18-9-2013 at 15:50

Quote: Originally posted by watson.fawkes  
And what would that be a counterfeit of, exactly?
Of the genuine article. The one whose revenue goes to pay the salaries of the hard-working software and electrical engineers who designed and developed it&mdash;not to some corrupt Chinese elite who owns a factory shamelessly producing <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59447&start=0&postdays=0&postorder=asc&highlight=" target="_blank">knockoffs and counterfeits</a> <img src="../scipics/_ext.png" /> and violating copyrights and patents out of sheer greed.
Quote:
Smells more like your prejudice against the Chinese again, rather than anything about the device itself.
Don't try to start that bullshit argument again&mdash;not here. If you're so confident in the quality, why don't you purchase the one linked to with your own money, try it out, and get back to us (if and when it finally arrives in the post)?

<a href="http://www.seeedstudio.com/wiki/index.php?title=Atmel_AVRISP_STK500_USB_ISP_Programmer" target="_blank">See Also...</a> <img src="../scipics/_ext.png" />

Quote: Originally posted by phlogiston  
If you have invested in AVR tools and built up some experience with it, why change?
Because I've invested in what are apparently defective and useless tools and my experience with AVRs so far (aside from the Arduino) has been anything but positive. :( Regardless, thank you for your input, <strong>phlogiston</strong>

watson.fawkes - 19-9-2013 at 06:38

Quote: Originally posted by bfesser  
Quote:
Smells more like your prejudice against the Chinese again, rather than anything about the device itself.
Don't try to start that bullshit argument again&mdash;not here.
I didn't start it, you started it by posting prejudiced comments. The only reason that you think it's bullshit is that you are apparently completely incapable of recognizing that you could be in error in any significant way.

And your comments about hardworking engineers imply that there are none in China. So I'll upgrade my opinion from prejudice to bigotry.
Quote: Originally posted by bfesser  
If you're so confident in the quality, why don't you purchase the one linked to with your own money, try it out, and get back to us (if and when it finally arrives in the post)?
I own one. It arrived just fine, albeit slowly, as all naval EMS packages do. I haven't had occasion to use it yet.

It's not a counterfeit, since it's not labelled as an Atmel product. And if you think that knockoffs are somehow wrong, you're discounting that the continuing dominance of the PC market started with predominantly US-based knockoffs of the IBM PC (such as Compaq). Atmel's not crying over the product I've got; it's got two AVR chips in it. And furthermore it promotes higher sales of AVR chips.

So do you have evidence that these clone devices have infringed copyrights of the board mask or the software? Do you have evidence that it wasn't independently developed? It's a simple circuit, and the AVR tool chain is open source. There's no inherent right to be able to keep innovation to yourself, and to think otherwise is to fight reality and lose.

arsphenamine - 19-9-2013 at 13:46

Quote: Originally posted by phlogiston  
Although some people can debate endlessly about the differences between AVR's or PIC's, the reality is that there is not all that much of a difference. There is a wide range of each series available with similar peripherals, for similar cost.
Speaking as someone who wrote device control software in assembly language for ~10 years, I beg to differ. I wanted to like the PIC but its haphazard architecture and overpriced development tools made it a non-starter back when it mattered.

The PIC I/O and its control are a disorganized collection of features that militate against any ready use. Even Intel's 80186 was better thought out. Don't get me started about PIC asm mnemonics. Any C language wrapper will be an ugly mess of special features just to get an ordinary job done. It's only a question of degree and how well the abstraction suggests the underlying hardware.

AVR's ATmegas are considerably easier to use, the tools are cheap or free (as in beer), and the learning curve is shallow and fast if you already know C.

bfesser - 19-9-2013 at 14:21

Well, I used to code C++, and have had no problem with C for the Arduino. It sounds like I'd be better off focusing on the Atmel AVRs, rather than dividing my attention between the two. Thank you for your advice. I'll probably invest in a decent programmer soon, and hope to get one of my old computers running Linux to make things easier.

arsphenamine - 19-9-2013 at 16:18

Quote: Originally posted by bfesser  
Thank you for your advice. I'll probably invest in a decent programmer soon, and hope to get one of my old computers running Linux to make things easier.
If Windows owns your primary computer, download AVR Studio. There are online tutorials for programming the Arduino with it. If you have a USB port, you don't need a programmer ... yet.

When your Arduino prototype is done, you can embed the program on the $20 Teensy which is the size of a commemorative stamp.

Plan B is to use the Coridium ARM7 board and its interpreted BASIC. Rapid prototyping gets you farther faster than MIPS.

bfesser - 19-9-2013 at 17:19

I found a similar circuit+code for AVR:

Attachment: PulseToTone_2012_01_22.zip (414kB)
This file has been downloaded 446 times

For completeness, here's the PIC one:

Attachment: pulse2dtmf2.zip (111kB)
This file has been downloaded 523 times

[edit: typo]

[Edited on 20.9.13 by bfesser]

PeeWee2000 - 11-10-2013 at 17:00

Hey bfesser I bought the pocket avr programmer from sparkfun about a year back to attempt to program some attiny85 chips but never had any success with it :mad: so theres a good chance it is the programmer but I'd like to think not as sparkfun seems like a pretty reputable site to me but looks can be deceiving :/

And also I think having an arduino \ uC in the lab would be great, Id love to have a set up that measures the temperature at various points in my apparatus and automatically turns the hotplate off when it detects a temperature rise! Unfortunately I never really learned how to program so its been kind of a pipe dream but if other people more knowledgeable in programming helped out Id love to help make it happen. I do however have plenty of experience in electronic circuits so putting things together is no problem.

bfesser - 13-10-2013 at 08:19

What timing! I didn't see your post until this morning, but I happened to be working on the AVR Pocket Programmer last night, and finally got it to work! Frustratingly, it turned out that the ribbon cable they supplied with the programmer was defective (open MOSI on the 6 pin plug). I won't get into how I figured this out, but I did manage to carefully disassemble the cable and re-wire it to work. Afterward, I spent a little time playing around with the programmer, and finally managed to flash some custom firmware onto blank ATTiny2313s for my Geiger counter.

I'm familiar with many programming languages, though I haven't kept up with it over the years (since changing majors from Computer Science to Chemistry). If there's any coding you'd like help with, just let me know and I'll be more than glad to have a look.

Tip: Type &amp;mu; or &amp;micro; for &mu;.

arsphenamine - 13-10-2013 at 10:13

Quote: Originally posted by bfesser  
I won't get into how I figured this out, but ...
It involved dogged persistence, a WTF moment, and a steady stream of creative profanity as you made the repairs, yes?

bfesser - 13-10-2013 at 11:07

Yes. But it wasn't angry profanity, more relieved and joyful at finally getting the damned thing working. I plan to post on my modifications to the hardware and firmware of the Geiger counter soon (in <a href="viewthread.php?tid=25882">another topic</a>;).

hardware input and output

quantumchromodynamics - 13-10-2013 at 18:41

Specifically does anyone know of or have ideas about hardware that might attach to a drip valve of a separation funnel? A gear down stepper motor attachment? Is there an existing protocol for interconnecting heating mantles, stirrers, shaker tables, video reaction monitoring, etc? For me the software and the feedback control algorithms are the fun part. What seems missing are the sensors and the hardware to automate a reaction in glassware. RC airplane servo motors seem like a good start.

phlogiston - 14-10-2013 at 01:32

Quote: Originally posted by arsphenamine  
Speaking as someone who wrote device control software in assembly language for ~10 years, I beg to differ. I wanted to like the PIC but its haphazard architecture and overpriced development tools made it a non-starter back when it mattered.
...snip...
AVR's ATmegas are considerably easier to use, the tools are cheap or free (as in beer).


Indeed, opinions differ, and, sure, it could be made a little easier, but that's a minor issue. It's not -that- difficult. Everyone who can program can figure out how to program PICs in any language they like best. Development tools are also available for free, who told you otherwise? I've also enjoyed writing assembly for various processors and microcontrollers for about 15 years now and found the PIC series to be quite useful and cost effective.

arsphenamine - 14-10-2013 at 04:11

Quote: Originally posted by phlogiston  
Quote: Originally posted by arsphenamine  
I wanted to like the PIC but its haphazard architecture and overpriced development tools made it a non-starter back when it mattered.
...snip...
AVR's ATmegas are considerably easier to use, the tools are cheap or free (as in beer).


Indeed, opinions differ, and, sure, it could be made a little easier, but that's a minor issue. It's not -that- difficult. Everyone who can program can figure out how to program PICs in any language they like best. Development tools are also available for free, who told you otherwise? I've also enjoyed writing assembly for various processors and microcontrollers for about 15 years now and found the PIC series to be quite useful and cost effective.
The operative words are "back when it mattered" which was early in the millenium . CCS development tools were the least expensive at the time, but still a few hundred dollars and the PIC guaranteed a steep learning curve. No thanks.

GNU toolchain propagation changed that in only five years, for PIC, AVR, and ARM alike, but Massimo Banzi's C++ wrapper for the Arduino made it a no-brainer. I'm uninclined to grovel over the entirety of an architecture any more when all I need is a small simple appliance.

I don't assert that the Arduino is without flaw, only sufficiently easier to get up and running than I found the PIC to be. I wonder if any of them has a readily accessible CTC (clock timer counter) mode. You can do it with arcane frobbage of the Arduino, but it is exactly that: arcane because the documentation is thin on that point.


bfesser - 14-10-2013 at 07:21

<strong>quantumchromodynamics</strong>, I have plenty of ideas, but it's more effort than it's worth. The laboratory glassware that we're all familiar with is designed to be manipulated by human hands. As far as I'm aware, when professional chemists want to automate things, they switch over to using purpose-built apparatus (Swagelok&reg; valves/fittings, stainless steel reactors, PTFE-lined pumps, and the like). While I'm sure we could come up with solutions to handle our solutions in 'regular' glassware, it would likely be easier (and cheaper) to use the appropriate kit. I'm no expert on the engineering side of Chemical Engineering, so perhaps someone else could chime in here.

IrC - 22-10-2013 at 16:04

http://www.ebay.com/itm/pH-Circuit-Sensor-for-Arduino-/20077...

Has anyone tried this PH board for the Arduino?

bfesser - 22-10-2013 at 16:25

IrC, I linked to Atlas Scientific in the first post of this topic. I emailed them a few weeks back to see if they could sell me one of those boards without the epoxy coating or pin headers. Long explanation short; they said 'no.'

<a href="https://www.atlas-scientific.com/product_pages/embedded/ph.html" target="_blank">pH Circuit</a> <img src="../scipics/_ext.png" /> (Atlas Sci.)
<a href="https://www.atlas-scientific.com/product_pages/components/arduino-shield.html" target="_blank">Arduino Shield</a> <img src="../scipics/_ext.png" />
<a href="https://www.atlas-scientific.com/product_pages/components/raspberry-pi-shield.html" target="_blank">Raspberry Pi Carrier Board</a> <img src="../scipics/_ext.png" />

IrC - 22-10-2013 at 16:55

Been many months since I read this thread so I did not remember it but I still wonder if the board on ebay is worth buying. OK how about building a stirrer using an Arduino?

http://www.circuitsathome.com/mcu/programming/vigorius-stirr...

http://www.circuitsathome.com/mcu/programming/vigorius-stirr...

Also you would have extra lines to monitor and control temperature or maybe a color change in a reaction stopping (or starting) stirring or heat. Even controlling a dump of chemicals in a complex reaction where one may not wish to be standing near it. One could also dump a reaction into ice water if events get out of control. Using a temperature sensor, or the color recognition sensor (it could look for oxides of nitrogen due to their obvious color as example).

http://www.ebay.com/itm/1pcs-Color-Sensor-Color-Recognition-...

I just find it odd this is a fairly dead thread when the incredible number of uses abound for the Arduino (or other controller) as it relates to science. Maybe its just me but if I had access to the huge number of advances 50 years ago you people do today my entire lab would run itself while I watched old scifi reruns. Hell 50 years ago I didn't even have reruns.

OK I give your going to have to explain this as I have not had one to study yet:

"I emailed them a few weeks back to see if they could sell me one of those boards without the epoxy coating or pin headers. Long explanation short; they said 'no.'"

Looking at the pic I see it would take seconds to unsolder the headers right through the epoxy with my vacuum de-soldering head. I have had to do this many times in years past on waterproofed circuit boards. Examples are a metal detector and also HV supply boards for HeNe lasers. Often I had to remove and replace a part on the board, adding a clear epoxy coat after repair is done in the areas where I melted out the epoxy around the component pins.

Also wouldn't DCM remove the epoxy if one was very careful to not remove it in areas you did not wish to? I have done this on circuit boards hundreds of times in years past. Why do you need to remove it? Is it to get the board to fit somewhere else, and would a 90 degree bend on pins work if this was your reason? I can see why they would not, they likely have them manufactured in the Orient somewhere and cannot get boards mid production. Or they don't want you screwing with their design? Screwing with other peoples boards is not all that hard if this is their only reason.

pH Circuit Sensor for Arduino.JPG - 51kB

One of these irons would remove the headers in seconds right through the epoxy without any harm to the board, leaving clean pads to solder wires or whatever it is you wanted to do. Just be careful near the chip resistor by the GND pin. All the others are out in the open and easy to do. After doing whatever it is you need to do, mix up a little clear epoxy and re-coat the areas where you melted the epoxy away. We're talking about a 15 minute job here no big deal.

http://www.radioshack.com/product/index.jsp?productId=206273...

sucker.jpg - 5kB



[Edited on 10-23-2013 by IrC]

WGTR - 22-10-2013 at 17:44

For 8-bit 8051 microcontrollers you could try Silicon Labs. I've bought several of their eval boards over the years. The kits come with a JTAG programmer that can be used to program your own custom boards later on. Some other manufacturers don't allow this; they lock the adaptor down so that it will only work with the supplied eval board. The free version of their C compiler used to have a 1k code limitation on it, but it looks like that limitation has recently been removed.

Here's one:
http://www.silabs.com/products/mcu/Pages/C8051F330DK.aspx

bfesser - 22-10-2013 at 18:15

<strong>IrC</strong>, from <a href="https://atlas-scientific.com/contact.html" target="_blank">what I've seen on their site</a> <img src="../scipics/_ext.png" />, they populate and solder the boards in-house.

snapshot1.png - 431kB

I wanted the bare board so that I could attach Swiss round machined pin headers instead of the ones they used. Honestly, the email response was a bit rude, in my opinion. They'd probably get more sales if they were more friendly to the amateur experimenter and hobbyist (these days called "hackers" or "makers"). Because of their attitude, I decided that I'd look elsewhere for similar fabricated boards.

Thanks for the dichloromethane idea; I've never needed to remove epoxy from anything before.

<strong>WGTR</strong>, I recall watching a YouTube video about their low-power 'Gecko' &micro;Cs.

<a href="http://youtu.be/qcG4fcNIX7A?t=3m29s" target="_blank">EEVblog #266 - Mailbag</a> <img src="../scipics/_yt.png" />
<a href="http://www.youtube.com/watch?v=1ihszfJAECk" target="_blank">EEVblog #269 - Energy Micro Tiny Gecko</a> <img src="../scipics/_yt.png" /> (I watched this one.)

[Edited on 23.10.13 by bfesser]

IrC - 22-10-2013 at 19:42

Quote: Originally posted by bfesser  
what I've seen on their site, they populate and solder the boards in-house.


If true not a useful place to do business. Not much effort to help you out it would appear yet they refuse.

Quote: Originally posted by bfesser  
I wanted the bare board so that I could attach Swiss round machined pin headers instead of the ones they used.


Just do the de-soldering iron job I mentioned and no need for DCM. The entire board need not be de-potted.

Quote: Originally posted by bfesser  
Because of their attitude, I decided that I'd look elsewhere for similar fabricated boards.


Screw em buy the one off ebay I linked. I think it was free shipping anyway.

Quote: Originally posted by bfesser  
Thanks for the dichloromethane idea; I've never needed to remove epoxy from anything before.


Just be very careful with it, is how I first saw a naked 741 opamp back around 82. Very cool looking. I fell asleep and the next day saw how badly many parts had been destroyed. Other parts are even more sensitive such as electrolytic capacitors. Ruins them very quickly.

I should add the 741 still worked if kept in the dark. I built a sine wave oscillator from it and used it like a light Theremin. Was so much fun I purposely tried other components. Some were not easy or impossible to de-pot. Others were so sensitive to DCM you had to time things carefully or ruin them.


[Edited on 10-23-2013 by IrC]

watson.fawkes - 23-10-2013 at 05:18

Quote: Originally posted by IrC  
Just be very careful with it, is how I first saw a naked 741 opamp back around 82.
Standard material for decapping chips is concentrated nitric acid. It's standard operating procedure for reverse engineering electronics.

IrC - 23-10-2013 at 06:27

Quote: Originally posted by watson.fawkes  
Quote: Originally posted by IrC  
Just be very careful with it, is how I first saw a naked 741 opamp back around 82.
Standard material for decapping chips is concentrated nitric acid. It's standard operating procedure for reverse engineering electronics.


I know it's what I did all day at a job long ago. However it was not my goal in the mishap I mentioned. I was just trying to depot a circuit board inside a rectangular block of plastic (silicone rubber/sand) immersed in a pressurized tank of warm DCM. Do not have a handy graph but even at 110 degrees DCM is really building up a lot of pressure. Anyway it was not an automated setup and you had to time it carefully or lose the part values on items such as electrolytic capacitors. I fell asleep for a few hours (had driven most the night to get back to work on time for Monday), woke up, shut it down. After cooling and emptying the thing I saw this little skeleton staring at me. Obviously my goal was not de-potting the IC's on the board. Actually only a 741 out of several IC's was eaten so I assumed the plastic composition was unlike the others. Ruined several other parts like electrolytic capacitors so that I could not see their values. I had planned on reverse engineering the schematic. Had to start over with another board to do that.

What I had never thought about before was the effect light would have on the operation of IC's and transistors. Seems only obvious when you think about it. Which I did with a few transistors later just for fun. Oddly a 2SC711 worked better as a photo transistor than a few I had which were designed that way.

bfesser - 23-10-2013 at 07:34

<a href="http://youtu.be/mT1FStxAVz4" target="_blank">Decapping ICs (removing epoxy packaging from chips to expose the dies)</a> <img src="../scipics/_yt.png" />
<a href="http://youtu.be/eoRVEw5gL8c" target="_blank">Viewing an active electronic circuit with a scanning electron microscope</a> <img src="../scipics/_yt.png" />

watson.fawkes - 23-10-2013 at 09:59

Quote: Originally posted by bfesser  
<a href="http://youtu.be/mT1FStxAVz4" target="_blank">Decapping ICs (removing epoxy packaging from chips to expose the dies)
This is Ben Krasnow's video. He's been referenced in this board before for his shop-made supercritical CO2 reactor.

watson.fawkes - 23-10-2013 at 10:14

Quote: Originally posted by watson.fawkes  
Standard material for decapping chips is concentrated nitric acid.
Quote: Originally posted by IrC  
I know it's what I did all day at a job long ago. However it was not my goal in the mishap I mentioned.
I never said you didn't know it. I mentioned it because other people read the thread, and since you hadn't mentioned nitric acid, other folks wanting to take apart IC's might just try DCM first before going straight to whatever everyone else uses successfully.

IrC - 23-10-2013 at 10:25

watson.fawkes "Standard material for decapping chips is concentrated nitric acid. It's standard operating procedure for reverse engineering electronics."

As long as you remember it is for reverse engineering an integrated circuit (internally), not for electronic circuit boards in general. Actually not the entire IC unless dissolving the leads is one of your goals. The second sentence is too broad in scope. Very bad idea to use HNO3 on a board stuffed with parts. DCM is better than most other solvents for removing potting materials on a board filled with various components. Also consider how rapidly DCM removes the outer wrapper of electrolytic capacitors. One reason I bought my first digital LCR meter was to measure these capacitors when I had circuit boards potted with very tough DCM resistant potting materials.

"other folks wanting to take apart IC's might just try DCM first before going straight to whatever everyone else uses successfully"

Good point I didn't think about that. Actually DCM would be a terrible choice for the IC itself, as only one partially dissolved leaving all others on the board untouched in the case I mentioned. After many hours, when I said I fell asleep I mean it was nearly clock out time when I woke up. Say 7 hours in the DCM, with many other parts on the board turned to goo. Yes you guessed it at that job no one came around often. Many said they were afraid to go into my lab because of the hazmat signs on the door. Odd as I felt my place was very safe, while often I saw them use things I would have worn a respirator and gloves to handle.

Still waiting patiently with the board in my ebay cart for bfesser to say the PH board is worth buying. So far no word. For $28 I want someone to blame if I don't like it.





[Edited on 10-23-2013 by IrC]

bfesser - 30-10-2013 at 11:16

Quote: Originally posted by IrC  
Still waiting patiently with the board in my ebay cart for bfesser to say the PH board is worth buying. So far no word. For $28 I want someone to blame if I don't like it.
Hehe, you can blame me if you like. I won't have funds to order one until I find employment or a bag of cash at my doorstep (wishful thinking). How about <em>you</em> let <em>us</em> know what you think of it? You have the expertise and equipment to properly test it, after-all.

I just received a <a href="http://www.raspberrypi.org/archives/5089" target="_blank">RasPi NoIR</a> <img src="../scipics/_ext.png" /> camera module in the post, this morning (I ordered from Adafruit before the official release). I'm excited to try it out, and hope to have some interesting photos to share later tonight or tomorrow.

IrC - 31-10-2013 at 08:26

bfesser "Hehe, you can blame me if you like. I won't have funds to order one until I find employment or a bag of cash at my doorstep (wishful thinking). How about you let us know what you think of it? You have the expertise and equipment to properly test it, after-all."

I almost did get the PH board, but I was buying a QL200 which comes with the 1602LCD for $150, and I also wanted the 12864LCD with it which was about $15 more. So I have to wait on the PH board for a while as this tapped out my experimenting budget for the next while. All this arrived last week so I am spending every spare minute from work studying what it can do. I will be getting the PH board when I build my hobby cash back up as I am curious about it. I have not done any studying on the PH board, do you hook a separate PH probe or is it on-board explaining the thick epoxy coat, as in a bare patch for some type of sensor chip on-board? If so how do you put it in a solution considering the end connectors? Or is the heavy coat to keep room air away from circuitry (which again leaves me wondering about connectors at each end)? Unsure and if it uses a separate PH probe where do you get one and what type/model is it? I have never toyed with a processor controlled PH meter firsthand, so I have many unknowns about the subject. Hopefully I can find somewhere online someone has posted some example code for the PH board.

The pics from the site show green displays (which I don't like), both of the ones I got are blue.

http://www.pic16.com/en/wzcapi/ql200.htm



1602LCD.gif - 48kB 12864lcd.gif - 46kB

ql200-4.jpg - 279kB

Forgot to mention: from the site in the link the cost is $135, mine was $150 as I bought it from an in the states seller to get it sooner.



[Edited on 10-31-2013 by IrC]

bfesser - 31-10-2013 at 12:36

Wow, that board's got a lot going on. Nicely laid out, though. The pH 'stamp' is only potted to frustrate people like me who want to hack it, and to protect it from crud. You connect two pins to a <a href="http://en.wikipedia.org/wiki/BNC_connector" target="_blank">BNC</a> <img src="../scipics/_wiki.png" /> jack and use any standard BNC pH probe (they make repeated warnings to keep the stamp to BNC connections as short, direct, and solid as possible).

Here are a few images from some RasPi NoIR camera module testing I just did from my couch (I've been sick for the last few days):

<table><tr><td align="center">taken with iPhone (control):</td><td align="center">RasPi NoIR (LED reflections visible):</td><td align="center">RasPi NoIR + <a href="http://www.raspberrypi.org/archives/5146" target="_blank">filter</a> <img src="../scipics/_ext.png" /> (used below):</td></tr><tr><td>iPhone.jpg - 691kB</td><td>unfiltered.jpg - 609kB</td><td>filtered.jpg - 532kB</td></tr><tr><td align="center"><a href="http://en.wikipedia.org/wiki/Normalized_Difference_Vegetation_Index" target="_blank">NDVI</a> <img src="../scipics/_wiki.png" /> (<a href="http://infragram.org/" target="_blank">infragram.org</a> <img src="../scipics/_ext.png" />;):</td><td align="center"><a href="http://en.wikipedia.org/wiki/Near_Infrared#Regions_within_the_infrared" target="_blank">NIR</a> <img src="../scipics/_wiki.png" /> (red channel):</td><td align="center">blue channel:</td></tr><tr><td>ndvi_filtered.jpg - 142kB</td><td valign="top">nir_filtered.jpg - 82kB</td><td valign="top">blue_filtered.jpg - 70kB</td></tr></table>

I think the NIR is the most interesting&mdash;I'm planning on taking a few of my soldering iron and stove-top heating elements. I'm sure there could be some amateur chemistry applications for this thing, but I can't think of any at the moment&mdash;or much else, due to lack of sleep. When I'm feeling better, I'll try to build and script a portable RasPi Model A + NoIR rig and perhaps try some balloon mapping.

[edit] I just checked, and I apparently (stupidly) emptied my email trash folder since contacting Atlas Scientific regarding the pH stamp. I guess I have no more info there... but I recall him saying something about the circuit being calibrated with the potting compound in place and the headers being application specific (BS).

Just an idea I'm tinkering with:

idea.jpg - 370kB

[Edited on 31.10.13 by bfesser]

IrC - 7-12-2013 at 20:03

bfesser, I know you mainly work with Raspberry Pi, but I have a question I cannot find the answer to in much searching. I play around with Pics using C and Picaxe but recently I have been taking a hard look at getting into PicBasic Pro. The program is around $270 which is hard enough to afford, the programmer that goes with it is the EPIC USB Port Programmer, (melabs U2 Programmer 4.50) yet another $120. This may be showing my ignorance on the subject but tutorials I find online are cryptic on this subject.

That is, why cannot I use my Pickit 2 or 3, or my K150, JDM, or any one of a half dozen other USB and serial pic programmers I have. I find C very labor intensive to work with building my little robots and whatnot, do not like Picaxe as well as I thought I would, and started in Basic 30 years ago meaning I am already very familiar with it. Trying to find a higher level language that does not rip my piggy bank open the way Basic Stamps love to do. While I found Stamps much simpler they are a rip off in price (as we have discussed before). I have no doubt the lack of an answer to my question is not by accident, melabs has every incentive to get me to hand them another wad of cash and they can do this by making the answer I am looking for difficult to locate.

In simple terms what is so special about the melabs U2 Programmer that I must buy it instead of using any one of the dozen or more pic programmers I already own. Maybe at 60 I'm getting too senile to figure it out but I cannot find the reason I cannot use my own programmers. Also I just got an MPLAB ICD2 in circuit debugger-programmer I have yet to find time to toy with. Correct me if I'm wrong but shouldn't melabs give a list of programmers one could use after you have handed them $270 instead of staying silent on the subject and pushing their U2? This link is the U2:

http://store.melabs.com/prod/programmers/U2BUN.html

The picaxe has a bootloader which is their basic interpreter similar to the proprietary code that runs the basic stamp. The reason I ask this question is I do not know if this U2 is set up in a similar way with a built in interpreter, looking at the board I sure cannot see why it must cost so much to build they must have $120 for it assuming it is no more than just another programmer.

bfesser - 8-12-2013 at 07:02

My first programming language was BASIC, but I prefer C++ now. I'm not familiar with those programmers or the PicBASIC Pro, but I'll see what I can find.

In the mean time, I thought I'd mention that two weeks ago, Wolfram Research released a binary of Wolfram Mathematica for the Raspberry Pi for free! I've downloaded and installed it on a Pi, but haven't learned how to do anything with it yet.

<a href="http://www.raspberrypi.org/archives/5282" target="_blank">The Wolfram Language and Mathematica on Raspberry Pi, for free</a> <img src="../scipics/_ext.png" /> (Rasberry Pi Foundation)
<a href="http://blog.wolfram.com/2013/11/21/putting-the-wolfram-language-and-mathematica-on-every-raspberry-pi/" target="_blank">Putting the Wolfram Language (and Mathematica) on Every Raspberry Pi</a> <img src="../scipics/_ext.png" /> (Wolfram Blog)
<a href="http://www.wolfram.com/raspberry-pi/" target="_blank">wolfram.com/raspberry-pi</a> <img src="../scipics/_ext.png" />

I've used this as a browser homepage off-and-on for a few years:
<a href="http://www.wolframalpha.com/" target="_blank">Wolfram|Alpha: Computational Knowledge Engine</a> <img src="../scipics/_ext.png" />

smaerd - 15-12-2013 at 05:41

Thanks for that bfesser just scooped up a raspberry pi and a lap-dock for Wolfram Mathematica alone! That soft-ware is so powerful. We used it in my ordinary differential equations course and it was incredibly useful. As I am self-teaching partial differential equations this will be of great utility. Originally I was going to use a touch-screen and make a tablet but I figure I could use the keyboard as typing mathematical equations by poking a screen sounds over-bearing, and it is significantly cheaper.

Cheers!

IrC - 5-1-2014 at 23:44

http://www.marginallyclever.com/blog/2011/10/controlling-you...

Found a useful link for the Arduino, plus following other links from the page yields other project ideas. If one builds an automated setup for an experiment, the link above would be handy code to allow for changes on the fly to control things. I was thinking along the lines of a runaway reaction for example.

bfesser - 6-1-2014 at 06:20

So, on the subject of the Atlas Sci. <a href="https://www.atlas-scientific.com/product_pages/embedded/ph.html" target="_blank">pH Circuit</a> <img src="../scipics/_ext.png" /> from earlier. I've managed to find a couple high-resolution photos where the markings on the ICs can clearly be read. The board uses a <a href="http://www.scimad.org/users/bfesser/datasheets/PIC16F1825.pdf" target="_blank">PIC16F1825 &mu;C</a> <img src="../scipics/_pdf.png" />, a Texas Instruments chip marked "01 P2262" which I have yet to identify (I'm assuming it's a precision amplifier and/or ADC), and a (regulator?) IC marked "PFKI". Atlas Sci. has also started selling the potting epoxy they use, on their site.

[photos removed, better below]

I have no experience with PIC programming. Are they similar to AVRs in the ability to read out the flash memory and save it to a binary file for copying to other PICs?

[Edited on 6.1.14 by bfesser]

smaerd - 6-1-2014 at 06:35

So I realize this isn't directly chemistry related but here's the raspberry pi 'lap-top' I built. Runs mathematica okay. Takes some time for vector plots to be processed but thats not a big surprise. Kind of slow but considering it does have basic word-processing capabilities(libre office), and basic web-browsing(slow transfer rates) and only costed me 130(USD)$ it's pretty great. The real beauty of these hacked 'lapdocks' is the 'brain' of the computer can be swapped out at will with essentially any of the common microcontrollers (minus arduino types). It will suit me through my last year or so at school and for the cost beats buying mathematica out of pocket.

Please ignore the curled and rubber-banded USB cable, a USB male to male extender is on it's way and the set-up will be more 'practical'.

Nice post IrC. Reminds me I need to get off my lazy ass and get back to tinkering and experimenting.

DSCF0007.JPG - 160kBDSCF0008.JPG - 124kB

WGTR - 6-1-2014 at 06:49

Quote: Originally posted by bfesser  
a Texas Instruments chip marked "01 P2262" which I have yet to identify (I'm assuming it's a precision amplifier and/or ADC)


TLC2262CPW
http://www.ti.com/lit/gpn/tlc2262

bfesser - 6-1-2014 at 07:21

Very nice, smaerd. I've been using my RasPis connected to my TV through HDMI or 'headless' (no monitor, keyboard, mouse) with SSH/VNC. I've been considering purchasing a small HDMI monitor that I can set on the tabletop, but your solution seems much nicer. Do you have a model number or link for that lapdock? (And by all means, post whatever you'd like, it doesn't have to be directly chemistry related!)

Thank you so much, WGTR! I had already checked that part and downloaded the datasheet, but didn't see the package (p.72) on my first look at it, so I had assumed I had the wrong part. Time to get down to business reverse engineering the thing from photos and pinouts on datasheets.

[edit] Clearer photos... thanks SparkFun!

10972-05.jpg - 136kB 10972-06.jpg - 107kB

[Edited on 6.1.14 by bfesser]

smaerd - 6-1-2014 at 09:56

It's important to mention that doing this with a Model A raspberry pi isn't as facile. The Model B revision 2.0 only requires two cords and is very simple to do. The Model A's require cord splicing, little bit of soldering and heat-shrink tubing and I believe takes up another USB port.

The lap-top portion of the project comes from a Motorolla Droid "Lap-dock" . These have been taken off the shelfs and originally retailed for $500 USD. Now they can be found on E-bay 'used' but in good quality for around 40 USD. In all honesty I speculate as to whether mine was ever used. Typing into e-bay "Motorola Droid Bionic Lapdock" should be a fruitful result :). Apparently the product flopped on the market and is essentially becoming E-waste, so it's kind of a nice way to bring it a second life rather then let them go to the dump. Battery life is about 6 hours or so. The lapdocks feature two accessory USB ports(which the rPi can read), a power cord jack, a battery check display, and supposedly speakers. For wireless internet access I use a 'WiPi' USB dongle that I purchased on the order of about 10 USD.

A few cables are needed to make the connections however. I needed to purchase a micro HDMI female to female connector(china/ebay), and a micro HDMI male to HDMI male wire for the HDMI connection. I also needed to purchase a female micro (I believe) USB to female USB cord(china/ebay) and a male to male USB connector. There are some draw-backs to this but it is incredibly work-able. It should be noted that people who have purchased low quality HDMI cables have suffered from their project not working. I purchased mine along with my rPi and case at MCM electronics was 6inchs in length(~15cm) for a few dollars. The cable must be grounded at CEC and DEC iirc so it can be luck of the 'draw' supposedly. I never had this issue so I can only speculate.

Many people use the Motorolla 100 and 500 model but my Droid Bionic worked just fine after making some slight adjustments to the configuration file in the Raspbian Wheezy operating system(nothing major at all). Adjustments so that the full screen resolution of the lap-dock could be utilized, and that HDMI was recognized on booting.

The largest draw-back is probably that there is no shut-down button. The computer must be shut-down as it is typically done through terminal and either the screen closed or the HDMI cable removed from either the rPi or the lap-dock. Many people become frustrated that when the screen is closed power is cut to the rPi. This doesn't bother me at all and I have seen no reason to hack around this what so ever. Also there are some slight annoyances like getting a proper keyboard map(european default on Raspbian Wheezy?), and audio to work. I see no real need for audio on this device personally and carry an MP3 player for such purposes. I'm not sure if the battery drains at all when the case is closed I know the rPi expresses no power or activity through it's LED's. Either way I disconnect the cords for transport or storage.

One finishing touch type thing that I did was purchased some adhesive velcro pads from a home improvement store and stuck them to my rPi case and the back of the lapdock screen itself. Was a 3 USD fix and it in my opinion makes the lapdock more portable.

For 'performance' type applications it might be worth checking out an android mini-pc or similar. Supposedly the beaglebone blacks and I believe the pandaboards can be used in this same manner to create a hacktop/laptop/whatever.

Anyways, now I'm really rooting for a 1gb ram rPi with a faster processor. Hopefully the future delivers on this because it would be nice to have a cheap laptop with mathematica on-board.

[Edited on 6-1-2014 by smaerd]

[Edited on 6-1-2014 by smaerd]

WGTR - 6-1-2014 at 11:09

The little "PFKI" component on your board is the TPS60400DBV:

http://www.ti.com/lit/ds/symlink/tps60400.pdf

It's a switched-capacitor voltage inverter, to supply negative voltage to the op-amp.

bfesser - 6-1-2014 at 12:32

In order to determine the feasibility of cleanly de-potting the pH circuit, I've sent an email to Info@atlas-scientific.com (hopefully they don't see this before replying):
Quote:
I'm considering purchasing your Clear Potting Compound Kit, but am concerned about the health effects of inadvertent exposure to the components. Could you please supply MSDS for the two bottles, so that I can perform a risk assessment before purchasing your product? Thank you for your time.
It's difficult to pretend that you're chemophobic and 'dumb' in such correspondence, but I've tried. I have little actual intent of purchasing the <a href="https://www.atlas-scientific.com/product_pages/kits/pc_clear_kit.html" target="_blank">potting kit</a> <img src="../scipics/_ext.png" />, at this time.

IrC - 6-1-2014 at 23:23

Quote: Originally posted by quantumchromodynamics  
Specifically does anyone know of or have ideas about hardware that might attach to a drip valve of a separation funnel? A gear down stepper motor attachment? Is there an existing protocol for interconnecting heating mantles, stirrers, shaker tables, video reaction monitoring, etc? For me the software and the feedback control algorithms are the fun part. What seems missing are the sensors and the hardware to automate a reaction in glassware. RC airplane servo motors seem like a good start.


I never noticed this post before. Assuming the valve can handle the chemical going through it you might look at this:

http://www.allelectronics.com/make-a-store/item/SOL-132/SOLE...

Another idea I had was say the pressure switch below was in line (or on a side port with a T by blocking one port), and when pressure in the system reached 1 PSI a signal to the computer could close the above valve to reduce the reaction rate. Or be used to trigger some function.

http://www.allelectronics.com/make-a-store/item/PSW-15/PRESS...

Even a solenoid could be used, say above a certain temperature in a runaway reaction the whole mess was dumped into ice water as example.

http://www.allelectronics.com/make-a-store/item/SOL-102/MINI...

Others:

http://www.alltronics.com/cgi-bin/item/28B022/search/Parker-...

http://www.alltronics.com/cgi-bin/item/24B039/search/MAC-34B...

http://www.alltronics.com/cgi-bin/item/24Z074/search/MAC-411...

http://www.alltronics.com/cgi-bin/item/24Z075/search/MAC-421...

http://www.alltronics.com/cgi-bin/item/91Z005/search/CKD-AB4...

No doubt the types of gases or chemicals would be limited by the material the valves are made of. These are just some examples available from a couple of the electronic surplus stores I buy from. A search on ebay might even yield an electric valve able to handle a greater range of chemicals.

smaerd - 7-1-2014 at 12:42

I was trying to think of ways around this issue myself some time ago for a different project. There's really no 'simple' way to go about it. The cheapest ideas I conjured up were pretty similar to yours IrC. Expensive ways to go about it are things like rheodynes and what not.

The first was a simple pinch solenoid type valve. Make a simple 'manifold' and slam the solenoid down on some hosing when you want to stop the flow. Issues with that are material wear. I dreamed of making a manifold by punching holes into some aluminum block with a drill press and sealing the solenoid with o-rings etc. It's probably too much effort although it 'could' be affordable if it worked... Hopefully the description there wasn't to vague.

The other and my favorite option was essentially a cheapy peristaltic pump-head rigged to a cheapy servo(180* maximum rotation is fine!) controlled by a micro-controller. Here's the twist; rather then having 3 or 5 'spokes' spinning around the hose only have 1. Turn 180 to rotate the spoke into the hose shunting it's flow. Turn 180 to rotate the spoke away from the U shaped bent hosing to allow the flow. This shouldn't do much damage to adequate tubing (IE tygon) as peristaltic pumps can run for many rotational cycles before it is recommended that tubing is replaced. Depending on the application this tubing may never have to be replaced. It is also quite cheap if done properly and uses significantly less energy then servo's do for on or off holding power. With PID or perhaps even rudimentary PD control any resistance met by the flow could be countered by applying current towards the direction of said flow (which wouldn't be an issue for small volumes at low vertical displacements I think?). The down-side is that peristaltic pump heads are U-shaped and gravitational flow would be hindered by this. Or more simply a peristaltic pump could be the bottom line as to whether a solution goes or doesn't go rather then gravity.

I considered a few other ideas, but real chemically resistant valves and other-wise cost large amounts of money. Even second hand. For example passing a hot corrosive runaway solution through the majority of materials will lead to problems. It has to have context. For purposes of automation there are a number of ways to go about doing things and it depends on the accuracy/resolution of the experimental design and of course what is available.

(last edit I swear) 'Dosing' to my understanding is how people over-come things like valves and volumetric delivery for a lot of situations. How much and what to dose in a dynamic system is tricky and requires some kind of monitoring. For separations well that's a whole 'nother situation.

The ideas involved in DIY automation could be a thread or sub-forum unto itself.

[Edited on 7-1-2014 by smaerd]


[Edited on 7-1-2014 by smaerd]

bfesser - 7-1-2014 at 13:05

While I like your ideas, I think you may be over-complicating things.

Here's my first thought:
valve.jpg - 37kB

(Apologies for the half-assed sketch.)

smaerd - 14-1-2014 at 08:46

That's definitely a good idea. Especially for gravity feed. Somehow that eluded me entirely hahaha. Probably need a pretty high current depending on the fluid volume though. I'll have to sit down and come up with some other ideas too :).

bfesser - 14-1-2014 at 10:28

It shouldn't be too difficult to come up with other solenoid-type arrangements. I'll see if I can come up with or something better and suitable for other orientations. I had been thinking about how to make valves with <a href="http://en.wikipedia.org/wiki/Nickel_titanium" target="_blank">nitinol</a> <img src="../scipics/_wiki.png" /> <a href="http://en.wikipedia.org/wiki/Shape_memory" target="_blank">shape-memory alloys</a> <img src="../scipics/_wiki.png" /> for a few days, but haven't come up with anything worth posting yet. There are already some commercially available.