-
1Step 1
Understand the caveat of these instructions and read all the logs
This is a set of instructions on building the open source SunLeaf module from scratch. There are some complicated engineering concepts in this product but you really don't need to understand them all to have this module built. Since it is hardware you'll have to have some money to buy the equipment. But it is less than $100 for a module. We also encourage you to read all of our logs...this is where the real instructions exist.
-
2Step 2
Get the software..it's all free
The hardware was developed in KiCAD so you'll need to download that from here: http://kicad-pcb.org/
You'll need a Linux OS for the ESP compiler. I liked Ubuntu until they sold out: https://www.ubuntu.com/. There are a few specific logs on setting up the ESP Compiler so I won't go into that here.
You can run the MBed compiler in any web browser: https://developer.mbed.org/. There are a few logs on programming the STM so I won't go into that here either.
You'll need to set up a thingspeak.com account: https://thingspeak.com/
-
3Step 3
Pull the projects
We kept everything on Git:
Hardware is here:
https://github.com/HydroPWNics/SunLeaf
The ESP firmware is here:
https://github.com/HydroPWNics/SunLeaf-ESP8266
The STM32 Firmware is here:
https://github.com/HydroPWNics/SunLeaf-STM32 (working)
or here:
https://developer.mbed.org/users/ShaneKirkbride/code/STM-Client/ (latest)
Beaware there are some compiler companies (Keil and IAR) that want to sell you this stuff for $10K. You really don't have to buy that hardware if you can read the STM Manual and google. But if you don't want to read or google a little then go ahead an pay your $10K.
-
4Step 4
Order your board
We used OSHPark: https://oshpark.com/
The sent us back some really nice boards that you can see in some of the logs. The boards come unassembled. Unless you have the mad skillz of Adam Vadala-Roth I'd recommend having the board assembled.
We are working with MicroFab on this: https://macrofab.com/
So go ahead and order some boards and have them made!
-
5Step 5
Print the housing
There are a few cad drawings of the housing we've done. These are not quite robust enough to be used outdoors but they are able to be used inside. You'll need a 3D printer to print one. Often libraries have 3D printers you can use.
-
6Step 6
Add the sensors
You'll need a few grove sensors: Light sensor and temperature and humidity sensor to plug into the ports. Make sure to use the I2C port for the temperature and humidity sensor and the ADC port for the light sensor.
-
7Step 7
Program your board
So you have you board and you've realized they don't do much unless they are programmed. So now is the time to program them. There are a few logs that we did on compiling and programming. This is probably the best one: https://hackaday.io/project/10457-sunleaf/log/45499-hardware-update to look at. Again I say this knowing that it is no small feat to get all of the software to compile and run. The details on how to do this are in logs 14-18. So go ahead and check it out and ask any questions that we might have missed.
-
8Step 8
Set up your Thingspeak account
Go here: https://thingspeak.com/ and press the big green button...then follow the instructions. You'll need to add your 'channel' to the STM code at line 238 in main.cpp of the STM32 code: https://developer.mbed.org/compiler/#nav:/STM-Client/main.cpp...
Then just log onto thingspeak.com and you can see your SunLeaf recording your temperature, light and humidity data.
-
9Step 9
Here is what the prototype looks like as it uploads data to thingspeak.com
and don't forget:
“We work in the dark - we do what we can - we give what we have. Our doubt is our passion, and our passion is our task. The rest is the madness of art.”
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.