Main Site Documentation

Relays work wired?


Hey guys,
Relays seem to work wired for me. The GHI relay says this [quote]Fish Tank is off when Relay is on[/quote] but that doesn’t seem to make sense. Lets say you have something and the micro controller fails (or something along those lines) the device would turn on? Is this how relays work in real life products?
(I’m just 14 so don’t say it’s a lame question :P)


Relays generally come in 2 flavors. Normally On or Normally Off. You can guess what this means. A normally off relay, for example, would be open/off until you applied a voltage from your microcontroller. These are more common. Normally on is the opposite - your high current device is on until a voltage is applied.

It’s not a lame question, but you do need to get better at asking specific questions in the right forum. There is no way to tell from your post what board you have, what hardware you have, or what “relays seem to work wired for me” means. General questions like 'Is this how relays work in real life products?" are impossible to answer with no context. This is not meant to be condescending feedback. You have the entire web to search for information on relays. Do some homework (aka Google the topic). Pointer - has some great basic information about stuff like this.


You might also find that some (many?) relays come with three connections for the “power” switching side of their circuit, one that says NO and one that says NC and one that says COM. The COM is “Common” and is used whether you want Normally Open or Normally Closed, and the second wire goes to the NO or NC side depending on the function you want.

But remember, it’s just a boolean value in your code. Your “starting” state has to reflect how you want your relay to be, which will be dependent on how you want your connected device to be, which will depend on what connection type you have on your relay (or what connection type you used, NO or NC). Change your code’s “starting” value from true to false and your app will reverse it’s behaviour.


Thank You,