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!

DIY LED Bargraph

I’m planning on revisiting my 74HC595 shift register boards in Eagle soon. One of the things I want to add in the next revision is a breakout to the Output Enable pin which allows you to have some PWM control. I never tried it before so I started setting it up to test it. I don’t have any larger breadboards available so I had to use a mini-breadboard. I didn’t like having to lay out the LEDs and resistors, especially on these smaller breadboards, so I put together a line of LEDs on a perfboard. I didn’t bother going on eBay to buy some of those LED bargraph DIPs because I bought a bunch of things on eBay over the holidays so I didn’t want to waste any more time or money.IMG_0001Anyways, here it is connected to a shift register. The PWM worked just fine, though I think it may have looked better on a different color.IMG_0003I already had this piece of perfboard sitting around so I’m pretty happy that the design is pretty optimized. Everything fits on the board without too much wasted space. The 8 pin female header leads to the anodes of each LED and the single female header on the right is connected to all of the cathodes of the LEDs.
IMG_0004Soldering didn’t go too smoothly because I need to find a better tip for my iron. The one I used was a conical tip which doesn’t transfer the heat very well. I have another tip with a flat edge, but the edge is too wide for my liking.

Anyways, that’s it for this quick show-and-tell. Thanks for reading!