How we can switch on a Water Motor(AC high motor which we use in houses) with help of relay & boltduino digital signal?

Can we connect relay module to Water Motor(230V AC, which we will use at our home;s) with the ON/OFF cond from Boltduino Digital SIgnal?

@satyanvv450

Yes, you can. You can even connect it with the Bolt module directly.

A couple of proejcts from https://www.boltiot.com/projects will demonstrate the same.

Thank you for your response . It is ok to switch on the motors pump which we use at home right ? Because I heard we can’t run the motors which we are using at home , since it has high load to operate and some recommend use MCB like things , fully confused !!!

@satyanvv450

Yes, that is right. It is not recommended to use relays for a permanent solution. And if you are willing for a solution on this, then there are products you can get from the market. Which would be ISI marked.

For a demonstration purpose, you can use it with the power sockets which match the relay configuration.
Check the voltage range(Eg. 100-200V) and Current(Eg. 10A or 25A).

There is a SSR (Solid-state Relay) which is a better option than a magnetic relay as well.

Thank you for the info akshayan.

singleButton({name:“Buzzzer ON”, action:“digitalWrite”, pin:“1”, value:“HIGH”})
singleButton({name:“Buzzer OFF”, action:“digitallWrite”, pin:“1”, value:“OFF”})

wheather is it work, when we want to write digital output on Boltduino(it will work for bolt wifi module) from our webpage ?

Hi @satyanvv450 ,
It won’t work this way on the Boltduino, as digital pin 1 on the Boltduino is used to reset the Atmega chip(Arduino Chip). You can use UART(Serial Communication) to achieve this. Check out the Bolt Arduino Helper Library here. Do let me know if you need any help.

@satyanvv450

The inbuilt functions control the GPIO pins of the Bolt Module. For example, this ‘action’ refers to the one on your Bolt module, and not the Boltduino. It will turn ON and OFF the pin 1 of Bolt module over the cloud.

To control the Boltduino, it needs to be connected with Bolt module, and then you have to write a code on Arduino IDE, so that when any Serial communication from the Bolt module is received (Over the cloud works as well), then it can control or monitor the Boltduino indirectly.

You can explore this project to understand more of it - Arduino with Bolt IoT - Hackster.io

Thanks for sharing. I totally understood your explanation and if we want to include buttons and graphs we have to do only in HTML right , since i don’t know how we can get the button in JS with onclick event too.

@satyanvv450

The training has covered this part, on adding a button when you are using the JS extension.

Here is an external documentation on this as well.

I am aware of that, but what I am asking you is that we have to this with a serial write to boltduino board over bolt wifi module . We may want on click event to achieve this ?

@satyanvv450

You can use an onclick event only when you are using HTML to structure the code. However Serial commands are not yet updated to be used with the built-in button mapping with usual pins and values. Only applicable for digital R/W, analog R, servo W, analog/digital/servo-Multi W functions.

Below is the command format you need to add in the code section (JS) to send “ON” or “OFF” commands from Bolt to Boltduino.

singleButton({name:"Led On", action:"serialWrite", arguments: ["ON"]})
singleButton({name:"Led Off", action:"serialWrite", arguments: ["OFF"]})

To switch on a water motor (AC high motor) using a relay and Boltduino digital signal, you can follow these steps:

  1. Firstly, you need to choose an appropriate relay module that can handle the voltage and current required for your water motor. A common type of relay module used for this purpose is a Single Pole Double Throw (SPDT) relay.
  2. Next, connect the power supply of the water motor to one of the terminals of the relay (for example, the Common or C terminal). The other terminal (for example, the Normally Open or NO terminal) should be connected to the Boltduino digital signal pin.
  3. Write a program in the Boltduino to control the relay. You can use the Boltduino digital signal pin to trigger the relay and switch on/off the water motor as per your requirement.

Here’s an example program in Python that you can use to control the relay:
from boltiot import Bolt
import time

api_key = “<YOUR_API_KEY>”
device_id = “<YOUR_DEVICE_ID>”

mybolt = Bolt(api_key, device_id)

Define the digital signal pin that will control the relay

digital_pin = “0”

Function to switch on the water motor

def switch_on_motor():
response = mybolt.digitalWrite(digital_pin, “HIGH”)
print(“Motor switched on!”)
return response

Function to switch off the water motor

def switch_off_motor():
response = mybolt.digitalWrite(digital_pin, “LOW”)
print(“Motor switched off!”)
return response

Test the functions

switch_on_motor()
time.sleep(10)
switch_off_motor()

@akshayan.sinha @raghav.srivastava