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.
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?
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.
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.
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?