Amperage too high? (solved)

Im still wondering what the ports of this board (VCC, GND, ID, D- and D+) are or which of them I need

You need just VCC, and GND to power your system.

I would advise against that micro connector. In my experience with the Raspberry Pi, these coupled with the lead often have a high resistance. As you are driving a high-ish current through them this can lead to an unacceptable voltage loss. Best go for the full size connectors.

So you would recommend me this one or none of them?

No. Look at the USB socket that is on your Arduino. Use that type.

Ok I got 2 final questions:

  1. I dont find any full size USB B breakouts, just micro or mini....
  2. Im not sure what 0.1uF cermaic capacitor I need because they have always high voltage data. Can you show me one, which is suitable for this project?

I dont find any full size USB B breakouts, just micro or mini....

Then get yourself either a raw socket OR a power supply with wire ends.

Im not sure what 0.1uF cermaic capacitor I need because they have always high voltage data.

The voltage is unimportant. But it has to be a ceramic capacitor.

Grumpy_Mike:
Then get yourself either a raw socket OR a power supply with wire ends.

I already got a power supply with a USB port, so Id prefer not to buy another one.
What is a raw socket and can I buy it? Otherwise I'd try to use the breakout you advised against because of its possible resistance. If I get a lower voltage it wouldn't harm my project, would it? So I'd try it out.

my last question regarding the capacitors is: Is a tolerance of 20% ok or should it be less?

What is a raw socket

Just a socket, no breakout board, just mount it on strip board:-

and can I buy it

Socket

If I get a lower voltage it wouldn't harm my project, would it?

Yes it would.

Is a tolerance of 20% ok

Fine.

I am quite concerned with all these very very basic level questions. If you don't know this stuff then it does not bode well for the much more complex stuff of getting the actual chips wired up and programmed.

Grumpy_Mike:
I am quite concerned with all these very very basic level questions. If you don't know this stuff then it does not bode well for the much more complex stuff of getting the actual chips wired up and programmed.

To be honest, in my opinion the hardest part is to know what components you need. The programming shouldn't be that difficult because I can't that much wrong just toggle the LEDs off and on. Regarding the wiring: if I stick to the schematic I should be able to manage this.

If I get a lower voltage it wouldn't harm my project, would it?

Grumpy_Mike:
Yes it would.

Really? Why? If Ill buy this part is there an easy way to check wether this part has a high resistance?
Also I looked up for a USB cable with open wires on the other end, but didn't find anything. In an early post you mentioned to cut an USB cable. Would the problem be solved if I just get an USB cable and cut it like this:

I'm really sorry for bothering you for so long, but I hope this is the last problem to solve.

is there an easy way to check wether this part has a high resistance?

No, it is something they don't tell you. I ended up measuring about six cables and they were all different, some were good, some bad and some in between.

A lower voltage on the Arduino could mean it would stop working. The Arduino can work at a low voltage but not at the full speed.

Would the problem be solved if I just get an USB cable and cut it like this:

Yes.

The programming shouldn't be that difficult because I can't that much wrong just toggle the LEDs off and on.

Have you read the data sheet? There are a lot of registers and options in that chip, it has to be set up correctly.

Grumpy_Mike:
Have you read the data sheet? There are a lot of registers and options in that chip, it has to be set up correctly.

Can you tell me how to set it up correctly or should I ask in a new thread about that?

jakub014:
Can you tell me how to set it up correctly or should I ask in a new thread about that?

I'd say you should read the data sheet and figure it out for yourself, only asking for specific help if you get stuck.

By all means, read the datasheet.

I'm apologizing in advance for my incompetence and this inappropriate question, but:

I've read the datasheet but I'm still not sure what you meant by setting the chip correctly up. I think you meant this part of the sheet:

(default: all bits 0)
If I use the default configuration I don't see any problems turning the lights on and off over the registers GPIOA and GPIOB (registers 12 and 13) but I might be completely wrong...

Hey, I'm sorry for asking that many basic stuff I hope this is the last question.
I've connected all wires like in the schematic on page 2. I added 2 4k7 ressistors at the beginning of the SDA and SCL line and 0.1uF ceramic capacitors between every SDA and SCL port of the 8 port expander chips. The program on the arduino should open some ports(output) to turn LEDs on.

So if I turn on the power the arduino starts working(orange and green light of the arduino are on) but nothing else happens. My thought is that the SDA and SCL lines can't reach/communicate with the expander chips. Do you know what the problem is?

and 0.1uF ceramic capacitors between every SDA and SCL port of the 8 port expander chips.

The capacitors should be between the power and ground of thes chips, not on the SDA and SCL lines.
Have you wired the address selector pins differently on each chip?

Have you got the address correct? Post the code, in code tags, of what you are trying to use.

Have you tried an I2C scanner program to test if the Arduino can see those chips?

GM is right. Your description of the wiring inReply #53 suggests you have miswired it 9 ways from sunday ( especially the part abiut the two 4.7 k ohm resistors, which may or msy not already be on a breskout board if the I2C chips are on a breakiut bd.) Also yiur description of where you put the 0.1 uF decoupling caps siunds wrong as Mike mentioned. At this point there's nothing we can do without a schematic. Post a schematic.

raschemmel:
GM is right.

Grumpy_Mike:
The capacitors should be between the power and ground of thes chips, not on the SDA and SCL lines.

That was the problem and completely my fault. Im sorry.
Unfortunately theres still something not working at my project. If I run my programm everything works fine, but after some time the arduino just stops working/freezes.(arduino lights still on) The programm just gets stuck at some point. If I press the reset button at the arduino the program starts again but gets stuck again. The points when it stops working are mostly different. I've tried waiting for about 10 minutes but nothing happened. I used different codes to find the problem but it gets stuck always at some point. Here is the code I use at the moment.

#include <Wire.h>
void setup() {
 Wire.begin();
Wire.beginTransmission(0x20); 
Wire.write(0x00); 
Wire.write(0x00);
Wire.endTransmission();
//the setup sets the pins of IODIRA to outputs 
}
void loop() {
for(int i=0;i<256;i++)
{
Wire.beginTransmission(0x20);
Wire.write(0x12); //0x12 register to set output low and high at GPIOA
Wire.write(i);
//the chip converts this value (in this case i) into a binary number and sets output high if theres a 1
delay(200);
Wire.endTransmission(); 
 }
}

If I run this code it usually gets stuck between i=2 & i=6.

Can too long wires be the reason of this problem?

What part of

Grumpy_Mike:
Post the code, in code tags,

Are you having trouble with?
Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.

Edit your post using the MODIFY button , highlight the code , and select the CODE TAGS [</>] toolbutton (first button from the left) and click SAVE.

Where's the schematic ?
We still don't know what you did with the 4.7 k resistors.

raschemmel:
Where's the schematic ?


This schematic shows only one expander chip. The other expander chips look similar except to A0,A1,A2 and the 4k7 resistors (these are only at the first chip).

raschemmel:
We still don't know what you did with the 4.7 k resistors.

I put one on the SCL and one on the SDA line at the beginning (between A4, the sda port of the aduino and the sda port of the first chip, same goes for A5 and scl)