mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

mLink serial I2C modules
andrew
Site Admin
Posts: 1477
Joined: Sun Aug 05, 2012 4:15 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by andrew » Mon May 05, 2025 7:18 am

@proxymowdev
I have checked the supply and it is healthy, and I can reproduce the same results using the header pins. I am curious about the reset/clear function pins. I remember reading about it somewhere, but can't find the reference now. It implies there is some configuration in nv memory that can be reset? Is this worth trying?

Ah sorry, I was having a dumb moment when i wrote the last post. If it’s doing the same thing via the header pin then it probably means that the relay has somehow been set to timer mode.

The easiest option is to do what you suggest and reset the module. Instructions on how to do this are in the quick start guide pdf found at the bottom of the first post. However all you need to do is:

1) With power disconnected from the module, link the two ‘clear’ pads together with a wire or paperclip.

2) Apply power to the module and wait a couple of seconds

3) Remove the link

That should set everything back to defaults. Hopefully that should fix it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Mark M
Posts: 2
Joined: Sun May 04, 2025 3:58 am

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by Mark M » Tue May 06, 2025 7:51 am

@Andrew

got it working, turns out i had a typo in the script, as you found. thanyou.

ChrisSharp
Posts: 36
Joined: Thu Dec 31, 2020 1:22 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by ChrisSharp » Mon May 12, 2025 10:16 am

Hi Andrew,

I've finally got round to reading through Version 1.10 of the Library Reference Guide for these modules. There appears to me to be a small error on pages 20, 21 and 22. They all have the same example code

mLink.RLY0_TIMER_RESF(RLY_I2C_ADD, 1);

I think the 0 should increment for each page.

No biggy. Looks like a classic "copy and paste" and forget to update error.

(there are some text alignment issues with the heading on 21 and 22, popping the justification back to Left we make me, and only me, happy)

cheers
chris

andrew
Site Admin
Posts: 1477
Joined: Sun Aug 05, 2012 4:15 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by andrew » Mon May 12, 2025 11:41 am

Hi Chris, thanks for pointing it out. It does indeed look like a cut and paste error. I've just uploaded a corrected version (V1.1.1) of the guide that (hopefully) corrects it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

ChrisSharp
Posts: 36
Joined: Thu Dec 31, 2020 1:22 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by ChrisSharp » Mon May 12, 2025 1:23 pm

sorry, but I'm not sure you changed the right values.
I think it should be:
mLink.RLY3_TIMER_RES(RLY_I2C_ADD, 1);

and you changed it to:
mLink.RLY0_TIMER_RES(RLY_I2C_ADD, 3);


Thanks for sorting the text alignment

andrew
Site Admin
Posts: 1477
Joined: Sun Aug 05, 2012 4:15 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by andrew » Mon May 12, 2025 3:06 pm

Ok, so I've fixed it again but this time with my brain switched on. I've re-uploaded it under that same version number - thanks again.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

proxymowdev
Posts: 4
Joined: Wed Apr 23, 2025 9:41 am

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by proxymowdev » Sun May 18, 2025 9:59 am

The easiest option is to do what you suggest and reset the module. Instructions on how to do this are in the quick start guide pdf found at the bottom of the first post. However all you need to do is:

1) With power disconnected from the module, link the two ‘clear’ pads together with a wire or paperclip.

2) Apply power to the module and wait a couple of seconds

3) Remove the link
Yes this worked a treat! So the next question is: how can I prevent the relay going into timer mode? Could I permanently link the clear pads, or use a resistor/capacitor combination.

Many Thanks

andrew
Site Admin
Posts: 1477
Joined: Sun Aug 05, 2012 4:15 pm

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by andrew » Mon May 19, 2025 6:49 am

Yes this worked a treat! So the next question is: how can I prevent the relay going into timer mode? Could I permanently link the clear pads, or use a resistor/capacitor combination.

You could permanently link the clear pads. This would cause the module to reset to default every time it is powered but each time it does this it writes to its non-volatile memory which has a write limit of 100,000 writes.

However, the only way the a really can go into timer mode is if one of the 4 timer registers are actively written to.

Is it possible you ran the relay timer example sketch at some point?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

proxymowdev
Posts: 4
Joined: Wed Apr 23, 2025 9:41 am

Re: mLink 1ch (HCMODU00182), 2ch (HCMODU0183), And 4ch (HCMODU0184) I2C / Parallel Relay Modules

Post by proxymowdev » Tue May 20, 2025 3:52 pm

However, the only way the a really can go into timer mode is if one of the 4 timer registers are actively written to.

Is it possible you ran the relay timer example sketch at some point?
No never ran the timer sketch - but I am operating in a very noisy environment, so anything could be creeping in on the supply lines. I think permanently linking the clear pins is the way to go.

Many thanks

Post Reply

Return to “mLink”