How can I solve atmega328p-pu resetting while it is supplied from power supply - atmega

Currently I am using a dip Atmega328p-pu with a breadboard built circuit. The problem is when i am supplying the circuit from Arduino Uno's 5V it is working perfectly fine, but it's not working when I supply it from power supply. When I mean not working, it has the typical blink code in it and it works perfectly fine with uno's 5v, but it keeps resetting or freezing in one part of code -the led just lights instead of blinking-
The circuit has 10k resistor in first pin, 16 mhz crystal, 2x22 pf capacitors near it and all power connections are also connected
Thank you

Related

Arduino Relay Modulo stops working

I have an Arduino controlling a lamp through a relay module, everything works fine for some hours, but now it stops working. The led to on/off as expected, but i cant hear the "click" anymore, and now it is always on.
A relay module can burn out? My lamp is 250w/110V
Problem SOLVED: The issue was that i had others sensors connected to Arduino 5V output pin (the relays was already on a separated 5V), and that was getting current from arduino board causing arduino not able to turn on the relay coil.
After change sensor to use a separated 5V source (with more current) everything works fine again.
My advise: be careful to use arduino 5V or 3.3V as a source power because it has low current, causing errors or even restarting arduino.

Problems with pins for interruption and motor DC - Arduino UNO

I am working in a project which requires me to read the velocity of a DC motor with a quadrature encoder. I am using the Arduino UNO board and for some weird reason the motor just works if it is connected to the pins 2 and 3. However this pins are reserved for the interruption (where I intended to connect the encoder). How could I solve this problem?
Assuming the arduino can provide enough current, you should be able to run the motor from any output pin, check out this diagram for reference. You should also make sure you have the necessary protection circuits in place. This is a good starting point: https://create.arduino.cc/projecthub/licensedGeek/controlling-a-dc-motor-from-an-arduino-101-board-f4954b

Trouble with Digital Temperature Probe and ESP8266

I am having a hard time troubleshooting this project build of mine. I am trying to utilize a DS18B20 temperature sensor in conjunction with an ESP8266 to create a temperature beacon.
The problem I'm running into pertains to the data interpreted by the ESP8266. I am using the Arduino IDE to program the HUZZAH ESP8266 breakout.
The WiFi client is behaving as supposed to, but the temperature sensing is not. When I upload the same sketch to an Arduino Mega2560 (recompiled obviously), and plug the data line into a digital pin of the 2560, the probe temps come in perfectly, changing according to the temp. If I unplug the data lead, I get -196.80, what I assume is a ground value.
Simply moving the data line into the ESP8266 pin, I receive a temp of 262.29 and this does not change in between reads, regardless of sensor temperature.
I have ensured all of the cables are wired properly, there is no weird grounding or anything. I have tried changing the baud rate of the serial interface maybe thinking the clock had something to do with it, but that seems to have affected nothing.
Any idea/direction is always appreciated!
I have wired the circuit according to a diagram located at this link here.
Here is a Gist to the code that I have been uploading to the ESPs. The code is designed to setup a WiFi Client (attached to a local AP, which works totally fine), request the temps, and submit up to a host that has a listening server. The pin (2) refers to GPIO2 on ESP8266 [i think]
So I found A solution to this. I'm not sure if this particular problem has been replicated for everyone, however, in my situation, the parasitic power on the data line was not charging the IC enough to finish the proper calculation.
All I had to do was unground the VDD pin and hook it up to the 5V rail. Leave the 4.7kOhm resistor on the data line also pulled up to the 5V rail. After doing so, the program reports PARASITIC POWER: OFF, and reports temperatures as I hoped!
I changed my post above to include a working solution!
The DS18B20 device can operate in 2 power modes (normal and parasitic). In the case of parasitic power, the VDD pin is jumped to GND and the IC receives power from the data line that is connected back to a micro-controller.
An interesting quality of the DS18B20 is the power draw during temperature sensing. While operating in parasitic mode, the host device needs to be able to supply the IC with enough power to complete the calculation, otherwise the device will return a bad answer.
The solution for me (using an Adafruit HUZZAH ESP8266 micro-controller) was to not use parasitic power. I cannot say for sure what the problem with this setup is, however, when configuring the circuit in normal mode, the probe worked as expected. I imagine the data line isn't getting enough power.
To change the circuit from the diagram linked above:
Remove the jumper between VDD and GND pins
Connect VDD to 5V rail
Keep GND to GND rail
Keep 4.7kOhm resistor pulling data line up to 5v rail

ESP8266 turns off after some time

I have a ESP8266 wifi module connected to an arduino uno. On the ESP8266 I set up a socket server witch is working fine. And I can communicate with it as I expect.
After having run the ESP8266 some time (like 5-10 minutes) it automatically turns off (or goes into some kind of sleep mode. The LED turns off). I then have to re power the whole thing and reset it using the reset pin.
Why is my ESP8266 turning off and disconnecting from the WIFI?
Maximum current draw from this voltage regulator on the Arduino Uno is 50 mA. It's surely not enough for ESP8266.
You need a power supply with at least 700 mA to make sure it works properly (ESP8266 usually takes about 60 mA but according to my experience the current draw can be very high during the startup).

How to prevent Arduino's digital pins goes high on bootup?

I have done my project finally :) , but i noticed that the arduino board on startup it's some digital pins goes high for a bit time 1 seconds or little more! and this causes problem in my project because i'm using it in starting dc motor.
I forgot to mention that i have 2 relays connected with arduino and they are triggered on arduino startup or with resetting it, then my code works perfectly. I tried doing pull up resistor and pull down resistor but it seems same situation. Also tried (INPUT_PULLUP) and no result.
Any suggestion please?
I had the same problem when booting the arduino/connecting to a power source. Only using digitalWrite(pin, LOW) in void setup() did not work for me.
Every pin needs to be connected to a physical pull-down 10kOhm resistor in parallel to whatever you're controlling.

Resources