I am working on a project where I am passing a keyboard press to a series of Pro Micros with a master Leonardo sending the Key press. These Pro micros are powered only when they are plugged into a computer through USB. These are also connected "daisy-chain" over serial tx / rx. To my surprise I have found that say if in the four Pro Micros that I am testing, that if the first and the last Pro Micro is powered on by USB, the non-powered on Micros chained between these are still passing on my key presses. This overcomes a huge logistical hurdle for me as I was looking into running serial in parallel with serial port expanders to accomplish this, so a user can essentially use any port and the key press will be passed on. Is this how these should function? Is something connected incorrectly or is there a physical connection between the rx and tx port even when powered off? Does anyone have any thoughts on how many hops or passes through unpowered Pro Micros this would work? I'm hoping to eventually connect up to 40 Pro Micros potentially. Is this limited by distance or should I use a particular baud rate? The distance is short only maybe 2 feet max.
I suspect it is not good for the Pro Micros (or any Arduino) to be drawing power from the Rx and Tx lines. The absolute max permitted current on an I/O pin is only 40 mA. I reckon you risk damaging the I/O pins.
...R
What sort of Pro Micro, their is a 5V version and a 3V3 version.
What is happening is known as parasitic powering and it can destroy your Arduino. You probably have damaged it already. Carry on doing it and you will damage it beyond functionality.
If you want to power from one USB connection then chain the 5V output from one to the 5V of the next. Assuming you have 5V ProMicros that is.
Interesting, it is the 5v. So am I to assume all of the unpowered micros are now damaged? Throughout the day using my device it seemed to work fine after I did this so maybe I dodged a bullet. So what exactly is happening is the voltage traveling through the tx and thx pins then? This brings up another topic how should I go about powering all of these? Potentially I'd like to connect maybe 40 of these, but connecting these over the 5v line and using the power supply from my Leonardo isn't going to be good enough I'm assuming, is there a suitable power supply I could use?
Edit: Poor reading, so I should be able to chain these along 5v no problem?
So am I to assume all of the unpowered micros are now damaged?
Yes but it is most likely that the damage will only show up as a premature failure, that is it could fail in say 5 years instead of 10.
What happens is that the anti static diodes that are on the pins to each power rail conduct a voltage from the input pins to the rail and power it up. These diodes are not rated in the data sheet so we don't know what the maximum current is, but they are likely to be physically very small and so have a very small current rating. They could fail short, in which case the pin would not work, or they could fail open meaning their would be no static protection on that pin and so could suffer further damage from static discharge.
Each micro takes about 50mA plus anything being sourced from the output pins, so add them up to see if you have enough current available to power them all.
Hi,
You need another system to RS232.
Google RS485.
I think you are after what is called a mulitdrop network.
How far apart will your devices be?
Thanks.. Tom..
Maybe an inch apart, I have them in this usb patch panel right now testing 4 in a row and that seems to be working okay aside from this power issue I just discovered.
Apologies for my ignorance on power related issues, this is all awesome information. Does anyone know a good primer on power related things? I've tried some general searches and having trouble finding anything that pertains. Also when you say
Each micro takes about 50mA plus anything being sourced from the output pins, so add them up to see if you have enough current available to power them all.
Whats the formula that i am using. Do i convert the milli amps to volts to ensure there is enough current? One calculator I found says that's about .05 volts or I am thinking about this all wrong. Again my knowledge here is pretty limited. Thanks.
voltage = current * resistance. That's the relation between the two.
You can't just replace one with the other. You power with 5V, and each device then draws a certain amount of power.
It's often compared to water pipes: voltage is like the water pressure, and current is like the water flow.
Whats the formula that i am using.
Number of devices * 40mA = Total current.
Or looked at another way, if you have 400mA available then :-
Number of devices = Total current / 40mA
which is
400 / 40 = 10 devices.
Do i convert the milli amps to volts to ensure there is enough current?
You can not do that, it does not make sense.
One calculator I found says that's about .05 volts
I think you are misunderstanding what that calculator is telling you.
Does anyone know a good primer on power related things?
I did write this:- http://www.thebox.myzen.co.uk/Tutorial/Power.html but this is possibly more advanced than the level you are at currently. I think you need to work through the fundamentals of electricity, series & parallel circuits. Ohms law and power.
The word power has two meanings in electronics:-
-
To supply electricity to something. This is not very technical and is perhaps what you are thinking by the word. So you power something, like powering a light bulb.
-
The exact amount of electricity something takes in watts. You can calculate the number of watts by multiplying the current by the voltage. This is not helpful if your understanding of the word is as in 1) but it is sometimes used to indicate the rating of a device like a light bulb. A light bulb might be rated as 100 Watts @ 240V. In which case you can calculate the current you have to supply:-
watts = current * voltage so :-
current = watts / voltage
But as it is not very useful to describe the power consumption of an Arduino in terms of watts then we don't.
Have to add: "power" is very often used as synonym for "current".
Thanks for primer, I've got a lot to learn here it would seem. Reading around, USB 2.0 has a max of 500mA, and maxes out with 900mA with an external 5v power supply. If I needed say 2000mA / 40 devices, would I need an entire power supply unit. I'm assuming the Leonardo is maxed at 900mA I couldn't say purchase one of these im assuming? I need supply more like this correct?
If at 5V, just get a mobile phone charger. They generally can supply 2A, some even more.