Go Down

Topic: Board design suggestion (Read 285 times) previous topic - next topic

saki003

Jun 18, 2019, 07:59 am Last Edit: Jun 18, 2019, 10:49 am by saki003 Reason: picture of concerned part of circuit
I have a circuit which uses two arduinos( mega and nano). These two boards communicate via serial as well as through some digital pins to each other. Both boards are powered by one 5v regulated supply connected to 5v pins of both boards. But the problem is I want to communicate with arduino Mega  through usb on serial monitor. Now problem is if i don't remove 5v supply to mega and connect it to usb, my laptop does not recognizes usb port( so I can't communicate with laptop) and if I remove 5v supply to mega and connect it to usb then phantom current passes from arduino mega to nano until nano turned on via power supply. So I need suggestion for board that if I want system to work normal on 5v power supply it take power from that and If I want to communicate to Mega, both controllers(mega and nano) get powered by one usb so there is no mismatch of timing of power on of both controllers.
I first thought that if will connect pwer arduino mega through usb then it will be able to power nano through its 5v pin but it does not. So I am clueless here.

GoForSmoke

Do you have the grounds connected?

And regulated 5V is different from USB 5V by enough to matter?

This bit is why I ask:
Quote
if I remove 5v supply to mega and connect it to usb then phantom current passes from arduino mega to nano until nano turned on via power supply.
Did you leave the 5V supply to the Nano connected? But if so, the Nano should run on that and not "phantom power".

One possibility is that you are not taking care of grounds properly, so I ask.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

saki003

I will rephrase my problem to make it more clear.
I want to know if it is possible that  both boards could be powered  simultaneously either through power supply or through usb. If i want to debug system I pull jumper from main power supply and connect mega to usb and both controllers get powered by usb and after debugging I remove usb and put jumper back and both controllers start getting power from 5v supply.

wvmarle

Do post a schematic drawing of what you have in mind - that talks a lot easier.

I think it's possible to do what you have in mind, but not sure based on just the description.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

saki003

Do post a schematic drawing of what you have in mind - that talks a lot easier.

I think it's possible to do what you have in mind, but not sure based on just the description.
uploaded the picture

wvmarle

Two questions.
1) why making us scroll back to the thread to hunt down your image, instead of attaching it to the latest reply?

2) where is the power supply in that image?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

saki003

2) where is the power supply in that image?
Power supply is connected to 5v pins through jumper. I taught this was obvious.


1) why making us scroll back to the thread to hunt down your image, instead of attaching it to the latest reply?
Sorry I am new here. I tried to upload in post but that require only url of already uploaded picture on web so I uploaded in original question.

wvmarle

I've long ago learned to not assume the obvious, especially as you've been talking about both 5V supplies and running from USB in different configurations. What is not in the image is considered unknown.

For adding attachments to your post, use the Preview button to go to the full editor.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

saki003

I've long ago learned to not assume the obvious, especially as you've been talking about both 5V supplies and running from USB in different configurations. What is not in the image is considered unknown.

For adding attachments to your post, use the Preview button to go to the full editor.
ok then
will this help

GoForSmoke

If you wire GND of the Mega and Nano together and 5V from both together then 1 supply may run both as long as it has enough current. Standard 500mA USB has the current. If you have 1 board with both chips they would get common power.

1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

saki003

If you wire GND of the Mega and Nano together and 5V from both together then 1 supply may run both as long as it has enough current. Standard 500mA USB has the current. If you have 1 board with both chips they would get common power.


I don't know why I could not clear my self. both controller work fine together on 5v supply ( That is not the issue). But I want that if I pull jumper to cut supply of both controllers and insert USB port in mega. So I could debug the system as well as power both controllers from one USB connection to mega so there is no chance of phantom current passing( because if I will only power mega from USB and nano from 5v input then there is always chance of phantom current)

GoForSmoke

Phantom current?  The USB 5V is not the same as the power supply 5V? One is higher than the other, maybe 5.5V?

What I suggest is powering the Mega and using Mega 5V and GND to power the Nano, whether the Mega power is USB or plug-in supply or batteries.

1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

wvmarle

OP's schematic:


That's a lot clearer. Especially as it shows that mysterious jumper you were talking about.

But I want that if I pull jumper to cut supply of both controllers and insert USB port in mega.
The USB is connected to the 5V pin (I remember there's a polyfuse and a MOSFET for power selection in the path as well  - check the schematics for details - you can pretty much consider this a direct connection) so this way when you have the USB connected to the Mega, the Nano will simply be powered through the 5V pin of the Mega. No problem there as long as there's not much else connected to the Nano.

Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

saki003

That's a lot clearer. Especially as it shows that mysterious jumper you were talking about.

The USB is connected to the 5V pin (I remember there's a polyfuse and a MOSFET for power selection in the path as well  - check the schematics for details - you can pretty much consider this a direct connection) so this way when you have the USB connected to the Mega, the Nano will simply be powered through the 5V pin of the Mega. No problem there as long as there's not much else connected to the Nano.


You are right. There were 5v available on mega 5v pin which were enough to derive nano too. Thanks for clarifying. I checked on nano board. It was not giving 5v. May be nano have different circuit.
You were right about not assuming the obvious. Thanks again.

wvmarle

USB output is usually a little less than 5V, 4.6-4.7V is common.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up