Go Down

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

cattledog

At those current levels, you can certainly try the motor driver. In the long run, it would be more simple to replace the relays with a logic level mosfet or npn transistor.

stevelondon2

At those current levels, you can certainly try the motor driver. In the long run, it would be more simple to replace the relays with a logic level mosfet or npn transistor.
Would the diode work that you was talking about? And if so, did you see any on that website that I linked? Its a shop near to me.

cattledog

#62
Aug 08, 2017, 01:19 am Last Edit: Aug 08, 2017, 06:44 pm by cattledog
Quote
Would the diode work that you was talking about? And if so, did you see any on that website that I linked? Its a shop near to me.
In the maplin catalog you linked, they show the 1N400X series available. I think with your voltages you could use the 4001 or 4002. My preference would be for the 1N4002 if they are available.

Since you are fighting an unknown problem and the diodes are cheap, I would put them across all inductive loads. That is--the motors, and the relays. You have indicated the without the motors you don't see the problem, so I would install them there first, and work your way back.

If you switch from the relay to an npn transistor or a logic level mosfet, than you will need them across the motor.

stevelondon2

Like this one? Photo attached.

Is a rectifier the same thing? What about a zener? Also how do I pick a rated voltage, does the rated voltage of the diode need to be above 250mA?

Thanks. Steve.

stevelondon2

Sorry, now it's attached.

cattledog

#65
Aug 08, 2017, 04:29 pm Last Edit: Aug 08, 2017, 04:38 pm by cattledog
Quote
Is a rectifier the same thing?
Yes,  rectifier is another name for a diode. IN4001 or IN4002 will be OK.  http://www.vishay.com/docs/88503/1n4001.pdf
https://en.wikipedia.org/wiki/Flyback_diode

Quote
does the rated voltage of the diode need to be above 250mA?
ma is a current, not a voltage. The key specification is the reverse DC blocking voltage which I have seen should be 4 or 5x the motor voltage which is 12v. Both diodes meet that criteria, but the iN4002 will block more.

stevelondon2

Sorry, I meant current not voltage. Silly me.

I have bought some today, I got some silicone and some glass, what would you suggest and how would I go about fitting them? Do they run in line or across the terminals?

cattledog

Quote
Do they run in line or across the terminals?
They are wired directly across the motor or relay terminals with the cathode (striped end) to the positive side of the circuit. Not inline.

I'm concerned that you are asking this question, and have not done enough reading about diodes and their uses.

stevelondon2

Sorry for delay in replying.

Firstly yes I'm sorry, I did have a look at 4 websites to research recitifiers and it went straight over my head. There was paragraphs and paragraphs and all sorts of technical jargon which I didn't have a clue about. I couldn't find any simple lay man explanations that I could understand. I did try.

And guess what, it's only gone and worked!!  I fitted them earlier today and no more errors! I can finally move on with my project.

Thank you so much for your help and suggestions. Couldn't have done it without you.

cattledog

Good job getting the problem fixed.

Did you leave the relays, or did you replace them with transistors?

stevelondon2

No I've kept the relays at the moment because I've been working so literally soldered the flybacks on, tested for half hour and went to work. Will do some more strenuous testing to make sure it don't relapse and take it from there.

Thanks again though.

gpop1

grats on staying with it and finding the problem

Something else that you may find interesting (depending on the arduino being used) is the watchdog timer.


If you only have one arduino, its a offbrand or its more than a few years old you have to be very careful and go for the max 8 second restart until you are sure it works. (you can brick a arduino with this code then you will have to re-flash it)

I use this on a incubator that has to run non stop and its a handy tool especially if the rtc is being powered by the arduino. For some reason during bad storms even with surge and battery back up my rtc will lock up (the arduino doesn't)  so I monitor the rtc then reset the arduino.
  I keep meaning to add more code to remove the possibility of getting stuck in a loop on a rtc failure and switching to a millis timer to keep everything working but that's something for another day.     

Go Up