Author Topic: Help on program modified for DC motors and Hall sensors  (Read 1519 times)

Brendan

  • New Member
  • *
  • Posts: 30
    • View Profile
Help on program modified for DC motors and Hall sensors
« on: May 28, 2012, 03:06:30 PM »
Hi Gabriel and all,

This is an update and plea for help.  I've taken your program and modified it to work with DC motors (L293 motor controller) and am using Hall sensors to count rotations and keep track of where the heliostat is.  I'll post a movie of current status over at www.heliostats.org.

The problem is my azimuth angle for the heliostat isn't correct.  When I run the attached code, the heliostat azimuth angle returns the same as the sun's azimuth.  I've tried choosing different azimuth targets (0, 45, 90) but no difference.  I'm sure it's something basic that I altered in your code in my many edits.

Any ideas?

Thanks,
Brendan


Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 656
    • View Profile
Re: Help on program modified for DC motors and Hall sensors
« Reply #1 on: May 29, 2012, 03:51:37 PM »
Hi Brendan,

That actually is the correct output for the target you are using. More specifically, because you are using a target altitude of 90 (which would be directly above the heliostat), the target's azimuth is irrelevant. That's why nothing changes when you input different values. If you use a target altitude of say 89.9, then you will see a slight difference in the azimuths.

Does that help?

Gabriel


Brendan

  • New Member
  • *
  • Posts: 30
    • View Profile
Re: Help on program modified for DC motors and Hall sensors
« Reply #2 on: May 29, 2012, 06:50:46 PM »
Ah, that makes all the sense in the world.  Thanks!