hello forum. i am building an application, and i am using a standalone Atmega chip. i want to be able to use serial comunication with computer, so i have the arduino TTL to USB serial light adapter. the thing is, i want to have my atmega chip , powered from a diferent power source. not the usb.
so, if i DONT connect the 5v, and GND of the serial adapter,and just connect the RX and TX will this work?? will i be able to program the arduino,(use the external reset), and do serial comunication??
and just connect the RX and TX
You have to connect the grounds too
Connect the ground pin as well, you need to have a common ground. Other than that - it should work.
As others have said, you need a common ground. If your power supply ground is common to the USB ground, then you don't need to connect the ground from the USB-TTL adapter.
cooool! i did that, and it works BUT, as soon as i connect the atmega to power (with the ttl to usb connected and the usb cable disconnected ) , the "ON" led of the adapter, turns on?? how is that possible?? i only have the TX.RX.GND and EXTrst connected...
does it get power from the tx,rx lines?? or is there something wrong with my board?
the code i use btw is :
void setup() {
Serial.begin(9600); // same as in your c++ script
}
void loop() {
Serial.println("10000,20,60,1,1,1,1,350,8,9,");
}
the reason i want to have them isolated, is because, in case the atmega power supply fail, i dont wont it to give any big voltage spikes, back to the USB line...
If the Rx or Tx lines are high, power can flow thru their internal IO protection diodes to power the device and parts connected to it. The device should have power from some source or you violate the requirements of no signal having a higher level than 0.5V above VCC and 0.5V below Gnd.
settra:
does it get power from the tx,rx lines?? or is there something wrong with my board?
I wrote about something similar (power from the sck and MOSI lines) when programming ATTiny85's:
Yes, most likely parasitic powering via the converters I/O pins. You could wire series resistors on the rx and tx lines to reduce the current flow but that is just treating the symptom. It's almost always a problem when you have two circuits or modules wired together but only one being powered and can indeed lead to damage in some cases.
It's always recommended to have a way to apply and remove power to all parts of a connected project unless you have some form of protection.
Lefty
What you clearly need, is two Schottky diodes.
thanks for the replies guys!!. i cant really provide a common power supply, becouse, the project is , a car diagnostic, wich reads the sensors, and will also power some things in the car, and on the other end, a tablet, connected via usb, with a specific power supply (There are reasons i cant use the same, but they are irelevant to the post )
how would i go, using the skotchy diodeS?
settra:
How would I go, using the Schottky diodes?
One added to the serial converter from V+ on the connector to its 5V line, and another from the 5V on your ATmega also to the 5V line of the adaptor. It means that the serial converter itself is always powered but power cannot cross back to the USB.
cool! thanks allot for the replies!!!
Paul__B:
What you clearly need, is two Schottky diodes.
Or for even lower voltage drop than a schottky, a PNP transistor with a ~100k resistor to ground. It should be good for ~50mA with a drop of 0.1-0.2V depending on the transistor.