Change Arduino Code to Use Relay instead of Transistor (URGENT)
$10-100 USD
Completed
Posted over 7 years ago
$10-100 USD
Paid on delivery
I have code for a project that uses transistor as on and off switch for a heater. The heater is 12v 100watts which is about 8.3 amps. The problem is my TIP122 transistor overheats.
I am already using IN1 on this project for a solenoid. I would like to change the code to use IN2 to turn on and off the heater.
This is the relay I'm using
[login to view URL]
and this is the heater
https://www.amazon.com/gp/product/B016ZPLLOM/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
This is a sample of the code that needs to be edited.
////////////////////////////////////////////
total = total - readings[index];
float temp = analogRead(tempsensor);
//[login to view URL](temp);
//delay(1);
//Filter
readings[index] = temp;
total = total + readings[index];
index = index + 1;
if (index >= numReadings)
{
index = 0;
average = total / numReadings;
LM35_control = (5.0 * average * 100.0) / 1024;
// (T(°F) - 32) × 5/9
LM35_control = LM35_control*9/5+32;
[login to view URL]("Temp: ");
[login to view URL](LM35_control);
[login to view URL](" F");
UpdateScreen();
}
//////////////////////////////////////////
if (LM35_control<120)
{
analogWrite(heater,200);
}
else if (LM35_control>145)
{
analogWrite(heater,0);
}//put your main code here, to run repeatedly:
if (validReceived)
{
So if the temp is below 120 then the heater turn on. If above 140 then turns off.
I need it done asap as I have customers waiting for product.
Thanks,
Hello dear
I have experience in designing electronics circuits and can make your project. i will make your project practically on breadboard and will provide you circuit and code If you wish we can discuss in chat.