Pulling the plug on the ESP8266 project

IMG_0001Look at all that dust!

I had my ESP8266 capsule plugged in and sitting in a corner of my room where I just sort of forgot about it. I decided to check up on it today on ThingSpeak and discovered it stopped transmitting data a week ago. After about two months powered up and 9735 recorded entries, I’ve decided it’s time to take it offline.

I haven’t been fully attentive on what’s been going on but I’ve been seeing a few things here and there about some new things being done with the ESP8266 module that I’d love to check out. I still need a new project idea so we’ll see what happens.

A significant chunk of my blog’s traffic has been for my ESP8266 posts so I hope everyone is finding what they’re looking for. Check out my Github for code! Thanks for visiting!

ESP8266 Rolling Back

Capture

After some thought, I have decided to roll back the ESP8266 project to a previous version that only sends data to Thing Speak. The features of emailing and inserting data into a MySQL database have been dropped.

One of the reasons is that this project will eventually be taken completely offline, so gradually taking it down before I decide what I want to do next seems like a decent plan to me. This project was a great way to get started with the ESP8266 as I’ve learned a lot about how to use it. Since I got it online, I’ve come across more projects that I’d love to give a shot myself but I only have one ESP8266, so this project will need to be sacrificed if I want to play with the module. The hardware will stay as is whenever that happens so I can always stick the ESP8266 back in and have it work immediately again.

The other reason is that I’m planning on ditching my webhost. They’re free and they’ve served me well… but I can’t help but be worried about security and uptime. My same concerns go for any other free, or impracticably cheap, webhosts out there, and I can’t afford paid webhosting right now. Some changes are coming to my websites and blog so stay tuned!

Thanks for following this project! You can keep following the live data at ThingSpeak, and you can always get the different versions of code on GitHub.

Eye on the power

I added in the battery level code from https://code.google.com/p/tinkerit/wiki/SecretVoltmeter into my ESP8266 program and it works like a charm. The code uses a reference voltage in the Atmega328p microcontroller to get a reading of Vcc going into the ATmega328p. For the ESP8266 project, that would be the 5v output of the AMS1117 board. In my testing with the dead-ish battery yesterday, I found that the system started to fall apart once it dropped below 5v. The LCD backlight would start flickering and the sending of data seemed to fail more often.

I already have the system sending me emails if it gets bad values from the DHT22 sensor or the ESP8266 fails at sending to both ThingSpeak and my webhost in the same cycle. It was easy enough to add a little more code so it would send me emails at certain voltage levels. I’ve got it sending emails to me when it drops to 5, 4.8, 4.6, and 4.4 volts.

Screenshot_2015-01-24-00-02-03I got this email when I retried the battery for the third time after bringing it in from outside in yesterdays outdoor trial. If I give the battery a rest, it’ll be able to power up the system again but it’ll die after a short period. The lowest threshold email I got was for 4.6v before the battery died again.

I don’t expect this project to go battery powered again but this is definitely something I’m glad I found and I hope it finds a place in other projects.

At this point, I feel like the project is over. It’s been a great learning experience working with two programming languages, my custom PCBs, and seeing the community that has gathered around the ESP8266. It doesn’t have to be over though… Solar power, anyone? Perhaps in the future.

Like I mentioned a couple posts ago, I have other projects coming up, including some experiments with some RF transmitter and receivers, and my custom shift register PCBs that should come in next week if the postal service is consistent with the last two times I ordered from Dirty PCBs.

 Thanks for reading!

ESP8266 Capsule now live, OUTSIDE!

Yesterday, I put the ESP8266 project into an enclosure. It uses a 9v battery style connector for power so it can be powered directly with a 9V battery or with a wall power supply. It’s too cold to run wires through the window (not that I would do it in the summer either, because bugs) so it’ll go battery powered whenever I want to put it outside.

It’s short notice, but my ESP8266 project will be put outside and will send data live starting at 1PM EST today until the battery runs out. It will be using a 9v battery that I’ve been using while prototyping other things so I’m not sure how long it will last. The project will be placed in a bag to protect it from moisture, even though it’s not raining today. I don’t want to take any chances.

IMG_0001

View the data at Thing Speak and my ESP8266 webpage.

Presenting the ESP8266 Capsule!

This project went exceptionally well. With just under two weeks of prototyping and 3.5 straight hours of soldering, the ESP8266 Capsule is complete! The project as I’ve been showing you in previous posts has been crammed into an enclosure (a food container). Let’s take a look at how the soldering went.

IMG_0001The only plan I had was a very rough schematic of the project. I skipped the perfboard planning on paper which is something I started doing with my projects that ended up on perfboards. I thought the circuits were simple enough to wing it… While that’s was somewhat true, it was challenging at times but it all worked out.

IMG_0002I pulled apart the prototype since I had the schematic to work with. I used fresh ATmega328p and AMS1117 boards since I like to have a couple rough assembled ones laying around for prototyping with.

I used some cut jumper wires that still have the female connector on it to connect up the LCD. The ones I used were actually cut off of the old Box project that was sacrificed for this project. I like to think of this as the Box 2.0 since it’s pretty much the same thing, except it gains an internet connection but loses the real-time clock.

IMG_0003This was about halfway through the soldering process. I got increasingly concerned with all of the connections flying out everywhere. They’re that long just for assembly. They would be cut down when it was time to connect everything together.

IMG_0004The first test was scary, as it usually is. The LCD lit up but didn’t show anything. After a few minutes, I realized the potentiometer that adjusts the contrast of the text was turned all the way down for some reason. I thought it would have stayed the same since it was directly taken from the prototype.

The only real issue was with the photoresistor. One of the legs had a loose connection that I had to touch up with my soldering iron a couple more times to get right. I would have liked to hot glued parts of this project but I don’t think I have enough glue for my glue gun. I put some tape in hopes that it’ll help things stay in place. Everything is so tightly packed in there, mostly because of the female connector for the LCD connections, so things aren’t shifting around too much inside.

IMG_0006This is the final product. The sensors are mounted on the top with the LCD underneath it. Beside the LCD is a switch to turn on and off the LCD backlight.

It looks very similar to the Light Timer Project since it uses the same kind of enclosure and LCD. I’d like to think I’ve progressed since then. There are no breadboards tucked in there, and I’m using some custom PCBs… That’s progress to me!

IMG_0007I find that inexpensive switches are hard to find so my previous projects usually never had one unless I had a switch I pulled from an old toy or something. My switches from China finally came in yesterday. They’re cheap and don’t fit in a breadboard, but they work great in the project.

Now that it’s in the enclosure, it can be moved around, especially since it can still be powered by batteries. I’m thinking of leaving it outside for a day and watch the data come in. It’ll be a designated day I’d announce since I’d have to pick a good day to do it. The enclosure is hardly weatherproof, and the power in contacts are fully exposed. I could put it in a bag, but I think that would affect the humidity readings. I’ll let you know.

Thank you for following along with this project! Stay tuned for more projects coming soon!

Here are some links for this project: MYSQL Database Live DemoThing SpeakGitHub Repository

Moving on

It’s kind of depressing when you think about it, but my ESP8266 project is held up by two little switches I need that are somewhere in the mail. It’s going to sit off to the side until those switches come, so I thought I’d shift gears and give you a quick preview of what’s coming up.

RF Transmitter and Receiver

IMG_0001I’ve never been much of a communications guy. Protocols and accommodating for noise and interference and all that has always been confusing/boring to me, but I seem to be tip-toeing toward it these days. I received two RF transmitter and receiver pairs in the mail today. I didn’t have a project idea in mind when I ordered them, but they’re so cheap that I figured it would be would be nice to have lying around if I did come up with something one day. I’m still drawing up a plan, though I think it’s only natural that I try to use that temperature sensor that was originally destined for the ESP8266 project. I haven’t done enough research to see what is and what is not doable with this pair so I can’t confirm anything just yet.

bbIn the ESP8266 project, I have three mini-breadboards that each have a main purpose on them: One for my AMS1117 power regulator, one with the sensors, and one with the ESP8266 module. I decided to try and combine two of them so I could free up one so I could use it to play with the RF pair. I managed to cram the AMS1117 and ESP8266 onto one mini-breadboard… As long as it still works, it’s fine. I hope that this project will be on a perfboard soon anyway.

74HC595 Shift Register Boards Rev B / Light Show 7

I hadn’t mentioned it before but I sent the next revision of my 74HC595 boards to get manufactured and they are on their way to me right now. I’m pretty excited to see how they turn out because they are my first manually routed board.

I’m also excited because it’s part of some upgrades I want done to the Light Show Project before I start programming a new show. These new shift register boards break out the Output Enable pin which allows for some PWM control. The backdrop will definitely have that, but I’m also considering having all LEDs in the project controlled by shift registers, including the fountain LEDs which have always been controlled directly from the Arduino. There are advantages and disadvantages to that but, either way, I plan on taking a close look at how everything is wired.

In addition to working on the wiring, I’m still looking for ways to make it even bigger. For every version of the show, I watch the show and pick out things that I want to focus on. What I realized with Light Show 7 is that it’s not designed very well to watch on a widescreen… We’ll see what comes of that.

 

Thanks for reading! Stay tuned for more!

Information everywhere: Take 2!

Last night, I worked on my ESP8266 project code so that the data would be sent to both Thing Speak and the MySQL database on my webhost. After working out some reliability issues, the information from my ESP8266 project is now in three places: Thing Speak, an LCD, and a MySQL database on my webhost.

IMG_20150119_010336Since I’m using my ATmega328p breakout, I can’t see what’s happening in a serial monitor, but I was able to print out messages on the LCD that helped me debug. The problem was that it was sending values fine to my webhost but it kept failing at sending anything to Thing Speak except for one lucky time. I recall seeing some delay when closing the TCP connection when the project was still on the Arduino Uno so I tried adding delays to give it some time to close the TCP connection to my webhost before attempting the Thing Speak transmission. After some trial-and-error with the delay value, it finally became reliable.

The new code is available on GitHub. I also took the time to clean up the folders so that it’s easier to find the different versions of code.

I’m still waiting on some mini slide switches in the mail before I can put everything into an enclosure. I had a beefy switch in my spare parts bin that I was going to use for the input power but I measured the input current during a full cycle with the LCD on. It seems to go between 50mA and 100mA, 100mA presumably whenever it’s taking a measurement from the DHT22 and when it’s sending data through the ESP8266. I had the impression that the ESP8266 drew more current than that so I’m pleasantly surprised it stays that low. The mini switches I’m waiting for have a current rating of 500mA so that should be fine for the power supply.

Thanks for reading!