ESP8266 Project Powered Up

As I said in the previous post, I wanted to get a power supply for the ESP8266 project instead of using batteries. I decided to go to the nearby electronics store today to get one.IMG_0001This power supply is 9VDC 1A and actually comes in a branded box for the Atari “Lynx”, an old portable gaming system from the 80’s. I’m curious to know if the newer (I’m assuming) and smaller power supplies that were also in the store are any better than this one in terms of efficiency. I bought this one because of the cheaper price and it has the CSA and UL listings which is nice to have.

I also picked up a new soldering iron tip, and the 9V battery clips came in the mail today. I used all of these things to get the power supply into the project.IMG_0003I soldered the power supply wires to one of the 9v battery clips backwards so it would clip into another battery holder that would be the power input to a project. This way, the project can still go battery powered if I wanted to move it somewhere away from any power outlets temporarily. The power supply can also be shared around to other projects if it even needs to be.

With the project powered up from the wall, I have it uploading information again. You can view my Thing Speak channel here. The code is available on GitHub if you’d like to try a similar project.

I am waiting for some switches in the mail, along with other things I don’t really need anymore (parts for the temperature sensor that was supposed to be for this project). Anyways, I want to add a switch to the LCD backlight so I can essentially turn off the LCD when I don’t want it on. That would be the last connection in the prototype. From there, I’ll need to decide what will be soldered where and try to get it into an enclosure.

Thanks for reading!

Advertisements

The Box project, completed!

With the Box project, or temperature/humidity monitor (part 2, I guess), sitting on a breadboard for some time, I dedicated all of today of transferring it all into the final box. I’m very happy with it despite how simple it seems. I also have a new build material.

IMG_0942I started soldering things on using a plan I drew up. This is the first time I’ve actually planned out a PCB and it worked extremely well. I don’t have to think as much as I go along.
IMG_0943Base Atmega stuff in and some resistors for the LEDs and buttons… Because it was so organized this time, it seemed a lot neater.
IMG_0945Organization was really key to the success of this project. It’s probably bad, but I was kind of surprised. There were many connections that could go wrong, and one did but I caught it and it was smooth sailing on from there.

IMG_0946I love using hot glue now and I expect to use it a lot more. Most of this project is made up of thin jumper wires so I didn’t like the connection to the perfboard on its own. The hot glue added a better base.
IMG_0947It also helped a lot with soldering. I glued them into place before soldering so I didn’t have to position my helping hands to hold the wire as I solder.
IMG_0948The first test was just powering on the LCD. I was super happy! I slowly got the other parts online and it turned out to be all good.
IMG_0950The last part was getting it all into the box. I was getting worried it would end up like my Frank robot which was basically the same thing on wheels. In that project, I couldn’t get a lid on so there were just all of these wires flying out of the top. I was actually laughing trying to find a place for the RTC. I found humor in trying to shove it in for some reason. Maybe I was just really happy too.
IMG_0953That’s it! It’s powered with a backup battery I bought for my phone, but it also works with my USB wall warts and PC USB ports.

The following video shows what control I have over it now that everything’s enclosed. Enjoy!

Animatronic Head project, now “The Box”

In my five project Project Lineup, I had an animatronic head project listed there. I want to move away from the usual roaming robots because I get tired with them too quickly. In the past, I’ve seen people make cool robot faces with LED matrix eyes and servos that moved it around to follow and interact with you. I wanted to try something like that.

The Shelf Lighting System project sort of drained me as I’m finding it hard to be creative. I ended up with this after 15 minutes:This is a crappy version of what I had in mind but still somewhat close, which made me even more unmotivated just looking at it. That’s why I made the change to “The Box”.

The main purpose of this project is to put to use all of the parts I currently have. The picture above shows them all: 2×16 blue LCD, RGB LED, 8-ohm speaker, photoresistor, sound sensor, temperature/humidity sensor, and a Real Time Clock. The animatronic head was going to have these parts anyway, but taking away the servos and unique form factor, compared to a box, will make things easier for me.

The kicker for this project is that it will have an accompanying Visual Basic Windows program, although it won’t be necessary to use it all the time. I’ll have info on that when I get around to starting it.

A quick note about the temperature/humidity sensor… I just found out that the prototyping PCB I used actually has a second layer that connects pads on the board. It’s hidden under the silkscreen so I didn’t know until now. It looks like there’s a shorted connection so I’m going to try and salvage the sensor and put it back on a board like the one used for the RTC.

I’ll begin testing each thing and then start combining it all together.

Light Timer Project: The Last Connection

1I got a new soldering iron for Christmas which gave me the motivation to do some more work on this project. I’ve always shied away from soldering in my projects because I’ve only owned a crappy $15 irons until now. I didn’t like having that breadboard hanging off of the control unit so I went back at it with my new soldering iron and came out with something a lot closer to what I had in mind in the first place.3The LCD still doesn’t have a cut out but that’s fine. Like I’ve said before, another reason why I didn’t want to put the buttons directly on it was because it was a tight squeeze with all of the wiring and components jammed in there. My concern right now is a bit paranoid, but I’m afraid of a short or something breaking just because of how tightly packed it all is. So far, it seems fine. It won’t be kicked around or vibrating so things should stay in place. I’ll continue to have it running while I’m around just to keep an eye on it. I want to be confident in it before I leave it plugged in overnight.

2

This is the final final product. I hope.

Light Timer Project: Completion

The Light Timer Project is now complete and ready to install. Except it won’t be, at least not right now. I will probably keep it packed up until next year when we can incorporate it into some Christmas decorations.

1This is not the way I pictured the final product but I’m still satisfied with it. It’s a tight fit inside of the case which is why it didn’t turn out as compact as I wanted it to.

2The LCD does not have a cut out, it’s just being seen through the transparent cover. The buttons remain on the breadboard because it’s a mess inside the case so any wires that can escape are lucky.

3Since I probably won’t be using it this year, I wrapped the string lights around the case expecting to throw it on a shelf and let it collect some dust. I realized that it made a really neat glowing effect off of the case. It makes for a really nice desk lamp at times when I don’t need my room completely lit up.
4So that’s the end of another project. If you want to see the construction log, just click the “Light Timer” category on the sidebar. Here are a few more things to wrap this one up.

Product Features

  • Displays current date and time.
  • Automatically turns on and off a set of lights during a certain period of time in the morning and evening.
  • Allows for user to adjust the time ranges in the morning and evening.
  • Allows for user to turn off schedule on the weekend.
  • Allows for user to manually turn on and off lights.
  • Displays a custom message on specific dates.
  • Fades in and out LCD backlight and controlled lights.
  • Times out menu after 10 seconds of inactivity.
  • Dims LCD backlight after 15 seconds of inactivity for power saving.

Code

The code is up for download as-is. It may become unavailable at any time.  It is not meant to be copy and pasted into your project. Instead, it’s there to help you get an idea of what I did to accomplish certain tasks. Some ways I go about things may not be optimal but it worked for me. If you use any of the code and would like to give credit, please link back to this blog post. If you have any reasonable questions, leave a comment. Thanks.

Enjoy: https://www.dropbox.com/s/vg4j11a5pek25ei/TimedLights_draft1.ino

Light Timer Project: Squashing bugs

A lot of bugs were coming out to play over the weekend and I hope that the copy of code I have now is free of any major ones. In addition, I managed to add in a couple of more features, though it’s starting to become that really unnecessary “fluff” but whatever.

To make things a little less jarring and to make use of the PWM pins, the lights and the LCD backlight now fade on and off when they need to. It’s a little thing that helps the project look a little more polished.

The other addition is that I can now post messages that will alternate with the usual info displayed on the bottom line. Right now, the messages are just holidays, and the only holidays I’ve got are Christmas (and eve), New Years (and eve), and Canada Day since most other holidays are ones that are like the third Monday of the month and so on. I wanted to have an alternating line to display more information, so this is the first step toward that. It may or may not change by the time I install the lights, but at least something’s been done to open up the idea.

Other than those two additions, the rest of the weekend was just debugging bugs that showed up in the time/alarm logic. I’ve also got a plan for the enclosure. It’s a food container.

I’ve got two cheap soldering irons that I haven’t used in months because they really beaten up. I need to do some soldering to package this project up so I tried cleaning up the tips. I’m writing off the one with the bent tip (I don’t even know how that happened anyway). I’d really like to buy one of those Hakko soldering stations everyone’s been raving about, though the Weller WES51 has always been on my wishlist before I heard about the Hakko iron. I also need to get one of those helping/third hand things.

So if the soldering works out, I can start transferring stuff into the enclosure. I’m hoping to show progress on that very soon.

Light Timer Project: Beta testing

Yup, I’m calling it in beta now. After the work done today, I don’t have any other plans or expect any changes to be made. Testing will continue through the weekend, which should be enough time to confirm everything works completely.

1The biggest change was simplifying the logic for the alarms. Each hour and minute has it’s own variable and I originally was checking what hour it was, then look at the minutes, and react appropriately. It became complicated very quickly so I tried something else. Basically, the logic works with the total minutes of every time (the hour multiplied by 60, plus the minutes), instead of the hour and minute values separately. It made the logic a lot simpler to figure out. The code will be released once I’m satisfied it works fine so you’ll see what I did.

2Another change I made was the LCD brightness is now controlled by the code instead of the hardware potentiometer. I had to move the LCD digital inputs somewhere else to free up a PWM pin. Although I said I’m not planning on any other changes, I am willing to move around the button input pins to free up two more PWM pins if I come up with something else that would need it. Anyway, on the default screen with the time and date, the LCD dims five seconds after you press any button or return from the menu. In the menu, it stays on full brightness.

The last change I made was the menu now times out after 10 seconds after the last button press and returns to the default screen. As I mentioned in a previous post, the alarm processing is done when it’s on the default screen so it’s important that it’s not left idling in the menu. I still have to make sure it works on all of the menus but so far it’s been fine.

Now that the guts are nearing completion, I’m trying to figure out how I’m going to package it. I don’t want to use cardboard because I want it to look more presentable this time. The last resort is cardboard covered in coloured construction paper, but I’d really like to find another way.