Hi I'm totally new to Arduino and my first real project is to build a stepper motor to control a gas valve via a wifi app page!

My first question is how do I power the stepper motor driver board, I'm using a 9v battery, is that Ok for a 5V circuit? Any suggestions on elements to the project would be great, thanks in advance.

9V smoke alarm batteries (PP3) have nearly no place in Arduino projects. Those batteries will not power but the smallest of motors if that.

Before anyone can offer help we need to know a lot more about your project. Ideally we would like a schematic (hand drawn, photographed and posted is OK) of the project showing the Arduino board, all components, their part numbers and/or values and all power supplies. Include data sheets for all major components like motors and motor drivers.

In the absents of a schematic, a block diagram will help to get started.

Add a detailed description of the operation of the project.

Read the forum guidelines to see some hints on how to get the most from this forum.

And... your project seems quite ambitious for a first project. I would suggest you start with and Arduino board and do some of the basic examples that come with the IDE (File->examples->...)

Then, get a stepper motor driver board and get your stepper working. Again with examples that come with the library you are using (AccelStepper.h would be a good choice).

Then, depending on your arduino choice, get your wifi connection working with whatever IoT framework you are using...

What type of gas valve are you going to use the stepper motor on? An off-on or is it a valve to select various gas lines?
How will you know when the valve is turned on or off?
Paul

Hi Paul, it’s a basic Honeywell domestic gas valve from an AGA cooker.

Hi Mark,

I’ve been through the basic arduino book and done all of the example and tonight gone through a stepper motor sketch and made it work.

Hi, thanks for your assistance. I’ll get to work on that.

What are the specs for the stepper motor?
Note- the Arduino is not a power supply. A stepper motor large enough to drive a valve will require more current than any Arduino can provide.

The steps should be:
1, choose a stepper motor that will provide the torque necessary to operate the valve at the required speed.
2, choose a stepper motor driver appropriate for the stepper motor voltage and current requirements.
3, choose a power supply or supplies that provides the required voltage(s) and current(s) required by the stepper and other parts of the project.

I asked Mr. Google to show me pictures of AGA cooker gas valve and got, perhaps, 1000 different type of valves.
Your primary design has to include mounting of the stepper motor, connecting the motor shaft to the actual valve control and having some method for your Arduino to determine when the valve is closed and when the valve open limit is reached.
A safety consideration has to be for the Arduino to die while the valve is open.
None of those things relate to an Arduino or software.
Paul

The stepper motor I'm using is a 5V Step Stepper Motor 28BYJ-48 + ULN2003A Driver. The valve doesn't require much torque and I'm going to use a trial and error method as I don't have a micro torque wrench to measure the torque needed.
I have that part done and working ok. The next step is to link a clock board to the Uno and make the necessary movements at set times rather than at seconds intervals in the programming text. Any thoughts would be welcome. The clock unit I've bought is a DS1302 Real Time Clock Module RTC Board For Arduino. Thanks in advance.

How will the Arduino know that the gas valve is open, closed, or where in between?

This is much more important than you seem to realize.

Hi Paul, the Arduino element of the project is a part but not all of the project. Yes there are mechanical interface issues that need to be worked out (I have already designed the shaft) and then some safety control elements such as end stop micro switches; these are all part of the project and their input will be fed into the Arduino's programme. If you want to know more about the gas valve on the Aga I'd be happy to show you my photos so you don't waste your time trawling the internet. Any further positive comments would be appreciated.

Hi Mate, thanks for your input. How do you know what I do and don't realise? I do know a little bit about motors and positioning as I have a master's degree in Robotics. Thanks for your help.

You have now failed to answer a very important question three times.

That speaks volumes, and casts great doubt on your claim to have a "master's degree in Robotics".

Don't count on help from the forum if you can't bother to answer the questions raised.

Do you speak for all the forum do you?

Exactly what question have you asked 3 times, I can't see it?

Remote control of a gas valve has all sorts of safety concerns , I’m not sure it’s a good idea

Placing all sorts of electrical components in the viciniity of any gas without certification would raise the same safety concerns with me as well.
Bad idea.

Hi Hammy, I’m a Gas Safe engineer and this is a prototype project. Yes there are issues around the Gas Safety (Installation and Use) Regulations such as it’s prohibited to modify a gas appliance. However, as I say, this is a prototype in order to demonstrate that by periodically cooling an Aga oven (by turning down the gas control valve) that energy can be saved and CO2 reduced. Any suggestions are welcome, Richard.

See above