Thursday, January 19, 2017

NodeMCU has Arrived!

It's Here!

I'm currently on the business trip and while at the hotel, I decided to experiment.


First, this unit communicates over a serial connection over 9600 baud rate. I used PuTTY on KDE Neon (Linux) and used the COM location /dev/ttyUSB0. From there, you're able to place commands such as the examples here.

Below is the top schematic view of the NodeMCU, credit goes to this website for the image and python code used.

NodeMCU v1.0 Pinout (Click to Enlarge)

Essentially, I created a short video displaying a python script, which was taken from the link above(with some modifications). Once I have the remaining project items, I'll be continuing the Garage Door Project. Till then, I'll keep on experiencing. Enjoy:


Saturday, January 14, 2017

Electronic Components 101

The basics of electronic components/theory is where I'll begin this post. Several websites explain in great detail. However, I learn at a visual and 'example' level, if there's no scenario of the device or example in production i really do no grasp it. So, this may seem overboard however it's the way I learn.

We have two standards of Electronic Signal:
  • AC (Alternating Current):
    • Current is constantly reversing, Telsa's answer to Edison's Direct Current limitation. The Rate of Reversal is measured in Hertz
  • DC (Direct Current):
    • Flows in one direction between Power and ground. There's always a positive source of voltage and ground.
Electricity is typically defined as having a voltage and current rating(AMP). Electricity can also be defined in resistant and watts. Never exceed the Wattage rating of a component, you can Calculate the wattage, by V * I(AMP). For Example:

A Laptop Power supply which supplies 20Vs at 3.25Amps. Equals power delivery of 65Watts.
20 * 3.25 = 65

Circuits:

Closed Circuit - Allow the flow of electricity between power and ground
Open Circuit - Would break the flow of electricity between power and ground

Resistance:

Electricity in a circuit must be used. Also, electronic devices need some type of resistance in their circuity. If not, those electronic devices will short circuit, or burn. It's very important to know that Positive is never directly connected to ground. Also remember that a switch will not add resistance to a circuit. If you were to connect a switch between + and -, the circuit will short.

Series VS. Parallel:

Series - circuits are wired one after another, such that electricity has to pass through one component to the next.
Parallel - Wired side-by-side, such that electricity passes through all components at the same time.

Tuesday, January 10, 2017

A 2-Channel Relay

Good evening everyone,

I thought it would be neat to do some investigation and research on how each part operates as it arrives in the mail. So the first item is this 2-channel 5V DC relay. You would typically use these units to power higher voltage circuits with a lower voltage. In the project, this relay will be used to open and close my garage through a NodeMCU controller.

Relays have a built-in switch essentially, when a voltage change the electromagnet is charged or not, thus causing the common terminal armature to move between NO or NC.


The Front section of the Relay focuses on connectivity to the External device. 

NC1(Normally Connected Channel 1)
COM (Common Pin)
NO1(Normally Open Channel 1)

NC2(Normally Connected Channel 2)
COM (Common Pin)
NO2(Normally Open Channel 2)

If you're using a electrical outlet for example, you'd splice the positive the wire to COM and another to NO or NC. Then depending on the configuration of the relay, you would do directly to AC current or be controlled through a Microprocessor.

On the back are the connections to either the micro controller or to AC:

Right:

  • Gnd (Ground)
  • IN1 & IN2(input 1&2) This would go to a controlled pin on a Arduino
Left:
  • Jumper settings:
  • JD-VCC + VCC = Power handled from external source rather than Micro Controller
  • VCC + GND = Power handled by Micro Controller

The reason I'd be using a 2-Channel Relay, in the event of a power failure a reboot of the micro controller would typically cause the circuit to activate upon restart. By placing a jumper wire between the two common pins, this operation is prevented.

Full Disclaimer, this is my first time really delving into electronics. If you find any of my data incorrect, please inform me. I want my audience and myself educated the correct way.

Further details can be obtained from Wiki or from this Source and this great source.

Sunday, January 8, 2017

Use IoT NodeMCU to open Garage Door

Based on the Makezine article listed here, but same approach with a NodeMCU IoT device.

I'll start with saying I've always had a fascination with Electronics, but I've traveled down the IT path. Today, I'm beginning a new venture, into home automation. Sure multiple example exist about using a smart phone to automate your life. I'm trying to force myself to learn electronics while doing this project, and many more. 

First, I've already ordered my equipment:
Second, I ensured my Arduino application included the NodeMCU/ESP8266 board, I've used the following link. I'm using Linux Mint 18.1, so Mine looks like the following (Parsed to remove personal data):

Third, research. As stated, I'm aiming to gain electronics experience during this process. 

Thanks.