Author Topic: heliostat doesn't move  (Read 33 times)

luiklodwig

  • New Member
  • *
  • Posts: 7
    • View Profile
heliostat doesn't move
« 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 :)


Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: heliostat doesn't move
« Reply #1 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


luiklodwig

  • New Member
  • *
  • Posts: 7
    • View Profile
Re: heliostat doesn't move
« Reply #2 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
« Last Edit: December 08, 2017, 05:46:30 PM by luiklodwig »

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: heliostat doesn't move
« Reply #3 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

luiklodwig

  • New Member
  • *
  • Posts: 7
    • View Profile
Re: heliostat doesn't move
« Reply #4 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! :)