maple mini + ESP8266 anyone success?

madias
Wed Apr 29, 2015 11:12 am
Hello,
this is slightly offtopic:
I’ve received my ESP boards (ESP-01,ESP-03) and tried to setup the ESP-01 as “led turn on/off webserver” controlled by maple mini.
My problems so far:
Connections: I’ve tried out many things: power from maple, external power (3.3v), 100nf caps + big elko VCC-GND, put the pins via 10k to high (GPIO 0, GPIO 2, CH_PD, RST) or directly to 3.3V. Ground was connected to every involved module.
Firmware: Uploaded many different firmwares (which is the newest one? I’m looking for a simple really working “AT” firmware)
Baudrates: 9600 (standard) was to slow, so I set it up to 115200
I did the WIFI setup over a USB-Serial dongle without problems.
The WIFI router was every time next to me.
maple mini sketch: USB-serial as debug, Serial1+2 tested.
Results are the same: With some firmwares nothing happen, with some I can establish a connection, see over a browser window the “homepage” can click a few times LED on/off and then the ESP lost the contact (the mini didn’t crashed!). Edit: I also have to reset and try it to start several times to get the basic working.

So my question:
Did someone get the ESP working without problems with the maple mini with the AT firmware? If yes, what did you do (wiring, firmware,….)?

Thank you
Matthias


RogerClark
Wed Apr 29, 2015 11:34 am
Ive not tried to connect STM32 to ESP8266, but there is now Arduino for Esp8266 ;-)

I recommend this repo

https://github.com/sandeepmistry/esp8266-Arduino


madias
Wed Apr 29, 2015 11:39 am
Yup, I know this repo, but it’s more for my ESP-03 (when soldered) and ESP-201 (when delivered). I wanna use the ESP-01 as a simple Serial to WIFI device, but it seems to be a really buggy part with general hardware/firmware flaws.

RogerClark
Wed Apr 29, 2015 12:12 pm
Not sure about the AT commands.

I think a lot of people have switched to using the LUA firmware

If I get chance I will flash the Lua firmware tomorrow


martinayotte
Wed Apr 29, 2015 12:54 pm
Personally, I prefer using the Arduino IDE to develop my own firmware for ESP8266.
I’ve done some kind of transparent TCP2Serial bridge to let me talk to an LPC1768 custom board.

(BTW, for ESP-03/07/12, the GPIO15 need to be pulled down to GND)


mrbwa1
Wed Apr 29, 2015 2:10 pm
The only place where I have seen much about the ESP8266 that I could really understand is a forum for a home automation project running on the Raspberry Pi called easy IOT:

http://iot-playground.com/

*The website seems to be down at the moment, but they have a lot about using the ES8266 with arduino, standalone with Lua and now stuff with the Arduino IDE. The development there is going toward standalone development because the ESP can be a bit buggy.

Anyhow, check in there once the site and forums are back up and I think you will be able to get some of your questions answered. I would actually like to adapt the nrf24L01 or ESP8266 to the stm32 boards for a DIY smart thermostat. I’m concerned I don’t have the chops to get the libraries working, so might have to just use something like i2c to pipe the data back to an AVR+nrf24l01 and/or esp8266 to communicate with the gateway server.


RogerClark
Wed Apr 29, 2015 10:12 pm
Try www.esp8266.com or GitHub.com/esp8266

The lead dev is Ivan, and he really knows his stuff !


madias
Thu Apr 30, 2015 7:49 am
Ok, I think I give up at least with the ESP-01:
Installed arduino esp8266 (both: only the hardware file and the whole api)
Upload works ok, a simple Serial test (print text, numbers) works frictionless, BUT
when I try out any of the examples with WIFI the result is the same:
garbage serial return and the ESP isn’t working and wont set up a webserver.
It’s sounds like a power supply problem, but I tried many things out: checked the LED resistors (there are modules with 4.7Ohm instead of 4.7K!) two ESP-01, about 4 different USB-serial dongles (FTDI, usbasp…) different power supplies, -at least a 18700 lithium ion battery (2200mha, full loaded)
I think, I have a faulty ESP-01 which distrubs itself when setting up the WIFI part.
The last chance is to setup up a lua environment, but I’m pretty sure the results wil be the same.
I think the whole hardware concept is ill-conceived (ESP-01): Idiotic pinouts (2 pin rows – for what?!?), no shield, bad quartz….. Ok, costs about 3 Euros, but costs myself about hours of frustration. Hope my ESP-03 is better (at least the not yet shipped ESP-201)

Edit: I’ve posted my issue to the esp board, because it’s not an maple mini issue (anymore).


mrbwa1
Thu Apr 30, 2015 1:56 pm
I haven’t picked up an ESP-01 yest because of the issues I have heard of people having with them. The place I posted earlier seems to have programming simple sensors down and is churning out examples of standalone ESP8266 sensors left and right (http://iot-playground.com/). that said, it sounds like the ESP8266 isn’t really a good add-on wifi module. The CC2000 seems to be better for that, but the price is prohibitive.

For the longest time, I was on the preorder list for the spark photon as it is a $19 board with an STM32F205 and integrated WiFi, but they kept delaying and delaying, so I cancelled to use the $$ for a Raspberry Pi. I don’t think STM32duino supports the F2 boards or else the Photon could be really interesting with a 120 MHz processor. Spark appears to have a web-based IDE based on wiring. The online IDE thing wasn’t really exciting to me other than being able to flash firmwares over wifi instead of messing with serial adapters.


madias
Thu Apr 30, 2015 2:44 pm
I don’t think that the chip is crap, more those “ultra-small-tiny” board layouts are all faulty and missleading, unfinished and idiotic designed. I read many articles and posts about the esp and most of the people, who get them reliable(!) working used additional hardware like 470uf elkos, caps, shields other quartz,….. But for the sales promotion it’s better the get a super small-size 3USD product online, than a bigger one for about 7-10USD.

mrbwa1
Thu Apr 30, 2015 5:03 pm
madias wrote:I don’t think that the chip is crap, more those “ultra-small-tiny” board layouts are all faulty and missleading, unfinished and idiotic designed. I read many articles and posts about the esp and most of the people, who get them reliable(!) working used additional hardware like 470uf elkos, caps, shields other quartz,….. But for the sales promotion it’s better the get a super small-size 3USD product online, than a bigger one for about 7-10USD.

victor_pv
Thu Apr 30, 2015 5:26 pm
I wrote a super long post with a lot of detail, and the browser lost it :(

I have used the ESP8266 together with a mini, powered with the mini, with extra 47uF capacitor in the ESP power pins.

I currently use it with an arduino uno, just to keep track of a few values from my chicken coop light controller.
Seems very realiable to me if you use the right fw in the module, and make sure all your AT commands are former correctly.
Some of the latest fw available have issues with /r/n escape codes. Some will remove them, some others will send them, but not count them in the lenght of the packets…
I think the fw that worked best for me was from novemeber-december.

You can see the code here:
https://github.com/victorpv/chicken_coo … ARM-AVR_v2

And this are the values uploaded by an Arduino UNO with the ESP, pretty reliably, every 5 to 15 minutes (I forgot the exact amount, is somewhere in the code)
https://thingspeak.com/channels/23850


mrbwa1
Thu Apr 30, 2015 5:56 pm
victor_pv wrote:
I currently use it with an arduino uno, just to keep track of a few values from my chicken coop light controller.
Seems very realiable to me if you use the right fw in the module, and make sure all your AT commands are former correctly.
Some of the latest fw available have issues with /r/n escape codes. Some will remove them, some others will send them, but not count them in the lenght of the packets…
I think the fw that worked best for me was from novemeber-december.

You can see the code here:
https://github.com/victorpv/chicken_coo … ARM-AVR_v2

And this are the values uploaded by an Arduino UNO with the ESP, pretty reliably, every 5 to 15 minutes (I forgot the exact amount, is somewhere in the code)
https://thingspeak.com/channels/23850


victor_pv
Thu Apr 30, 2015 6:14 pm
My code was going to include both light and temp control. I decided to leave the temp control out as in Texas it’s never too cold for chickens, and I was given a warning on a chicken forum of the potential issues with some heater in the coop, dust, down accumulating on it, and catching fire.
Given that my chickens dont even need heating, I did not care to finish that part of the code, that was the reason I included a temp sensor.

About the lighting, you definitely need it when the days are shorter. Otherwise they stop laying for many weeks… even here… so I dont want o imagine further north.


madias
Thu Apr 30, 2015 7:25 pm
mrbwa1: offtopic posts are the most interesting posts on every board ;)
Victor: Which ESP version do you use?

mrbwa1
Thu Apr 30, 2015 7:30 pm
victor_pv wrote:
About the lighting, you definitely need it when the days are shorter. Otherwise they stop laying for many weeks… even here… so I don’t want o imagine further north.

mrbwa1
Thu Apr 30, 2015 7:37 pm
madias wrote:mrbwa1: offtopic posts are the most interesting posts on every board ;)

zoomx
Thu Apr 30, 2015 8:10 pm
I never used ESP8266 with STM32 but tested it with Arduino.
I tested AT commands using an USB-serial adapter in order to be sure of the commands. I used external power, CH_PD high.
There are 2 lines of firmware, one made by Expressif, the other one by AI-Thinker and they differ for some commands. At boot you can have the AI-Thinker message or a simple ready in the Expressif firmware.
At boot there are messages at about 78600 baud (or some similar) then the module switch usually at 9600.

victor_pv
Thu Apr 30, 2015 9:10 pm
Haha, we have been planing pretty much the same.
I was going to get started with moisture sensors for my greenhouse until the last hail storm almost destroyed it, now I need to rebuild it first…

I have been thinking on watering and feeding too, but I am building a bigger coop and have not had much time to plan that out yet.
I was thinking on IR sensors to measure the levels, but may not be the most accurate, as they get affected by surrounding light.

For home automation I was thinking on using the ESP8266 with a very small PSU IC, an MP156 or MP157 from MPS.
That IC can convert from AC to DC with very few external components, no big coils or transformers or anything like that. I would have a little PCB with the AC to DC and a Triac to control AC, and the ESP8266 stacked on top.

I still need to build a psu with the MP157 with discrete components to test it out, and then design an SMD version once all the bugs are worked out.


mrbwa1
Thu Apr 30, 2015 10:56 pm
Sounds like we need to work together victor_pv.

I haven’t figured out all the sensors yet, but I have a simple circuit using an LDR and voltage divider are a crude analog to digital divider for a laser tripwire project. I already have experience with how to code it for a threshold, so it should be easy to adapt to detect a certain light level. Also, just a cooler resistors and an LDR, so not expensive to implement at all.

I have also been reading about UV sensors and was thinking of how I could use one to measure how much Uv the sun is putting out.

Chicken food and water should be pretty easy, especially if I build out the automated watering system. Run a line to the chicken coop and refill when it gets low.


victor_pv
Fri May 01, 2015 7:09 pm
I’m not way too concerned on automatic watering and feeding, as I need to go out daily to pick up the eggs anyway. At 80-90F I can’t leave them there 2 days in a row, but I can see the advantage when weather is cooler and they lay less often like in winter.
I have a loooong summer to plan it out ;)

I’ll upload later the schematic of the board I use for the light detector, temp sensor (just an NTC), and constant current led driver, and let you know when it is in the repo, so the sketch will make more sense and you can reuse anything useful for you.


mrbwa1
Fri May 01, 2015 7:13 pm
victor_pv wrote:I’m not way too concerned on automatic watering and feeding, as I need to go out daily to pick up the eggs anyway. At 80-90F I can’t leave them there 2 days in a row, but I can see the advantage when weather is cooler and they lay less often like in winter.
I have a loooong summer to plan it out ;)

I’ll upload later the schematic of the board I use for the light detector, temp sensor (just an NTC), and constant current led driver, and let you know when it is in the repo, so the sketch will make more sense and you can reuse anything useful for you.


RogerClark
Fri May 01, 2015 9:06 pm
mrbwa1 wrote:

For the longest time, I was on the preorder list for the spark photon as it is a $19 board with an STM32F205 and integrated WiFi, but they kept delaying and delaying, so I cancelled to use the $$ for a Raspberry Pi. I don’t think STM32duino supports the F2 boards or else the Photon could be really interesting with a 120 MHz processor. Spark appears to have a web-based IDE based on wiring. The online IDE thing wasn’t really exciting to me other than being able to flash firmwares over wifi instead of messing with serial adapters.

madias
Tue May 12, 2015 12:15 pm
Some update info, maybe this would help somebody on OSX:
The actual complete downloadable ESP-Arduino IDE from the main repo is broken (on OSX). There is a nasty bug with the esptool (I think it doesn’t erase the whole flash chip first) So some little codes are working and others not.
In short:
The latest sandeepmistry addon release works for me either on ESP-01 and ESP-03! (0.0.5)
https://github.com/sandeepmistry/esp826 … o/releases
I didn’t get any AT firmeware constantly to work, so I stay at ESP-arduino and maybe later on LUA.

Ok, this is definitely not more STM32 related, so this is my last post on this topic.


Leave a Reply

Your email address will not be published. Required fields are marked *