weather station with Stepper motor visual output on ESP8266

Dear All,

I would like to get assistance with project I want to build (since months).
I collected hardware, some basic things work. I am poor at arduino programming, but I want to learn on this project (hopefully with your assistance).

Project is based on shared opensource (AWESOME) work:

Few month ago I saw ready to replicate project based (I found it on reddit), but seems that it is gone now (I can’t find it). Project was doing more or less:

  • asking weather web service for forecast for specific location (I think it was weather underground)
  • driving stepper motors with attached “clock hands” to show this prediction with icons on fancy board.

You know - kind of analog touch of “icon based weather station”

There were I think 3 motors (temeprature high , low , conditions prediction general icon )

some idea of the board can be seen here or here. I like to do it more likely as 3 separate rings, to have full 360degrees for “display”

Ok, now where I am now. I have necessary hardware : nodemcu + 3x driver + motor
I can program it, some snippets of code work.

for stepper motor works this example code:

#include <Arduino.h>
#include <AccelStepper.h>
#define HALFSTEP 8

// Motor pin definitions
#define motorPin1  16     // IN1 on the ULN2003 driver 1
#define motorPin2  5     // IN2 on the ULN2003 driver 1
#define motorPin3  4    // IN3 on the ULN2003 driver 1
#define motorPin4  0     // IN4 on the ULN2003 driver 1

// Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48
AccelStepper stepper1(HALFSTEP, motorPin1, motorPin3, motorPin2, motorPin4);

void setup() {
  stepper1.setMaxSpeed(400.0);
  stepper1.setAcceleration(20.0);
  stepper1.setSpeed(20);
  stepper1.moveTo(20000);
Serial.begin(115200);
Serial.println();
Serial.print("setup finished");
}//--(end setup )---


void loop() {

 //Change direction when the stepper reaches the target position
  if (stepper1.distanceToGo() == 0) {
    stepper1.moveTo(-stepper1.currentPosition());
  }
  stepper1.run();
//    Serial.println(stepper1.currentPosition());
//  Serial.println();
}

for catching weather prediction for my location, works wery nice example code from mentioned wunderground weather lib
and beeing more specific, this example code

What I would like to achieve is a weather station based on mentioned hardware, where every lets say hour , weather station will make a connection, check prediction for tomorrow, and will drive steppers accordingly.
Ok, so where is the problem? In my programming skills…

I thing generally it is feassible on this hardware (3x4= 12 IO pins for motors , and we still have for IO pins for “home switch for steppers” , maybe a button if neccesary.

What I don’t know in general is :

  • is it necessary to implement 3 “home” switches (magnetic) to ensure that every update stepper will go “home” and after that will go to new position? Maybe it would be ok to have button, and after pressing it, all steppers should go to “zero position” (if some would miss this position, then you can manually move it to zero, and then restart system. This approach aould need to store in eeprom actual position I think.

What I dont know more specific is … how to start… should I put it in github so some of good Samaritaners could see and change the code, or should I publish post by post here…

Hi,
Sounds like a great project. Please do keep us up to date here. When it is ready, Github would be good.

is it necessary to implement 3 "home" switches (magnetic) to ensure that every update stepper will go "home" and after that will go to new position?

It is necessary if you want it to be very reliable, with power on-off etc. You could start without it and manually set start positions. It may be easier to use small opto-interrupter modules to find the start/home position compared to magnetic/Hall effect??

It might be good to send each indicator home and then to position when it is updated. I think you might hear the stepper move and know there was an update. Or use a small buzzer for that?

how did you count 13 pins on nodemcu?
http://esp8266.github.io/Arduino/versions/2.0.0/doc/reference.html#digital-io