Recent Posts

Pages: [1] 2 3 ... 10
1
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat doesn't move
« Last post by luiklodwig on December 10, 2017, 11:21:37 AM »
Gabriel,

Thanks for the drawing! that really helped. I don't really know what I did, but after I turned the axis of the az motor it started moving, and thanks to the diagram, the limit switches work too!


Now all I need is sun! :)
2
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat doesn't move
« Last post by Gabriel on December 09, 2017, 08:08:51 AM »
Hi luiklodwig,

I am a bit puzzled about this one. It's been awhile since I've looked at the program's code, but from what you sent it looks like you have the right idea.

You can rule out the limit switches by disconnecting them. In that case the azimuth motor should just keep turning for a very long time before it reverses direction and then switches to the altitude.

When a stepper motor just "shakes" sometimes it means that the program is set to try and turn it too fast.

It may also be that it is too under powered to turn. There is a potentiometer on most driver boards where you can increase the current to the stepper motor.

You might also try switching driver boards and see if that fixes it. It could be that the azimuth board is bad. Just make sure you don't rewire the boards when they are plugged in as that will probably ruin them.

Once you get the motors moving, then see if you can get the limit switches working.

You probably already have seen this link, but here is a diagram of the circuit if you want to clarify how to wire the limit switches.
http://www.cerebralmeltdown.com/wp-content/uploads//2012/07/SunTrackerCircuit3_bb.pdf

Hope that helps!
Gabriel
3
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat doesn't move
« Last post by luiklodwig on December 07, 2017, 04:10:57 PM »
Gabriel! Thanks for the reply and for the great work you have been doing.

Actually (i tried it again) the azimuth "shakes" for a second, then the alt motor starts moving but doesn't stop even if it hits the limit switch

I am using V098 of the program and testet them  (and the gear ratio) using this:

void setup()
{
  Serial.begin(9600);
  pinMode(6,OUTPUT); // Enable
  pinMode(2,OUTPUT); // Step
  pinMode(3,OUTPUT); // Dir
  digitalWrite(6,LOW); // Set Enable low
}

void loop()
{
  for (int y = 0; y < 55; y++) {
    digitalWrite(6,LOW); // Set Enable low
    digitalWrite(3,HIGH); // Set Dir high
    Serial.println("Loop 200 steps (1 rev)");
    for(int x = 0; x < 1600; x++) // Loop 200 times
    {
      digitalWrite(2,HIGH); // Output high
      delay(1); // Wait
      digitalWrite(2,LOW); // Output low
      delay(1); // Wait
    }
    Serial.println("Pause");
    delay(1);
   
  }

 
  delay(5000);
 
 
 
}

Edit: Is it possible that all this comes from my eventual miswiring of the limit switches? I attached them to one pin (8 ) using a 10k resistor between 5V and PIN, the other two wires go to  GND
4
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat doesn't move
« Last post by Gabriel on December 07, 2017, 03:09:55 PM »
Hi luiklodwig,

It sounds like it should work. What code did you use to test the stepper motors? When you first reset the Arduino it should start moving the Azimuth stepper motor. You say that the motors "shake for a second". Do they stay powered on in that you can't easily move them by hand, or do they just turn right back off again.

It might be this setting "enableHIGHorLOW". I think by default it should be OK, but maybe it was changed at some point?

Let me know how it goes.

Thanks!
Gabriel
5
Heliostat Projects / Re: DIY Worm Gear Based Heliostat Design
« Last post by Gabriel on December 07, 2017, 03:01:14 PM »
Looks good!
6
Sun Tracking / Heliostat Program Discussion Board / heliostat doesn't move
« Last post by luiklodwig on December 07, 2017, 08:47:28 AM »
Hi,

I build an gear worm based heliostat with a 25cm mirror, and I would love to get it to work with the open sun harvester programme, but as I dont live in the us, i did not order the shield yet...

Right now I'm trying to get it to work with an arduino mega 2560, 2 0.4A Nema 17 Steppers, 2x Easy Drivers, DS1307 Clock, Joystick and 2 Limit switches. I did not attach the manual switches, buttons and the pot yet..

When I start the programme and power the motors on, they shake for a second but then nothing happens.. This happens in Heliostat and Sun tracking mode. I got the motors to move using a test programme which doesn't use a stepper library.I am not sure if this might have something to do with the stepper settings in the programme or if i am missing something else... When I open the serial monitor I either get "Resetting..." or it asks me for altitude and azimuth and when I enter something, it is always out of the limits (and nothing happens)

Any help would be really appreciated ! Thank you :)
7
Heliostat Projects / Re: Super low-cost heliostat with ESP8266 for WiFi control
« Last post by alobo on December 02, 2017, 11:17:25 AM »
You'll manage as long as you have minimal programming chops, and I'm sure it'll come back to you quickly! Blynk is insanely easy to use considering just how much you can do with it. Interpreting my heliostat code is where it might get hairy though ... I was looking through it myself and almost couldn't remember what I'd done!

Follow the instructions on the GitHub pages as closely as you can. ESP8266-Arduino here and Blynk here

Tips:
- be sure to select the correct COM port in the Arduino IDE, and set the programming speed to maximum (921000 baud)
- you'll need to enter an additional source into the Arduino 'boards manager' and install the under-the-hood components that allow you to program the ESP8266 directly.
- Blynk uses hard-coded 'auth token' strings to make sure it communicates with the correct device over the Internet. Keep track of yours, they are generated each time you open a new project in your Blynk phone app.

Start off with the easy Arduino example of 'blink an LED', and then you can move on pretty much immediately to 'blink an LED with Blynk' from the phone app. It's insanely simple - hell, you could even skip the basic Arduino examples entirely and start directly in Blynk using their example code.
In the example below, simply insert your Wifi name/password, and the auth token provided from the Blynk phone app, and upload as-is to the NodeMCU, then plug in a LED to any of the GPIO pins.
Then open your phone app, pull up a 'button' module in the project, assign it to the pin you have the LED connected to ... and press play! You're done - the LED should light up pretty much immediately as you touch the button. Wireless control in under 10 minutes and 10 lines of code! (ignoring the comments and spaces, obviously). They've seriously done some amazing magic behind the scenes of Blynk. (Hell, I should be getting paid for how much I tell people about it!)

Code: [Select]
#include <ESP8266WiFi.h> // can't connect to Wi-Fi without this
#include <BlynkSimpleEsp8266.h> // can't do Blynk magic without this

char auth[] = "YourAuthToken";  // You should get an Auth Token in the Blynk phone app, when you open a new project.

// Your WiFi credentials.
char ssid[] = "insert_wifi_name_here";
char pass[] = "insert_wifi_password_here";

void setup() {
  Blynk.begin(auth, ssid, pass);
}

void loop() {
  Blynk.run();
}
8
Heliostat Projects / Re: Super low-cost heliostat with ESP8266 for WiFi control
« Last post by Paul L on December 01, 2017, 09:34:50 PM »
Thanks for the guidance Alobo!

   I somehow (dumb)lucked out and actually ordered a NodeMCU, so I'm on my way, the easy way!  Woohoo!  (For those wondering, i got it off Aliexpress.com for 2.81 USD - insanely cheap!)  Thanks for the heads up on the possible confusion on the pinouts - it would have probably scuttled me, but honestly, now I'm a little worried about the mention of coding proficiency, of which I have none.  I have a feeling it'll be a steep learning curve, since I haven't touched anything code related in a few years!! :)

Cheers,

Paul
9
Heliostat Projects / Re: Super low-cost heliostat with ESP8266 for WiFi control
« Last post by alobo on December 01, 2017, 08:29:47 PM »
It's great feeling to set up the ESP-12 board from scratch (all you need is 3.3V regulator, capacitor, 3 resistors, 2 switches, and a header for hooking up your FTDI programmer) as compared to building an Arduino board from scratch! You can program it many times faster than the Arduino, too (which is important considering how much program memory it has). I have my IDE set to 921600 baud programming speed, whereas the typical max Arduino upload speed is 115200. And Wi-Fi programming, when it doesn't fizzle, is even faster!

But to speed things up, I will recommend you find a NodeMCU breakout board, these usually come with an ESP-12 already soldered on, with built-in USB/FTDI and regulator. In other words, with a NodeMCU you buy it, plug it in and start programming immediately!
Saves a lot of effort for a minor increase in cost (and you won't have to deal with the 2mm header spacing of the raw ESP-12 module).
However, there can sometimes be minor confusion regarding the 'NodeMCU' pinout vs the 'ESP12' pinout so always have a reference handy like this one.

The NodeMCU was designed as a Lua-based device, but it functions perfectly well in the Arduino IDE! Hell, there's even a version of Python that'll fit on the ESP-12.
... But I digress.

Get yourself a NodeMCU and download the Blynk libraries into Arduino, and I can almost guarantee you that could have your phone talking to the ESP-12 within, like, half an hour (depending on your coding skill). :-)
10
Heliostat Projects / Re: Super low-cost heliostat with ESP8266 for WiFi control
« Last post by Paul L on November 27, 2017, 10:12:47 PM »
Hey Alobo,

Thanks for sharing your code; you've inspired me to go out and buy my first ESP8266 - I can't believe how affordable they are!  Now I just have to find the time to use it! Thanks again!  When I get around to playing with it, I'll post an update here!

Cheers,

Paul 
Pages: [1] 2 3 ... 10