Go Down

Topic: Amperage too high? (solved) (Read 8582 times) previous topic - next topic

jakub014

#45
Mar 17, 2016, 11:10 pm Last Edit: Mar 17, 2016, 11:15 pm by jakub014
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?

Grumpy_Mike

Quote
What is a raw socket
Just a socket, no breakout board, just mount it on strip board:-

Quote
and can I buy it
Socket

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

Quote
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.

jakub014

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?
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.

Grumpy_Mike

Quote
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.

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

Quote
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.

jakub014

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?

JimboZA

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.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

raschemmel

By all means, read the datasheet.

jakub014

#52
Mar 26, 2016, 08:03 pm Last Edit: Mar 27, 2016, 06:29 pm by jakub014
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...

jakub014

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?


Grumpy_Mike

Quote
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?

raschemmel

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.

jakub014

#56
Mar 30, 2016, 05:58 pm Last Edit: Mar 30, 2016, 06:18 pm by jakub014
GM is right.
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.

Code: [Select]
#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?

Grumpy_Mike

What part of
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.

raschemmel

#58
Mar 30, 2016, 06:16 pm Last Edit: Mar 30, 2016, 06:18 pm by raschemmel
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.

jakub014

#59
Mar 30, 2016, 06:27 pm Last Edit: Mar 30, 2016, 06:41 pm by jakub014
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).
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)

Go Up