Page 1 of 1

Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 9:37 am
by Monie Jacobsen
HI everyone
Can Arduino Mega 2560 R3 use Clock RTC MCP794N ?
Original: Clock RTC MCP794N with dsPIC:
MIAC_dsPIC_ClockDemo.fcfx
(34.2 KiB) Downloaded 241 times
Want to use Clock RTC MCP794N with Arduino Mega 2560 R3, can this work?
Attached work file:
SolarTrackerMega2560-R3 Test UR og Clock.fcfx
(45.78 KiB) Downloaded 243 times
Do you have a suggestion for codes?
Or would you like to help correct Clock RTC MCP794N for use with the Arduino Mega 2560 R3?

For example, how to direct the codes to use for Mega 2560 Macro DrawCursor.
DrawCursor.JPG
DrawCursor.JPG (39.85 KiB) Viewed 7050 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 11:12 am
by LeighM
Hi Monie
There might be some issues running these two devices on the same I2C pins.
Could you try moving one of the devices to some different pins and use the Software channel?

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 11:22 am
by Monie Jacobsen
Hi LeighM
I really tried the whole weekend but without luck;-)
Really tried a lot and got stuck....

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 11:26 am
by LeighM
Did you include pull-up resistors on the I2C pins?

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 1:29 pm
by Monie Jacobsen
HI LeighM

I use your user Blocks EB-002-00-1. Screw Terminal on all Arduino Mega 2560 R3
Using all ports is this a problem?

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 2:37 pm
by LeighM
Yes, the EB002 series resistors might cause an issue with the RTC chip too, try shorting them out as you did for the display.
What is your circuit to the RTC MCP7940N chip device?
Do you have the pull-up resistors required for I2C?

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 4:37 pm
by Monie Jacobsen
HI LeighM

I have pull-up resistors required for I2C?
I use LCD I2C units below!
LCD I2C units.JPG
LCD I2C units.JPG (13.1 KiB) Viewed 7024 times
Yes, EB002 resistors may cause a problem with the RTC chip, so try shorting them as you did on the screen. Have done what you describe.

What is your circuit to the RTC MCP7940N chip device? Believe that pull-up resistors are built-in.
rts_mcp7940n1.JPG
rts_mcp7940n1.JPG (10 KiB) Viewed 7024 times
RTC MCP7940N is component in Flocode 8

Attached file:
SolarTrackerMega2560-R3 Test UR og Clock.fcfx
(47.87 KiB) Downloaded 236 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Mon Jul 29, 2019 9:16 pm
by jgu1
Hi Monie!

The picture you attach, is for the display, serial to parallel, as far I know your display work?. I think that Leigh, mean if you use the same adapter as you used for the displaydriver to your RTC, you have to short the resistors on this board also. I think :D

Concerning the RTC, why don“t you use DS3231 like this https://www.ebay.com/itm/Arduino-DS3231 ... SwuMZZL4eH. Ready to use. Here is lot of examble here in fora, Medelec, Martin made one here: viewtopic.php?f=26&t=16392 and John Crow has also made one you can use.

If I have misunderstood, please forget this,,,,, :wink:

Br Jorgen

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Tue Jul 30, 2019 7:43 am
by LeighM
Believe that pull-up resistors are built-in.
Are you using a module, or the chip device?
Here's the circuit needed from the datasheet...
MCP7940N.png
(16.16 KiB) Downloaded 1952 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Tue Jul 30, 2019 6:36 pm
by Monie Jacobsen
HI LeighM

The Schematic diagram shows pull-up resistors.
But as I understand it, the component is built into Flowcode;-)
RTC MCP7940N.JPG
RTC MCP7940N.JPG (36.18 KiB) Viewed 6975 times
As for Windspeed, I find it very difficult to find a Port that can be used!
And here I know with the outside unit that there must be pull-up resistors.
Attach file:
SolarTrackerMega2560-R3 Windspeed.fcfx
(25.63 KiB) Downloaded 235 times
Uses Arduino Mega 2560 R3 with EB092

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Fri Aug 02, 2019 4:32 pm
by Monie Jacobsen
HI everyone

It will be helpful to show a connection between PWM and DC motor (Full Bridge).
Like an example in flow code!
Motor Reversible and PWM.JPG
Motor Reversible and PWM.JPG (98.25 KiB) Viewed 6898 times
See attached files:
SolarTrackerMega2560-R3 004.fcfx
(31.03 KiB) Downloaded 256 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Sun Aug 04, 2019 8:13 pm
by Monie Jacobsen
HI LeighM

'How do I get PWM and motor reversible to work together?
With a PWM signal for a motor ..
PWM Pin E3
Motor output Port E.3
Did not check on how to pair the devices!
Hope very much you will come up with a suggestion ;-)

Attached files:
SolarTrackerMega2560-R3 006.fcfx
(31.54 KiB) Downloaded 253 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Tue Aug 06, 2019 8:15 am
by LeighM
Hi Monie,
I don't think you can use the components together like that.
Depends what your driver circuit looks like,
but you could drive one pin/side with the PWM and the other with high/low for forward/reverse.
Or, use the PWM as a driver enable, and then use the motor reversible component to drive the two sides of the bridge.
Leigh

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Wed Aug 07, 2019 12:12 pm
by Monie Jacobsen
Hi LeighM

I will now use PWM to send signal to an H-bridge controller;-)
But thank you very much for your suggestion.
I've made this PCB layout below..
H-Bridge_optimized.jpg
H-Bridge_optimized.jpg (110.79 KiB) Viewed 6785 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Thu Aug 08, 2019 10:40 am
by Monie Jacobsen
HI LeighM
Can Opto isolator board EB035 E-blocks be connected with Inductive PNP sensor (24V) and with input for the Arduino Mega 2560?
Can you give a sketch / diagram of a coupling example between EB035 E-blocks and Inductive sensor?
I do not want to destroy EB035 E-blocks!

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Thu Aug 08, 2019 12:52 pm
by LeighM
PNP_Sensor.jpg
PNP_Sensor.jpg (59.41 KiB) Viewed 6753 times

Re: Arduino Mega 2560 R3 And RTC MCP794N

Posted: Thu Aug 08, 2019 2:16 pm
by Monie Jacobsen
Hi LeighM

Thank you very much. It was just what I could use;-)

Good weekend