Change Arduino Code to Use Relay instead of Transistor (URGENT)

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


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);



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");




if (LM35_control<120)




else if (LM35_control>145)



}//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.


Compétences : Arduino, Génie Électrique, Electronique, Microcontrôleur, Mise en Page PCB

En voir plus : arduino code power monitoring relay, convert arduino code, code igniter change language, code igniter change langage, vbnet code completion change, use change picture look badass, sample iphone code use webview, sample code use paypal website, use change data source pivot table, code use double float mips, call duty multiplayer key code use, code change language, use change drop selected webmaster, can use gmap code windows application, code use sqlite3 database thread environment, zen cart use conversion code, php code change order items, key code use online game call duty, sample code change linux system address, code change fahrenheit celsius

Concernant l'employeur :
( 131 commentaires ) Thiensville, United States

Nº du projet : #11369841

Décerné à:


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.

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(40 Commentaires)