PDA

View Full Version : Rasberry PII PID Controller



prickett
11-27-2015, 12:04 AM
I see that the Rasberry PII (original) is now selling for $5. Has anyone tried using it to make a PID controller?

JonB_in_Glencoe
11-27-2015, 10:47 AM
Sounds easy enough :shock: :shock: :shock:
http://www.homebrewtalk.com/showthread.php?t=344529

Boolit_Head
11-27-2015, 10:59 AM
Where do you see them that cheap?

JonB_in_Glencoe
11-27-2015, 11:36 AM
from the raspberrypi blog...
RASPBERRY PI ZERO: THE $5 COMPUTER (https://www.raspberrypi.org/blog/raspberry-pi-zero/)
https://www.raspberrypi.org/blog/raspberry-pi-zero/

bangerjim
11-27-2015, 12:50 PM
This board-level construction for real "bit-heads"! Most on here................WAAAAAAAAAAAAAAY above your tech level. Sorry. A few can probably do it, most cannot.

It has no:
digital display
t/c algorhythms for t/c input (called temperature compensation/linearization)
voltage outputs
user interface (buttons)
relays
auto-tune curves or fuzzy logic

All of those functions would have to be developed/programmed on an external computer is some programming language and uploaded to that silly little thing.

And you would need drivers for the LED display, a keyboard of control buttons, a driver for output, relays, etc to even get close to making a simple pre-packaged pre-engineered pre-designed $35 PID cheapo digital controller.

Trying to build a controller on the cheeeeep is one thing. This thing is totally out of the technical scope of most lead slingers on here.

Stick with those Auber and MyPin pre-packaged controller things most on here use. And spend your time fussing over simple external wiring and box construction, rather than programming in a digital computer language you do not even know.

banger

oldcanadice
11-27-2015, 01:43 PM
JonB: Thank you.

banger: kids are building all kinds of things on the Pi and a lot of hardware and software can be found pretty easy (it would have to be). Please don't discourage our getting new stuff like this.

bangerjim
11-27-2015, 03:15 PM
JonB: Thank you.

banger: kids are building all kinds of things on the Pi and a lot of hardware and software can be found pretty easy (it would have to be). Please don't discourage our getting new stuff like this.

Not really discouraging anything....just pointing out from an advanced engineering aspect that this is NOT what most on here want to dabble with. Far too advanced for the average non-engineering type.

If you want to waste the money and tons of time tinkering with it, feel free to! I am an engineer and design and sell industrial control systems and.......I would not ever attempt using one of these for pot temp control. Just stick with what is already out there and not try reinventing the wheel.

Just a word to the wise.....from the wise.

bangerjim

JonB_in_Glencoe
11-27-2015, 03:33 PM
Bangerjim, it doesn't take all that ...
just use the computer you already have to login into castboolits.
just add this neat little $8 output plug
http://jeelabs.net/projects/hardware/wiki/Output_Plug

The real neat thing about this is you could run up to 4 separate devices at the same time...
lets say you run a primary lead furnace, as well as a secondary lead furnace (to fill the primary pot when it gets low), and also a hotplate (mold oven), as well as a toaster oven...cause you know you'll want to be baking some PC coated boolits while you are casting the next batch.

bangerjim
11-27-2015, 05:10 PM
Many log on to this site with smart phone and iPads. My PC is over 240 feet away and on the second floor of the house from my lead pot in my back shop. Not too convenient to simply change a temp setting by 5 degrees!

Based on the "silly" questions asked by many that are trying to build a simple controller set-up, wire it up, and get it to work with commercially available PRE-CONFIGURED components, this thing is a potential technical nightmare for many unsuspecting souls. Some do not even know how to really run a computer that well (and admit it), let alone upload command level configuration software to a silly little raw board.

Sorry, but my comments are simply based upon the many varied levels of technical electronics expertise I have seen on this site over the past several years.

Could I personally do it? Definitely YES.

Would I personally do it? Definitely NO.

Proven commercial controller hardware is too readily available and far too inexpensive to mess with raw board level approaches programmed thru (most likely) a computer that is in another room or building from this device........like this thing is.

Just trying to save the fine people on here time and money and frustration is my goal. Always has been. Always will be.

If one wants a controller on a lead pot, buy a convenient commercially available easy to use digital PID controller and the necessary external components. Or a pre-built fully functioning and guaranteed unit from one of the fine vendors on here.

banger

edctexas
11-27-2015, 05:55 PM
I second bangers remarks. My career has been involved with software design and hardware design. The little I/O board is nice but you would need more circuitry to isolate your control computer from the AC voltage used by pot, hotplate, or oven. You would need some circuitry to read the TC voltage and more software to add calibration setpoints. Yes you could build a better mousetrap, but the readily available PIDs are 98% of what could be achieved and you can have them delivered by next day air. Unles your a software genius and a pretty good hardware man, your alternative PID would be 6-12 months of long days.

Ed C

Retumbo
11-27-2015, 08:21 PM
Ordered this morning already :)

whistlersmother
11-27-2015, 09:56 PM
As a hobby, this is doable, but realize the ready made PIDs are cheaper and will probably work better in the end.

I grabbed some Arduino PID code, modified slightly for the Pi.

Grabbed a MAX31855 breakout board from Adafruit.

Already had a CrystalFontz CFA635 USB LCD display with buttons.

Added a cheapo USB hub and wireless USB dongle.

For pot A/C control, got a 300v/40 amp SSR. I wanted to ensure the Pi could sink enough current to run the SSR, so added a Darlington array chip.

Put the SSR, switched socket, and separate socket/USB wall plug into a 3 gang light switch box. The power comes from the wall via a hacked PC power cable.

After a bit of programming to tie the max31855 thermocouple and ssr into the PID code plus monitoring on the LCD, I discovered my thermocouple is grounded - the max31855 requires ungrounded.

In the end, I'm not satisfied because the thermocouple is no where near the actual temperature as measured by an old fashioned hand-held thermocouple with analog needle.

My thermocouple is super cheapy from Ebay - $6. I will need to breakdown and get one of the $30 from Omega or some other company.

For now, the project is on hold while I ponder my hotplate choice. It is 1000 watt Walmart coil plate that barely gets to 700 fahrenheit. I had to bypass the knob control since it has a built in temperature control thingy. But since its on a socket with a switch, I'm not too worried about it.

JonB_in_Glencoe
11-27-2015, 10:19 PM
snip...
Proven commercial controller hardware is too readily available and far too inexpensive to mess with raw board level approaches programmed thru (most likely) a computer that is in another room or building from this device........like this thing is.
banger


I second bangers remarks. My career has been involved with software design and hardware design. The little I/O board is nice but you would need more circuitry to isolate your control computer from the AC voltage used by pot, hotplate, or oven. You would need some circuitry to read the TC voltage and more software to add calibration setpoints. Yes you could build a better mousetrap, but the readily available PIDs are 98% of what could be achieved and you can have them delivered by next day air. Unles your a software genius and a pretty good hardware man, your alternative PID would be 6-12 months of long days.

Ed C
But it has such a sexy name ...Raspberry Pi

bangerjim
11-27-2015, 11:48 PM
As a hobby, this is doable, but realize the ready made PIDs are cheaper and will probably work better in the end.

I grabbed some Arduino PID code, modified slightly for the Pi.

Grabbed a MAX31855 breakout board from Adafruit.

Already had a CrystalFontz CFA635 USB LCD display with buttons.

Added a cheapo USB hub and wireless USB dongle.

For pot A/C control, got a 300v/40 amp SSR. I wanted to ensure the Pi could sink enough current to run the SSR, so added a Darlington array chip.

Put the SSR, switched socket, and separate socket/USB wall plug into a 3 gang light switch box. The power comes from the wall via a hacked PC power cable.

After a bit of programming to tie the max31855 thermocouple and ssr into the PID code plus monitoring on the LCD, I discovered my thermocouple is grounded - the max31855 requires ungrounded.

In the end, I'm not satisfied because the thermocouple is no where near the actual temperature as measured by an old fashioned hand-held thermocouple with analog needle.

My thermocouple is super cheapy from Ebay - $6. I will need to breakdown and get one of the $30 from Omega or some other company.

For now, the project is on hold while I ponder my hotplate choice. It is 1000 watt Walmart coil plate that barely gets to 700 fahrenheit. I had to bypass the knob control since it has a built in temperature control thingy. But since its on a socket with a switch, I'm not too worried about it.

For S&G's, do a poll to find out just HOW many people on here even know what you are talking about!

Beagle333
11-28-2015, 12:40 AM
Good luck to ya! I'm gonna stick with the external wiring and box construction problems. ;) I got my newest one 95% complete now.

Elkins45
11-28-2015, 07:48 AM
I bought all my stuff to make mine as a package deal for $50 from a guy on eBay, and I'm told I overpaid. One hacked up extension cord and metal lunchbox later I had a PID. Took an hour, and only a hobbiest level understanding of circuitry.

The Pi would be cool, but I don't think it would be any cheaper and it would for darned sure take more than an hour. That's time I could be casting or shooting.

My most precious commodity is time, not money.

DerekP Houston
11-28-2015, 09:08 AM
I think the raspberry pi would be overkill. I have one, and I use it for watching tv/movies on my big screen from my computer. It is quite finicky as its a hobby/project board and I've had to reinstall the operating system and swap parts a few times. A bit overkill for a PID I think, but its a fun gadget if you are into computers.

dragon813gt
11-28-2015, 09:14 AM
I'd like to see someone write the programing for the PID. It's not just P, I and D that you have to write. There are a bunch of other algorithms that run in the background that you aren't aware of. It's best for 99.9% of members here to buy a box that is preloaded w/ "magic" :)

bangerjim
11-28-2015, 12:54 PM
Just the type K t/c linearization curve is a pain. It is burned into PROMS (along with every other t/c normally) in a commercial-made controller. And you can make changes with a few button presses on a standard controller. Why mess with a PC for a temp change?

Yes there is a whole bunch more programming ( I mean REAL cryptic language programming) to get the functions out of one of those silly little boards to equal a standard off-the-shelf controller you can get for less than $50. The programs I write and use for control systems are all done in pre-configured function blocks like in a PLC. Just drag-n-drop for most functions. But those are very expensive controllers I am working with, not the evilbay stuff people on here buy. One of those could buy you a dozen or more Lee 4-20 pots!

silverjay
11-28-2015, 07:20 PM
I built mine using this controller:

http://www.auberins.com/index.php?main_page=product_info&cPath=1&products_id=1

not hard and the auto tune works great. I move it between a heat treat oven and the casting pot.

salfter
01-28-2016, 11:37 PM
Pi zero needs a laptop or other machine to program it, even for simple temp change. Save your time and $$ and get a commercial ready made working one. Tinker with a DC motor controlled prop or something, not a 700F pot of lead.

Not necessarily. Small touchscreens are available at low cost. I knocked together this temperature controller for controlling beer fermentation:

https://alfter.us/wp/beer-stuff/brewing-with-the-raspberry-pi/

It's a simple on/off job, not PID, but there's no reason you couldn't implement a PID algorithm on the Raspberry Pi. The article includes a description of the 1-Wire/I2C interface board I designed to connect a temperature sensor and a solid-state relay to the Pi:

159394

Action shot:

159393

Is this level of hardware hacking for everyone? Maybe not, but just as I've knocked together a fair bit of my homebrewing gear, I'm not above doing the same with shooting, reloading, or casting equipment if I see an opportunity. :-) It's one more thing to tinker around with...after all, if this were all about saving time, we could just go down to the gun store and buy commercial ammo.

That said, the particular solution described here might not last too long around a lead spill. Either keep it well away from your pot, or consider other I/O options, like maybe a non-touch LCD plugged into the HDMI or composite port and a small USB keyboard, or maybe even a USB keypad if that'd be sufficient for the task at hand. Also, the DS18B20 won't last a second in a lead pot, but something like an LTC2485 (http://www.linear.com/solutions/1430) will connect a thermocouple to I2C (or a MAX6675 (https://www.maximintegrated.com/en/products/analog/sensors-and-sensor-interface/MAX6675.html) if you want to use SPI).

...and all that said, I would be halfway-inclined to just buy a cheapie PID controller off of eBay and call it a day. I think you can get one for the cost of a Raspberry Pi, give or take. :-)

Walter Laich
01-29-2016, 01:33 PM
I see two sides to this, not that anyone asked.

The guys who are using the PID for either pot or oven control...

and the guys who want to experiment Blueberry Pi or whatever it's called (attempt at humor here, folks)

I know enough to build one from a kit but then I think of electricity as water running through a pipe so my skill is following printed directions with plenty of pictures. I'm happy and enjoy casting and powder coating a bit more with my assembly of them with off the shelf parts.

Others like the challenge of taking an inexpensive 'computer thingy' and trying to get it to work for this application. They are happy too.

There are many different roads to bliss, Kung Fu Panda

BACKTOSHOOTING
01-30-2016, 01:36 PM
For S&G's, do a poll to find out just HOW many people on here even know what you are talking about!

Not a friggen clue