Go Down

Topic: DS1307 read error! (Read 1 time) previous topic - next topic

stevelondon2

It's pretty much a guess, but you can try putting some stronger pullups on the sda and scl lines.
Right... and how the hell do I do that? lol/ Will that involve other components? Other than that, is there any other way of getting the time so that I can call by events when needed?

cattledog

#31
Aug 06, 2017, 09:22 pm Last Edit: Aug 06, 2017, 09:22 pm by cattledog
Quote
and how the hell do I do that? lol/ Will that involve other components?
Two resistors. Try read Nick Gammon's discussion on pullups. or some of the many postings found with forum search on "i2c pullup resistors".
http://www.gammon.com.au/i2c

I assume that there may be pullups on the rtc module already, probably 4.7K.  If so, I'd start by adding another 4.7K resistor from both the SDA and SCL pins at the Arduino to 5v.

gpop1

have you tried with the 12v power supply negative not being attached to the negative buss

stevelondon2

have you tried with the 12v power supply negative not being attached to the negative buss

The 12v thats is connected to the working end of the relays (powering the motors and seems to trigger the error) is a separate plug altogether and not connected in any way to the Arduino.

aarg

AARG - 'excellent work'? I was waiting for a pasting because it wasn't a proper electrical diagram. Lol. Thanks.
It is. I used to work in telecom. The style you have there was very common. It isn't useful for component layouts, but it's the canonical way to draw a wiring interconnect.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

aarg

The 12v thats is connected to the working end of the relays (powering the motors and seems to trigger the error) is a separate plug altogether and not connected in any way to the Arduino.
This kind of answer is not the kind of logic you need in the circumstances you're in. You can't outthink an unknown. If you let your reasoning block an easy test that you can try, you could essentially think your way out of a solution.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

gpop1

The 12v thats is connected to the working end of the relays (powering the motors and seems to trigger the error) is a separate plug altogether and not connected in any way to the Arduino.
your drawing shows the 12v negative sharing the negative buss with all the other negatives. The motors are inductive thus flyback is possible. We have seen a similar problem in the past where i2c is affected (in that case it was a lcd). As there's no need to join the negatives I would remove it from the buss or install a flyback diode on each motor (diagrams available on the net including a explanation of why they are required)

Ive seen all sorts of strange things happen with the arduino especially as we are using unshielded wire so its possible that if you have a ardunio wire that's close to a ac cable strange things can happen. 

stevelondon2

your drawing shows the 12v negative sharing the negative buss with all the other negatives.
I know it shows the 12v -ve going to the buss, but that is a 12v supply that is 'operating' a different pair of 12v relays. As in needs 12v TO switch, not to BE switched if I'm making myself clear.

I have two different types of relay boards, some that require 5v to power them and some that require 12v to power them. I have not put the 'switched' load in the diagram. Perhaps I should have. However I assumed that the voltage that they are 'switching' shouldn't matter as it shouldn't be linked to the Arduino circuitry.


AARG - yes you are so right. I will try it now anyway.

aarg

Is there an earth ground in your system?
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

stevelondon2

Is there an earth ground in your system?
I think so as the independent 5v and 12v supply are plugged into the mains, and the earths are all connected so I assume yes there is.

Actually no. I have just looked at the wall wart plug thing and the earth pin is just plastic, only the live and neutral are conductive. So as far as I can tell, there is no earth ground. (is that what you meant?)

aarg

I think so as the independent 5v and 12v supply are plugged into the mains, and the earths are all connected so I assume yes there is.

Actually no. I have just looked at the wall wart plug thing and the earth pin is just plastic, only the live and neutral are conductive. So as far as I can tell, there is no earth ground. (is that what you meant?)
Yes, that is what I meant. An earth ground is a vital component of an EMI suppression strategy.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

stevelondon2

Yes, that is what I meant. An earth ground is a vital component of an EMI suppression strategy.
Oh right. How do you suggest doing that? Having a wire coming from the ground buss and into the ground of a plug socket?

aarg

Oh right. How do you suggest doing that? Having a wire coming from the ground buss and into the ground of a plug socket?
It's a little weird because you don't usually see a ground-only plug. But it would suffice for testing. It also helps if that ground extends to a shield around sensitive components like the controller.

For testing, you could also clip the ground to something grounded, like the case of a computer that is plugged in with a grounded cord.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

stevelondon2

It's a little weird because you don't usually see a ground-only plug. But it would suffice for testing. It also helps if that ground extends to a shield around sensitive components like the controller.

For testing, you could also clip the ground to something grounded, like the case of a computer that is plugged in with a grounded cord.
Right, I have tried tried the earth ground, still, happening. I then tried plugging the RTC SCL and SDA leads into the ethernet shield ports (only just seen that it has them too) but also still happening. :-(

stevelondon2

Thats interesting. I basically have a button on an app that tells the relays to open and close. I had the RTC powered by 3.3v just now and I got the errors as before. I then connected it to the Arduino 5v instead and now as well as getting the error when I press the relay button, after a couple of presses the Arduino freezes and locks up. :-/  But it don't freeze when its on 3.3.v. Don't know if that signifies anything.

Go Up