92Views7Replies

Author Options:

temperature controller Answered

i have a code that can increase the duty cycle of the pmw output to control the brightness of my bulb and i have lm35 conneted next to the bulb to sense the temperature and now my problem is i have to add two more additional switches for my gain and make the other two the setpoint of my temp,and i de an attachment of my code

Discussions

0
None
Downunder35m

4 years ago

Don't let us stop you and go ahead.
For some reason I fail to see a question, problem or related details, so I assume you just posted a progess report?

0
None
PapaneEDownunder35m

Reply 3 years ago

my question is how do i input code for the code of pid on the current 1 i'm having

0
None
caitlinsdadPapaneE

Reply 3 years ago

https://en.wikipedia.org/wiki/PID_controller

What are you using as your microcontroller or what language are you programming in? Is this only a simulation or do you have images or schematic to post up? I think you would be using potentiometers instead of switches for your variable input gain and setpoint temp.

0
None
PapaneEcaitlinsdad

Reply 3 years ago

im using arduino uno currently i dont have a schematic of it,and i think the potentiometer will do as well but how?

0
None
Downunder35mPapaneE

Reply 3 years ago

Just start by browsing through the Arduino pages and the avialable libraries - they all come with example code.
There is no use trying to explain to you how to do it if the pure basics are already missing.
Check
for PWM motor and PID control, if you need similar stuff more than once
in your code check the "include" command as well by the examples
provided.

0
None
caitlinsdadPapaneE

Reply 3 years ago

arduino.cc has tutorials on PID with arduino.

I don't know if you have output display in your setup but you can just use the serial print through the USB connection to the PC in the serial monitor to see all of your variables and readings. The potentiometers are analog read and converted to a range of numbers to use in your algorithm. See how to set them up on arduino.cc too. Good luck.