TMP36 Sensor Not Working

Hi everyone, I am having a problem when I connected the Arduino to the tmp36, it seems to read properly and I coded for the fan to adjust the speed to the corresponding temperature. However, as soon as I unplugged my Arduino from the computer, the fan just ran at max speed without speed adjustment whatsoever. I was thinking that it was properly due to tmp36 not reading anything when I disconnected the board from the computer. Any solution for this?

My circuit consists of 2 lithium batteries that are powering L298N (connected to the motor) and I connected the 5v+ and the GND of the L298N to the Arduino to power the Arduino.

Sonds like a bad powering but without having seen your wiring it's impossible to tell. The description in the following paragraph isn't sufficient.
An L298N doesn't have a 5V pin, so I guess you use a breakout board with such a pin but you didn't provide a link to it's schematics.

1 Like

This is where your code and a schematic would go a long way. I assume based on temperature you are using PWM to control fan speed? Should that be true is a fan a 3 wire or 4 wire fan, a link to your fan would help?

Ron

1 Like

You have a power supply problem, without an annotated schematic showing how you actually wired it showing all connections, power, ground, supplies etc I cannot be of much help. Also post links to each of the hardware devices. Your choice of motor driver is about as bad as you can get. You lose about 3 volts to your motor using that which is burnt up as heat.

Thanks for the advice!

Here is my link for the motor: https://www.amazon.com/AUTOTOOLHOME-Torque-Traxxas-Wheels-Electric/dp/B01M58POHF/ref=sr_1_33?crid=35L4PL0NCLVE7&keywords=5v+dc+mini+motor&qid=1685633094&s=industrial&sprefix=5v+dc+mini+motor%2Cindustrial%2C131&sr=1-33

And here is my picture of the schematic: https://drive.google.com/file/d/1YQFb_MM1CxOTWmba2jMlmQB5yPxp7XK3/view?usp=sharing

I made the circuit based on this:

Instead of the voltage booster, I have 2 lithium batteries providing 7.4V to the board. And I hooked L298N to the Adruino similarly to this video: https://www.youtube.com/watch?v=Ey4xoG970Go&list=LL&index=32&pp=gAQBiAQB&ab_channel=educ8s.tv

Also, I measured the voltage of the TMP36 when connected to the Arduino and it seems like it was received 4.2V for the 5V and 3.3V spot on when I joined it to the 3.3V+

You really expect us to watch a 10 min. video just because you're too lazy to draw a wiring diagram?
Get a piece of paper a draw your wiring, make a photo and post it to this forum!
Post links to all hardware components used!

Sorry for my lack of work ethic. I have drawn this out, hope this helps, and feel free to make any suggestions to this! The drawing is the continuation of the schematic I posted above. Instead of "device", I replaced it with the schematic down here.


My Uno board: https://camelcamelcamel.com/IEIK-Development-ATmega328P-Atmega16U2-Compatible/product/B00P2FX9WY
L298N: https://www.amazon.com/Qunqi-Controller-Module-Stepper-Arduino/dp/B014KMHSW6
TMP36: Temperature Sensor - TMP36 - SEN-10988 - SparkFun Electronics

Hi, @kipd4321
Welcome to the forum.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Please show how you are powering your project with the PC disconnected?
What power supply are you usig?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.