I was wondering what all factors do i need to consider when switching between the Arduino due and Arduino mega 2560. I understand i can google the topic but you can research and find information all day about different considerations to take into place.
Current Questions with some research:
1. Arduino due's digital pins output 3.3v or cmos logic with only 130ma total over all 54 digital lines which is ~2.4ma available
for use on each line (sink or source or does it change those factors).
Arduino mega 2560 digital pins output 5v logic with 40ma of current per digital line which totals 2160ma.
Will the Arduino due be able to drive i2c lines with a 16 pin mux, accelerometer up to 5 more devices while recieving serial data and sending serial data along with a few other task that require sending 5v logic levels to devices?
Currently with i2c im using 2.2k pull up resistors on a 20 pin buss i made to easily connect multiple deices.
If i use resistors on my i2c lines for the Arduino due what size should i make them?
PS) How is the forum community around here? seems to be fairly active, i havent been on a active on a forum in a while and with this project ive started ive been finding it hard to find questions to tough projects and I am looking for a good forum to provide good assistance and a good community of smart thinkers to help me progress this project idea ive been stuck on for the last 6 months. Any ideas? If this is the right forum for my problems then please say so. Thank You.
Arduino mega 2560 digital pins output 5v logic with 40ma of current per digital line which totals 2160ma.
Incorrect. The IO is limited to 800mA total, see Electrical Characteristics notes (section 29 or 30) for how the 800mA is spread across the ports.
40mA is also an absolute max - after 20mA, you may see degradation in voltage level (High will droop, Low will rise).
This is the right forum for your problems. Maybe not this particular one, Project Guidance, you may end up posting in different areas depending on your problem.
I2C requires Open Drain hardware (or open collector, CMOS parts will be open drain) and 2.2K to 3.3V should not be an issue.
Quote
Arduino mega 2560 digital pins output 5v logic with 40ma of current per digital line which totals 2160ma.
Incorrect. The IO is limited to 800mA total, see Electrical Characteristics notes (section 29 or 30) for how the 800mA is spread across the ports.
40mA is also an absolute max - after 20mA, you may see degradation in voltage level (High will droop, Low will rise).
Very true so you would never actually be able to reach the 2160ma.
With only having 800 ma from the regulator, you could draw quite a bit of the total current available in the circuit if all digital pins were source 20ma per line.
How does this collate to the arduino due? Should i just put a transistor at each output pin and bring the level back to 5v? with as much current as my transistor can source? I am in the middle of deigning hardware positions and need to know what limits these values will effect the performance of the system? I understand the basics of the library usage and 5v sensors its the interfacing that i guess is my issue along with different current aspects to account for.
Yes, you can use pullup resistor to 5V for a high, and Due turning the transistor on to create a low. Then you are not Due output current limited.
Or use a level translation chip, serve 8 outputs at one time - similar for inputs. Use far less components/space. Pick a part that can sink/source the current levels you want to support.
74HC4050
is often used 5V to 3.3V conversion.
Going the other way, 3.3V to 5V, most parts will accept 3.3V as a good high signal.
If not, a 74HC4050 powered from 5V will accept down to High output levels as valid high inputs - See Vih on page 6. Only has 4-5mA output drive current, not really enough for LEDs, but you can always add cd74AC164 shift register for high currents, or TPIC6B595.
I've considered using a level shiftier but was looking for a flexible solution other than, but as you mentioned, components take up space and weight, the level shiftier i bought is a 16 ch (2 8 ch level shiftier combined on one board). I guess i need to just turn the level shiftier i have into a shield to make connecting components easier.
The single chip level shiftier with 8 channels seems to be the better route as it is cheaper, (30-60 cents ea) and i can create what ever components i need to build.
What im looking to do with alot of this level shifting is too communicate between micro-processors specifically the due, Arduino mega, and Intel Galileo. Still deciding if i just want to use 3.3v for the entire system. Could the arduino mega be run at 3.3v? Ive never actually tried it.