Today I bring you guys something new, something that ended up to develop under some pressure and in a short time. In some of my recent projects where the energy consumption was smaller, I ended up to replace the AA batteries for Coin Cell batteries that took a lot less space. During the development process, I ended up draining a lot of batteries, so I replaced the normal batteries for rechargeable batteries. However, I completely forgot that I would need to recharge them. As a coin cell charger was quite off expensive in my area, I ended up to develop a charger by my self what ended up to be cheap(something around 3€) and fast. I used the TP4056 in this project that is a charger for a single cell lithium-ion batteries that will be in charge of charging the batteries!


Materials Used:
  • 1x Coin Cell Holder
  • 1x Small Prototype Board
  • 1x TP4056
  • 2x Very small wires

Schematics:



There are some things that should be taken into consideration when putting the project together. It is extremely important to assure that we do not solder the opposite poles between the battery holder and the TP4056. Each pin of the coin cell battery holder has its own polarity.

During the process of joining everything, I designed a simple case for the project to keep everything together and at the same time beautify the charger. The case can be downloaded from here.


And now... The final aspect of it:





Hi guys, today I bring you a new project that took me a while to reach where I'm but the result was worth it. It is not 100% finished given that I'm still reviewing and doing minor upgrades to the code but right now it's stable and ready to use.  As you can read in the title I called it MeteoClock and as his name suggests it is a clock with weather information. Bellow, you can see a preview of my project:





As you can see in the video the screen displays several fields of information about the date, hour and weather. 
MeteoClock screen in sections
The screen is split into four pieces and for simplifying the explanation I will use the image on the left with the sections already drawn by me. On the top, the first section as it's possible to see has the current date and day of the week. The second section has the current hour and minute in 24-hour format. The third section displays the current weather in Celsius as the maximum and minimum temperature for the current day. It also has the weather status as a representative icon of it. The fourth and last one has the weather forecast for the next 2 days and it displays the maximum and minimum temperature and a representative icon for weather status in that day.




MeteoClock uses an NTP server in order to keep date always updated and take into consideration the daylight savings time. It also consumes 2 web services to retrieve data that is essential to his fully functional behavior. One of the web services is the Wunderground, the weather service, that is used to get the current weather information and the forecast for the next 2 days. The second web service is used to retrieve the sunrise and sunset time in the given coordinates so the interface will be able to keep up with sun position.

The case used in this project was created and design by me and is also available on the repository with the code of this project.

Source Code

Materials Used:
- 1 x ESP8266
- 1 x LCD TFT ILI9341 2.2"
- 1 x Switch

Schematics:

MeteoClock schematics


Now, you just need to assemble everything as you see on the schematics and print the case from the .stl files and put it all together.


Keep in mind that futures code releases will be done to my repository and this publication may not be updated so always check my repository and read the README file.

Welcome back! If you only now joined us and are trying to program ESP-01 with UART ESP-01 I strongly advise you to take a look at Part 1 of our series otherwise, if you have your own way to program ESP-01 you can use it. I'm assuming that you should have finished Part 1 by now and that everything went fine and you are ready to proceed. So let's flash some code into our ESP-01!!

What will we need?

For this, we only will not need anything of special, only basic stuff that you already got like:

  • UART ESP-01 (our hacked version)
  • ESP-01
  • Arduino IDE

Preparation

To program our ESPs we will use Arduino IDE and for that, we need to install nodeMCU boards on it so you will be able to upload the sketch. If you haven't done it yet, you can take a look at this tutorial and see what you should do to install this boards on IDE.

Test your first Arduino program on your ESP-01

After finishing the board's installation, go to Boards menu and select "Generic ESP8266 Module". The normal configuration for an ESP-01 is the following:
Arduino IDE Configuration
  • Flash Mode: DIO
  • Flash Frequency: 40 MHz
  • CPU Frequency: 80MHz
  • Flash Size: 512K
  • Upload Speed: 15200 baud

Is important to say that are some ESP-01 that instead have 512K have 1Mb of Flash Size so it's your responsibility to read products description from the store you buy your ESP-01 and see which flash size it as.

Choose ArduinoISP as a programmer.

In the list of examples ESP8266Wifi, choose WifiScan. Put your ESP in Flashing Mode and then upload the program. Open the Serial Monitor (at 115200 baud). Your ESP-01 now scans your Wifi network and returns the found networks. You should now see something similar to the next image but with your nearby networks.

Sketch output with nearby networks



Hi there guys, long time no see! Today I came here to talk about the ESP-01 that is so tiny and can be so helpful to shrinkify the space needed for our projects despite it sometimes could be a real pain in the ass to program.
ESP-01
All those wires and GPIO pins that we need to connect and assure that ESP-01 is plugged into a 3.3V stable power supply make us lose a lot of precious time and even sometimes our patience. So I decided to buy an adapter to program it without the headaches of connecting the wires and I went from this...
Schematic to program ESP-01

to...
UART ESP-01


And it's so much simple you just need to plug there your ESP-01 and no more wires! Everything would be great if it worked, but the reality was that I was not able to flash the ESP-01.
But why!?


THE NEW PROBLEM -.-"

In order to ESP-01 enter in flash mode, you need to connect GPIO 0 to GND and this UART ESP-01 doesn't do that, so after some time spent on research, I think I found one good way to fix this. A simple hack that only takes a few minutes and makes possible connect both pins. The solution that I found consists of welding a switch to GND and GPIO 0. The advantage of using a switch here is that if we swipe it to the right it will create a bridge between the GND and GPIO 0 and will turn UART into an ESP-01 programmer but otherwise if we swipe it to the left it will break the bridge and UART ESP-01 will work as a normal UART.


THE SOLUTION

The solution for this, as said before, is really simple and for that, we only need a welding iron, a normal switch and one header pin or a piece of wire to join UART ESP-01 to the switch.

Material needed

After gathering all the necessary material we should start by preparing it. The first thing that we need to do is cut one of the side pins of the button because we will need only need to 2 of them and this way we prevent from the other one touch in anything that it shouldn't.

Button after cut the side pin
Now we only need to put everything together and we will be ready to program our ESP-01. Before starting to weld the button to UART ESP-01, take a look at the UART ESP-01 schematic to understand and see where each pin is located.

UART ESP-01  upside down schematic

Pick the button and weld the side button pin to GND and with a header pin or a piece of wire soldering the middle pin to GPIO 0.

UART ESP-01 with weld button

After welding both I strongly recommend using hot glue in order to help to fix the button and to prevent that anything messes up with what we just finished to do. In the picture below, you can see how I did it.

After applied the hot glue

Now everything is finished and we finally are ready to program our ESP-01. So let's move on to Part 2  and upload some custom code to it.

I have been working on a new project that will be published soon and for these project, I needed to calculate the date of the last Sunday of a given month in the current year. This was a hell of a problem because I didn't found anything useful on the Internet that could help me figure how to solve this problem. So I decided to share it with you and keep a registry with everything explained so if anybody gets stuck in the same problem than me maybe this will help. You can see the code below:

As you can see on the Gist the code is pretty simple and the whole trick for this is on line 25. The expression "((d += m < 3 ? y-- : y - 2, 23*m/9 + d + 4 + y/4- y/100 + y/400)%7) " published by Michael Keith and Tom Craver in 1990 converts a Gregorian date into a numerical day of the week and you can read about it here. The expression does preserve neither y nor d, and returns a zero-based index representing the day, starting with Sunday. For example, and as you can see in the table below if the day is Monday the expression returns 1.

Day Of Week Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Index Retured 0 1 2 3 4 5 6

Now that you know how the expression works and what it will return you, all that you need to do in order to get the date of last Sunday of the Month is calculate the Day of the Week for the last date of the Month and then subtract it to the last day of the same Month and voilá there is the date of the last Sunday.
Hi there,

Today I will show you how to install ESP8266 support for the Arduino IDE and at the end you already should be able to flash your code directly from Arduino IDE to your NodeMCU. So let's start!

First of all open the Arduino IDE and go to File > Preference

Image 1 - Arduino IDE File Menu


Then copy the link below and paste it on "Additional Boards Manager URLs" as you can see in image 2.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Image 2 - Preferences Window

Now just click OK to save and close Preferences Windows. If you complete successfully the steps above now we should be able to install ESP8266 support to Arduino IDE. Just go to Tools > Board > Boards Manager...

Image 3 - Arduino IDE Tools Menu

Type into search box esp8266 or navigate through options and search for esp8266 community and install it as you can see in image bellow.


Image 4 - Boards Manager Window

Congratulations, now you should be able to find ESP boards in Tools Menu and flash it directly from Arduino IDE.
Today I came here not show something I have created or that i'm currently working but to share something that I had found a few days ago. I found one of those I think be the most usefull and relevant posters that a Maker can have to help him with electronic components! You can find it here.

Poster

As you can see it is divided into 13 parts with important and easy reading information. On these 14 parts you can found the essencial information about:
  • Resistor Color Coding
  • Capacitor Coding
  • Electrical Units
  • Metric Prefixes
  • Regulator
  • Op-Amp
  • 555-IC
  • The Breadboard
  • Diodes and Transistors
  • LEDs (Light Emitting Diode)
  • Wire Gauge
  • Ohm's Law
  • SMDs (Surface Mount Devices)

You definitely should give it a try!
Today I'm going to share with you how connect a ILI9341 TFT to an Arduino with IC CD4050 for level shifting. I will be using Arduino Nano but you can you use any other Arduino based board. 

Project Preview

Materials used:

- 2.2" ILI9341 TFT
- IC CD4050
- Arduino Nano
- Some wires

Explanation:
As mentioned before I will connect a ILI9341 TFT to Arduino and for help me doing that I will use IC CD4050 for level shifting from 5V to 3.3V. For the ones who doesn't know most Arduino boards operates with 5V logic and there are a lot of LCD like mine that only operate at 3.3V. For this situation you can do it as well with resistors and will accomplish the same result you just need to calculate the value of resistor that you need to use for level shifting from 5V to 3.3V.
CD4050
The image above represents the pinout of a CD4050 and as you can see it has 2 pins to power up the IC one for power(Vdd) and other for ground(Vss). The rest, despite of pins 13 and 16 that are NC pins, are in group of 2 pins where one is the input and the other is the output after the level shifting.

Schematic:
The image below is the schematic that I used to accomplish my objective and for better perception I created a table where you can see which Arduino pin connect LCD and where and if it goes through CD4050.

Schematic

   Arduino      CD4050   ILI9341 TFT
D4RESET
D5CS
D6D/S
3.3VxLED
D11MOSI
D12MISO
D13SCK
3.3VxVCC
Connections table
Code:
In this part we will need to add 2 external libraries to our Arduino IDE and you can download both from the links below:

- Adafruit GFX Library
- Adafruit ILI9341 Library

It is important to mention that any of the libraries that we will use were created by me. All the effort into both libraries is from  Adafruit.

After add both libraries it's time to see if everything is working. Just open Arduino IDE and go to File > Examples > Adafruit ILI9341 and open the sketch "graphicstest". Now you just need to do 2 small changes comment line 26 and uncomment line 28 and replace the LCD pins names for Arduino pin numbers that we used to connect it and you are ready to upload your sketch. You can see my final code bellow:

Demo:
After everything assemblied if everything went right you should get this:

Project Demo


Demo:
Description:
Simple project where I build a Mood Lamp with arduino.
Materials:
  • 1x Attiny85
  • 4x RGB LED (common anode)
  • 12x 220Ω Resistors
  • 1x Power Jack Female
Schematic:

Code:
You can get it from my repository here.