Author Topic: Sun Havester using Arduino mega2560 questions  (Read 1496 times)

JonathanS

  • New Member
  • *
  • Posts: 4
    • View Profile
Sun Havester using Arduino mega2560 questions
« on: April 16, 2015, 02:37:12 PM »
Hello,
I have been working on getting the sun harvester shield working with the arduino mega 2560
and have so far been unsuccessful with getting it to compile in the ide.
The problem seems to be with flash.h giving multiple errors.
One thing I did just to check was comment out "//#include <Flash.h>"  and it compiled without any problems
So my first question is does the mega 2560 need the flash.h file or possibly a different one to work correctly.
I also have some questions re attaching the sun harvester shield to a motor driver that has both + and - connections for
all of the inputs, the enable +pin says it is active high - the driver in question is made by wantmotor.com model #DQ542MA
If all goes well this will be driving a 10kw dual axis array that we built several years ago and have been moving it manually so far.
« Last Edit: April 16, 2015, 02:53:27 PM by JonathanS »


Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 651
    • View Profile
Re: Sun Havester using Arduino mega2560 questions
« Reply #1 on: April 16, 2015, 07:07:37 PM »
Hi Jon,

Well that was rather dumb of me. I completely missed the fact that there was an update to the Arduino IDE. I even saw the messages "There is an Update to the Arduino IDE, would you like to download it now" and completely ignored them thinking that it was a mistake. I had 1.0.6 of the Arduino IDE and when it told me to update to 1.6.2 my brain must have moved the 6.

Anyway, the flash.h library doesn't seem to be compatible with the latest version of the Arduino IDE. This actually happened before when it updated to version 1.0. I'm probably not going to have time to figure out how to fix it for a few days, so in the mean time you might just want to download the older version of the Arduino IDE and use 1.0.6. http://www.arduino.cc/en/Main/OldSoftwareReleases

You might be OK just commenting out the Flash.h library line like you did, but I've never tested that before, and I'm actually kind of surprised that it worked.

I've never used that particular driver board, but I would think that it would be wired as follows.

PUL+  Goes to Step
DIR+  Goes to DIR
ENBL+ Goes to EN


PUL-    Gnd
DIR-    Gnd
ENBL-  Gnd

This would of course be the same for both the alt and az drivers.

If the driver is active when the enable pin is high, then you will want to make sure you change this line   int enableHIGHorLOW = 0; to 1. You'll find this line near the end of the user settings, which are on the same page where you commented out the Flash.h library.


JonathanS

  • New Member
  • *
  • Posts: 4
    • View Profile
Re: Sun Havester using Arduino mega2560 questions
« Reply #2 on: April 16, 2015, 08:11:36 PM »
OK
Thanks for the reply
I will try with IDE 1.0.6 and see what happens
will report tomorrow

JonathanS

  • New Member
  • *
  • Posts: 4
    • View Profile
Re: Sun Havester using Arduino mega2560 questions
« Reply #3 on: April 17, 2015, 03:27:48 PM »
Thanks for the info.

After changing from Arduino IDE 1.6.2 to 1.0.6 it compiled and uploaded as desired.
I currently have it controlling my test setup with just a bar on the motor shaft and limit switches attached, it seems to be positioning correctly.

Thank you again