Sciencemadness Discussion Board

links to some electronic projects to support my chemistry

Magpie - 16-2-2015 at 15:16

1. For the PID controller with thermocouple readout. The picture is poor so I posted a new one below. The black box on the right is a PID controller w/LED readout. I use this for heating bath control: http://www.sciencemadness.org/talk/viewthread.php?tid=14682#...

2. For the chopped AC voltage controller for my tube furnace.
http://www.sciencemadness.org/talk/viewthread.php?tid=9705&a...

3. For the overhead stirrer.
http://www.sciencemadness.org/talk/viewthread.php?tid=41539&...

4. For the peristaltic pump. http://www.sciencemadness.org/talk/viewthread.php?tid=59870#...

If you have any questions please ask.

PID controller.jpg - 127kB

Zombie - 16-2-2015 at 16:21

I'll be clipping at your heals in no time.

The mere challenge of building your own equipment is the real thrill, Having it actually do what you intend is it's own reward.

I love it! Oh Yeah... PID's are my favorite toy.

violet sin - 16-2-2015 at 23:57

I love to tinker :D

my PID setup looks similar. except I installed the PID in a metal box( water heater timer enclosure), with switches ( power and active), LED's(red/green) .. different heatsink/fan/SSR, a fiberglass outlet box w/ metal cover plate. but I got lazy one day and nailed it all to a 1x4x24" plank just so I could use it, with out tying it to a specific "home". works great on hotplates or mini deep fryer.

I am looking forward to making the overhead stirrer. already have a beefy stepper from an old printer.

Chemosynthesis - 17-2-2015 at 03:12

It's like a holiday. Buddy of mine brags sometimes about being certified to solder to NASA specifications or something. Now I can use these projects to try and goad him into proving it while I finally dig out my soldering iron.

Marvin - 18-2-2015 at 11:36

Doesn't NASA use wire wrap for space worthy electronics because of how brittle solder joints are?

battoussai114 - 18-2-2015 at 12:13

Anyone tried to implement PID on a MCU and use it to make a temp controller?
I've been working on a TC amplifier and temperature controller circuit for my Arduino.
So far I'm using a simple non-inverting OP-AMP circuit to get the output from the TC to a range that is readable by an analog port on the microcontroller, main problem with this is that it can't work on temperatures that generate negative voltage on the TC, which means I can't measure low temperatures (I'm using a K type TC).
For the temperature controller I'm currently using a simple proportional control loop I wrote and a relay to turn the energy supply to the heating element on and off, this don't allow me to use the entire PWM capabilities of the arduino since once I try varying the duty cycle too fast I get the relay to just not do anything because of the coil can't move the switch that fast. Maybe I could get a MOSFET or something to replace the relay, but then the alternating current would probably be problematic.... Now I should get some decent thermal insulator and try to graph the temperature profiles I would get from this setup

I thought of trying to understand the PID library for the arduino since this would get me a MUCH cheaper controller unit -the price of an Arduino, a couple lcd displays, OP-AMPS and resistors for the amplifier and some relays to control the output to the heating element would hardly top 25 bucks- but it seems like a lot of trouble and I'm a little lazy '-'

Bright Spark - 2-3-2015 at 04:21

Anyone tried to implement PID on a MCU and use it to make a temp controller?

Yes many times I have done this from scratch

Now as an engineer that is from the digital age I always avoid analogue electronics where possible, working in product development means you need to design stuff that doesn't need calibrating and doesn't drift hence I have spent my career avoiding opamps, amplifiers and stuff that varies a lot, it makes life easier and actally better reliability, no one wants to try and remember how they calculated something five years later but there are times when it can not be avoided

What temperature range are you trying to measure?

You can't switch a relay with PWM and relays have a finite amount of switchings until they break you should take measures to limit the switchings

You can use bang-bang on off control with a setpoint and a hysteresis band but its much better to use a MOSFET because its mains voltage it means you need an inverter (my specialist area) and its difficult building electronics to switch mains, its tricky even doing it making the electronics robust is another matter

I have a lot of experience with building mains powered inverters, its a large task that takes a lot to do from scratch its so much easier getting a lower voltage element and having the best of both worlds

The code for a PID controller is a few lines and I have a really nice was of explaining it to you so that its implementation is simple, if you are interested that is I would forget the Arduino library I am sure it will be so convoluted it does harm!

Bright Spark - 2-3-2015 at 04:26

If you have any questions please ask.

I do!

Are you an engineer?

Have you ever done any programming?

Are you interested in making a proper PCB?

Do you have any dreams in the electronics department?

I am here to stay and I think I should start how I mean to go on

aga - 2-3-2015 at 11:21

I have had a useful Chem project sitting around since last year, and perhaps a group effort will actually make it happen.

A Quick poll Please on who does PIC and/or Arduinio - just post the Processor and if you'd be interested/have time in taking part.

Edit:

Anyone with some Windowsy language would also be valuable to display the results nicely.

[Edited on 2-3-2015 by aga]

elementcollector1 - 2-3-2015 at 13:18

I do some Arduino work that isn't related to chemistry (yet), and have knowledge of Java and C++. Huh, now I feel like I'm filling out some sort of Sciencemadness resume...

Bright Spark - 2-3-2015 at 13:37


Quote:

Please on who does PIC and/or Arduinio


I don't use PIC's, I refuse to

Microchip have tried to block hobbyists for years, with their expensive software and tools, I hate them for this as I am a hobbyist at heart

I have used an Arduino sometime ago and I find it really limiting but I do have a lot of time in using AVR's mainly the ATMega328 which the Arduino Uno uses which is the chip I recommend, Atmel Studio is free and everything is cheap best of allits as simpe as it gets

I have used a few Arm processors, very nice features for an electrical engineer but much more complicated and not necessary for chemistry/mechanical applications so not recommended

I have pre written code to do lots of stuff with an ATMega328, lots and lots of things, I also have hardware as well and I am always making more

Quote:

have knowledge of Java and C++


I program in C only, I know nothing about Java at all, for controlling hardware C is the choice, an old wise man once said to me

learn C++ when you hit the limits of the C language

Apparently I will know when that happens and I think I have a long way to go before that happens, just controlling hardware


aga - 2-3-2015 at 13:45

The Project is this :

An Arduino HandHeld thing with a touch screen LCD display.

Attached is an nRF24L01 2.4Ghz transceiver.

The handheld device picks up data from multiple remote (not too remote) thermometers, pH sensors, pressure sensors, vacuum sensors etc and can also send control messages to things like servos.

The arduino controls it all, and can easily be programmed to follow an experiment profile, and logs absolutely everything.

Basically it's a Lab data logger/controller that sists in your hand, and lets you see, and control, what is going on remotely.

All devices would be battery powered and use wifi.

I'd like 3 thermometer devices plus a controller for an upcoming experiment, but it doesn't exist yet, so i'll have to sit there reading thermometers every minute for an hour.

aga - 2-3-2015 at 13:53

For controlling hardware, all you have to do is send the right signals in the right sequence at the right time.

The programming language you use is largely irrelevant, however once you get past Assembler and C, Timing becomes something you no longer have control of.

Personally i like PIC assembler, but i've had to learn and speak so many computer languages that it no longer makes much odds anymore which ASM i'm using after a few hours.

My Spanish is pretty much workable, yet my German is terrible. Fertig !

Bright Spark - 2-3-2015 at 14:21

Sounds like a good project

What temperature range do you want to measure?, what other measurements and what range?

I have seen those NRF modules the ESP826 (i think is the number) is very common thesedays however I think an XBee would be the best choice

aga - 2-3-2015 at 14:44

nRF24L01 is the cheapest and will do the job very well.

i think i need to work this into a Challenge.

Sulaiman - 2-3-2015 at 16:10

To control ac mains equipment I would use an opto-triac like this
http://uk.farnell.com/fairchild-semiconductor/moc3063-m/opto...
which switches on zero-crossing for low EMI.

Use the opto-triac to trigger a larger triac of current rating suitable for your load
(use some resistance between the opto-triac and the main triac gate for reliability)
This arrangement is very common for industrial control.

I gave up programming long ago
but I think that using the Wi-Fi capability of a smart phone
or cheap (GBP30 NEW) android tablet
e.g. http://www.ebay.co.uk/itm/7-Android-Tablet-4-2-Camera-WiFi-C...
would be a better direction for an 'open' system.

much cheaper than a DIY controller, touch screen, wifi ..........

Of course an android 'App' would have to be programmed
but that would be a very useful skill to acquire.

For simple on/off control of devices there are many ready made W-Fi controllable mains switches via eBay etc.
e.g. http://www.ebay.co.uk/itm/WiFi-Wireless-Smart-Power-Socket-C...
This would be a pre-tested ready made safe solution.
there are Wi-Fi enabled devices of many types, e.g. camera, multi-output relay boards ...
I'm not sure what ready-made Wi-Fi sensors are available but I'm sure there will be many.
e.g. http://www.ebay.co.uk/itm/WiFi-Temperature-Sensor-module-wit...

If fully Wi-Fi enabled you could run your experiments at/from any remote location !

Lights, Camera, Action !

[Edited on 3-3-2015 by Sulaiman]

[Edited on 3-3-2015 by Sulaiman]

battoussai114 - 6-3-2015 at 18:16

I work mainly with arduino and have some knowledge of C++, Java and Python. I've wanted to start messing with STM32 or some other arm stuff too, but money and time have been keeping me from it.
And I agree with Sulaiman, making an android app is probably a good idea.
Just use those cheap ESP8266 modules (the ones with available pins, not those that only do serial comunication) they have enough IOs to log and control maybe a few lab equipment and besides these are all the rage for IOT stuff lately :D




Quote: Originally posted by Bright Spark  

What temperature range are you trying to measure?

The idea is to measure up to 500ÂșC so I can use the circuit on a makeshift muffle for calcining catalysts. On a maybe very distant future I'd also want to use it for temperature control on some comparative studies on complete oxidation of organic compounds with the said catalysts and with the power of heat 'n nothing more.



Quote: Originally posted by Bright Spark  

The code for a PID controller is a few lines and I have a really nice was of explaining it to you so that its implementation is simple, if you are interested that is I would forget the Arduino library I am sure it will be so convoluted it does harm!

If you could, I'd appreciate your help with the PID controller.

BTW i've gave up on the mains and I'm probably gonna shift to using a DC power supply with some big mosfets and probably some thin nichrome wire (mainly because this is the heating element I'll easily find)

Quote: Originally posted by Bright Spark  
If you have any questions please ask.

I do!

Are you an engineer?

Have you ever done any programming?

Are you interested in making a proper PCB?

Do you have any dreams in the electronics department?

I am here to stay and I think I should start how I mean to go on

I'm a Chem. E. student. Electronics stuff is just a hobby.

I've done some C++ on programming classes and self studied Java and Python.... aaaannnd I'm certainly not a pro in any of those.

Usually when I think of making a proper PCB I think on the mess of using chemical etching and end-up just giving up. Someday I'll make a mechanical PCB mill from upcicled printers like this one here.

And last, no... absolutely no dream on this!

yobbo II - 9-4-2017 at 14:31


Perhaps I should have started an new thread.

I need a timer/controller which will switch a relay on and off.
The times required for on and off are in the region of one to (say approx.) a few minutes on and similar off times.

What I am trying to say is that I need a timer that has a period that can be programmed from approx. 15 seconds to a few mintues and have a variable mark space ratio of a few seconds to a few minutes. This going on in a continous loop.
A description of the device would be a square waveform generator with very large period (no milli or microseconds here).
I only need one channel but if there are a few channels (different timers within the one box) that will be grand.

Are devices that do this available.

What is a device like this called exactly. A timer controller?
Will this device do this job.
http://www.ebay.co.uk/itm/A-Programmable-Timer-Controller-DC...

I will ask the seller as he has not much of a description what the device actually does.
It's a led controller actually.

I have a pic which I could program but I don't know a pile about them and would rather have a 'box' solution.

edit:
http://www.ebay.co.uk/itm/DDS-Function-Signal-Generator-Modu...

I think this will do the job. It goes from 0.01Hz (100 seconds)
which will be slow enough (I would like more) to 1 to 99% duty cycle.

There is a better one here. 0.001 Hz (1000 seconds!)

http://www.ebay.co.uk/itm/ICL8038-Low-frequency-Signal-Sourc...


TFYT
Yob


[Edited on 9-4-2017 by yobbo II]

[Edited on 9-4-2017 by yobbo II]

Quibbler - 10-4-2017 at 04:10

I use Microchip's PIC micros, really it is not expensive. All the software is free and ypu can either make your own programmer or buy a pickit3.
I use the open source Great Cow Basic as the high level language.
Check my project from several months ago "homemade spectrometer" to see what can be done.

The PIC processors come in a much wider variety than the Arduino and many will operate down to 2 volts so you can power them with two AA or a lithium and also have no problems with the now common 3.3V logic.
As for switching as has been said relay contacts will wear out so with DC use a transistor (I don't see the need for Mosfets) and with AC use a triac.

yobbo II - 10-4-2017 at 17:26

I found an ideal quick and easy solution on ebay.

http://www.ebay.co.uk/itm/DC-5V-12V-24V-Infinite-Cycle-Delay...

It is refered to as a

Infinite Cycle Delay Timing Timer Relay ON OFF Loop Module Time

It is an essential part of a peristaltic pump if you are using one IMO. Most cheap peristaltic pumps are not 100% duty cycle rated. You should not run them for long periods. Also it is difficult to control how much they pump unless you have an on/off timer as above. You set the duty cycle and the time period on the timer to suite the amount you need pumped. This also saves the pump as it is not running all of the time (assuming pump is big enough).

Yob

Melgar - 15-4-2017 at 13:58

For holding a vacuum without burning out your pump, I'd imagine something like this would be valuable:

http://www.ebay.com/itm/AIR-LOGIC-Subminiature-Vacuum-Switch...

That one is a bit expensive, but the guy selling it seems to know very little about it, is willing to combine shipping, and is accepting best offers, and it's definitely worth it if it saves you from burning out a vacuum pump. Manufacturer's page is here:

http://air-logic.com/store/f-5100-series-subminiature-pressu...