PID Controller using microcontroller

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

jbrewkeggin

Well-Known Member
Joined
Mar 11, 2012
Messages
45
Reaction score
4
Location
Baltimore
Does anyone have any guidance for implementing a PID controller using a microcontroller or just a computer program? I'd like to do try one of these two implementations, but I need some PID code to start with.

-Jbrew
 
A bit of an open ended question there. What microcontroller are you going to use and what language do you want to use?

If you want a Microcontroller that all the basic hardware stuff has been done like crystal speed and power supply then I would go with Arduino board http://www.arduino.cc/. It's fairly easy to learn and they have a lot of libraries to use including a PID library and its based on c++.
If you want to build one from the ground up then there is a lot of microcontroller but I would say the most popular one would be Microchip's PIC, it had a free IDE with a c complier in it, there is a huge range of PIC's as well for really basic 8bit one's to 32 bit one's. Here is some code for a PIC PID controlled heater http://www.microchipc.com/sourcecode/PIC_Hi-Tech_C_Mike_Pearces_heater_project.zip

cheers steve
 
Great suggestions, thank you! I've actually been looking at that code you suggested already. I currently have a Basic Atom which is build around the 16F876 PICmicro MCU, and I was exploring using that. I could possibly go with the arduino too. Thanks again.

-Jbrew
 
I went with the arduino because my PIC board isn't directly supported in linux. I tried using wine(not sure if you're familiar) and got some strange results when trying to compile BASIC code in the IDE.
 
Back
Top