Author Topic: Super low-cost heliostat with ESP8266 for WiFi control  (Read 442 times)

sheffieldnick

  • New Member
  • *
  • Posts: 4
    • View Profile
    • Raspberry Pi, ARM SBCs & computer hackery
Super low-cost heliostat with ESP8266 for WiFi control
« on: March 26, 2017, 03:08:45 AM »
I don't know if this forum is still active, but I'm starting on my own heliostat project and I'd really appreciate any advice that you experienced builders can offer  :)

Video of my prototype mechanical design, based on Gabriel's v2.0 design with lead screws. I don't need a wide range of motion, and I want to try something simple to maximise my chances of getting it working!
https://www.youtube.com/watch?v=fXRA-wfXz5A&feature=youtu.be

Each mirror is roughly 1000x750mm. Simple heliostat using a 5-10kg mirror made from 18mm plywood, CNC-milled into a shallow parabolic curve, reinforcing box metal strips (scrap) on the rear, and mylar film (emergency blanket) PVA glued on the front.

The mount is a 100x100mm timber post, rotating on a 12mm threaded rod through the center. I don't think I need a low-friction bearing, but rather something with the 'right' amount of friction that can be overcome by the stepper motors, while remaining still in the wind when the stepper motors are powered off? I was thinking perhaps drill+glue 100mm of a 200mm threaded rod into the bottom timber post, then run the rod all the way through the top timber post, securing it with a recessed nut at the top, but enough slack to allow the 0..45deg rotation?

Elevation and Azimuth motion provided by 2x NEMA17 stepper motors (purple), with physical limit stops and 4x electronic limit switches (red). The required range of motion is -15deg to +45 deg elevation, and 0 to +45 deg azimuth. I'm planning on using door hinges. Not sure how to attach the screw nuts (purple) so they can pivot freely?

Do I want a counterweight on the other side of the mount, to balance the 5-10kg weight of the mirror?

Controlled by an ESP8266 inside a waterproof case at the rear of the mount, along with 2x EasyDriver motor driver boards and a MPS1584 DC 12V -> +3.3V step-down voltage converter. I've ported Gabriel's Sun Harvester Program to the ESP8266, and added things like deep sleep mode for extra power saving, and fetching time/date with NTP rather than needing a physical real-time clock.

Total cost should be under 50.


Paul L

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #1 on: April 04, 2017, 06:48:20 AM »
Hi Sheffieldnick,

  I would say yes, a counterweight would be a great idea; 10kg is pretty heavy for NEMA17, so if it's not balanced properly, they might have a tough go.  You shouldn't have to worry about wind movement when the steppers are off - the leadscrews are essentially self locking.  I used casters with the wheel taken off for the "screw nuts".  I took pictures and posted them in the forums here: http://cerebralmeltdown.com/forum/index.php?topic=305.msg1583#msg1583

For this design to work properly, you have to have everything plumb and level, with super accurate measurements and as little play in the parts as possible.  If any of those things are off slightly, you'll notice in the end, so take your time and do it right the first time!  Even my best build had a little bit of drift, and I tried damn hard to be accurate.  This is one of the reasons why I think worm gearboxes are the way to go - way less room for user/build error.  But if you're trying to keep costs to a minimum, this is the way to go!

Very cool that you'll be using the ESP8266 and the added features you've added in - it'd be great if you posted your code once you have it all up an running.  Also, ff I recall correctly, the Easy Driver has a 3.3v/5v linear regulator on board for external power supply, so you'd be able to use that to power the ESP8266 rather than the MP1584. 

Best of luck, and keep us posted!


sheffieldnick

  • New Member
  • *
  • Posts: 4
    • View Profile
    • Raspberry Pi, ARM SBCs & computer hackery
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #2 on: April 06, 2017, 12:10:10 PM »
Thanks for all that info Paul - very helpful!  :)

Do you think I'd need an anti-backlash nut on my lead screws? They seem popular on CNC cutters/3D printers, but perhaps that precision isn't needed in this application?

I love your idea of using glued nuts for pivots! Simple and very economical.

I'm sharing all my code with Gabriel as I go along, and I'm hoping that at some point we'll have a single source tree that automatically recognises its hardware, and compiles the correct code for the Uno/Mega/ESP8266.

The EasyDriver board does indeed have its own regulator which can output 3.3V/5V, but apparently it can't manage a high enough current to drive the ESP8266 when it is using WiFi. I also want to completely disable the EasyDriver boards unless I need the motors to move, so for those reasons it makes sense to have the separate MP1584 powering all the logic.

I don't know how practical it will be to run the heliostats off (solar-fed) batteries, but I'm trying to minimise the power requirements so I can hopefully try that in the future.

Cheers

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 651
    • View Profile
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #3 on: April 15, 2017, 10:28:27 AM »
This is a bit of a delayed reply, but you shouldn't need anti-backlash nuts. What would be more helpful is more of a say anti-backlash heliostat. So, the altitude and azimuth motions would be pulled in one direction by say a spring or a weight. That would help eliminate any wobble.

Also, It's something that I don't think I have documented well, but the closer you can keep the mirrors towards the axis of rotation the better. There will always be some drift as they get further and further  away, which may or may not be the reason for Paul's drift.

It's technically something that could be compensated for in the software, but it would add yet one more variable to the settings as I believe that you also need to have the distance to the target programmed in. I haven't gotten around to figuring out the math to compensate for it either.

I don't think it would take much to run a heliostat, or heliostats, off of solar. In the grand scheme of things they don't use much power. All they do is move part of a revolution forward and backward in each axis once a day, which amounts to practically nothing for smallish machines.

I actually managed to pick up a solar kit which even has the outdoor box for the batteries and charge controller for $10 dollars where I work, so I am planning on doing pretty much the same thing. Whenever I finally finish 3D printing all of the parts for it. Only 40 more hours of printing to go. ;)


moritz

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #4 on: May 29, 2017, 01:01:50 AM »
Hi Nick and Gabriel,

I have that bi-weekly maker / diy radio show called "Netzbasteln" on german national public radio Deutschlandfunk Nova. See netzbasteln.de for all past projects. Quite some of them contained an ESP8266, which i really felt in love with. Same goes for the idea of a heliostat which I wanna build in one of the two next shows - which is already next sunday - or also two weeks later. I am really enthusiastic and grateful for the great work you did here, Gabriel!

For my heliostat I already welded the frame (using a bicycle fork), now its up to the motors (will use steppers and Pololu A4998 / 8825 drivers I already used for a CNC and and an Eggbot) and the code. I want to use an ESP8266 (propably Wemos D1 Mini) and program a small webserver on a hotspot that allows you to control everything in a web-browser. Nick wrote:

I'm sharing all my code with Gabriel as I go along, and I'm hoping that at some point we'll have a single source tree that automatically recognises its hardware, and compiles the correct code for the Uno/Mega/ESP8266.


My question: would you mind me (and two friends who are professional programmers and would help) joining this effort and send me the code you are already working on? Guess it would even be best to put it on github and work on it together there! I can do that if you want.

Some work for ESP8266 has already been done - but i assume its a very old version and we should start over anyway:
http://cerebralmeltdown.com/forum/index.php?topic=854.msg3400#msg3400

Many greetings, really looking forward!
Moritz
« Last Edit: May 29, 2017, 01:03:27 AM by moritz »


sheffieldnick

  • New Member
  • *
  • Posts: 4
    • View Profile
    • Raspberry Pi, ARM SBCs & computer hackery
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #5 on: July 28, 2017, 04:03:34 AM »
I thought some of you might like to see my progress with this project - I've been working on the electronics, and I have my own custom PCB! No need for any Arduino or other board. It takes a single DC input 4.75V-28V, and has an ESP8266 for WiFi control, 2 stepper motor drivers (the red EasyDriver boards), and connections for attaching limit switches:



I have a handful of prototype PCBs without any components on - would anyone like one? I can give you a list of the extra bits you'd need to buy, and you'd obviously need to be able to solder (the smallest components are 0805 SMD). The total cost once you've put it together will be less than 20/20/$20. For all the electronics to control a heliostat! It does work, but remember it is a prototype and I'm making no promises  ;) I haven''t got the software finished yet, but you can program it with any code you like using the Arduino IDE and a USB-to-serial adaptor.

3 in the UK, including P&P
5 for mainland Europe, including P&P
$6 for the rest of the world, including P&P

This is what you'd get - just the bare board, no components and no software:



I am planning a new version of the board that I hope to be able to sell already-soldered so you can just plug it in and go.

Cheers
« Last Edit: July 29, 2017, 01:04:43 AM by sheffieldnick »

Paul L

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #6 on: August 06, 2017, 05:17:56 AM »
That looks great, and I'm excited to see it working!  I'd order a board, but I'm strapped for time and have never done SMD before, so I'll have to pass, but I'm interested in buying a fully finished one when you get to that point!  Keep us updated and keep up the good work! 

Just a thought, and it would require a board redesign, buy if you use A4988 driver boards (I think they're similar to the Easy Driver in specs), you could shrink the size of the board (or put 4 drivers on it and control 2 separate heliostats) quite a bit. 
   
Cheers,

Paul

sheffieldnick

  • New Member
  • *
  • Posts: 4
    • View Profile
    • Raspberry Pi, ARM SBCs & computer hackery
Re: Super low-cost heliostat with ESP8266 for WiFi control
« Reply #7 on: August 06, 2017, 03:21:27 PM »
Thanks Paul! :)

If anyone would like to experiment with a prototype board, but is put off by the SMD soldering, I can do that bit for them? Or do all the soldering. Let me know.

The A4988 looks good, I hadn't seen that before. The current board is only 74x67mm (3" x 2.5") so I don't know how useful shrinking it down further would be? I have done a new design that fully integrates 2x A3697 (as used on the EasyDrivers) and the power circuit onto a single board, which would be more compact, but that wouldn't save much money as it is already so cheap.

I think a single board controlling multiple heliostats makes sense when it is expensive, but if you can make the controller cheap enough, it makes the wiring a LOT neater to have one controller per heliostat? You also have fewer problems with signal noise over long cable runs. I'm planning to have 5 heliostats in my back yard, with just a single 12V line powering them.

Cheers