Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html.
Thanks.. Tom.. ![]()
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html.
Thanks.. Tom.. ![]()
Ok guys, this is what happens as it is shown in the picture I have an stand alone atmega 328p with a blinking light and a HC-SR04 ultrasonic sensor, the idea is to collect distance data and send it though the serial port to an arduino uno. as you can see in the picture the ATM328 is powered by a 9V battery that uses a LM7805 regulator and two capacitors 100 and 10 uf respectibly to produce 4.95V.
once I connect the circuit it looks to work fine, the led blinks as it is suposed to do, but when I check the serial port nothing comes from the ATM328.
for debugging porpuses I have disconnected the 9v circuit and powered it with the 5V and GND of the arduino uno and It work perfectly, even the serial port receives the data, once I disconect the arduino power and connect the 9v circuit, it looks to work fine, the led blinks as is suposed but nothing comes from the serial port.
what it is more confusing is that if I connect either the 5v or GND of the arduino (I draw a pulser in the sketch), while it is connected it works!!. ![]()
so the final question would be, why the serial port doesn't work with the same theoretical 5v and furthermore what should I do to the stand alone atmega to work.
thanks for your time ![]()
I don't know much about analog electronics but the capacitors you have around the 7805 are far far bigger than in the 7805 datasheet that I have.
Have you tried replacing the 9v battery with a different source - in case the problem is the battery?
...R
yes, I try it with an AC/DC Adaptor it says Output 9V 1A, and it does not work
carloshdelreal:
yes, I try it with an AC/DC Adaptor it says Output 9V 1A, and it does not work
Looking at your diagram again, I don't see any GND connection between your Atmega 328 and your Uno. A GND connection is essential - so much so that I did not think it might be missing.
...R
Hi,
Even though you have both controllers powered from different sources, for them to communicate you must have a common gnd connection, you have SW2 isolating the gnds.
Remove it and replace it with a link.
Tom.... ![]()
ohhh thank you, you have iluminated me, the requisite is that the AT328 and the arduino must share the same GND, any body knows why is that???
carloshdelreal:
must share the same GND, any body knows why is that???
The common GND provides a reference from which they can detect HIGH or LOW signals.
...R