TFT LCD Screens are great. They have really good resolution, they can be used as an input device and give you a lot of flexibility in terms of display. The downside with the cheap chinese versions (like the one shown below), you can't turn the LCD backlight on and off. So you either have to have it on completely or off completely.
I purchased this one on amazon, and it didn't come with any drivers or instructions, however reviews indicated (and I confirmed) that https://github.com/prenticedavid/MCUFRIEND_kbv this library will make it work. It still took some tweaking.
This blog captures what I'm learning in exploring micro-controllers and electronics projects.
Saturday, October 6, 2018
Sunday, September 16, 2018
Songle Relay
These power relays are great for simple control of turning power on and off to a device. The tricky part is finding any information on exactly how the pin mapping is setup.
Saturday, September 15, 2018
Rise and Smile Project
The original goal of this project was to provide a way to send messages to my kids before I went to work since I go in very early and don't see them in the morning. This simple device can receive messages from a computer or phone over a local LAN, and displays the text on its screen.
Saturday, September 8, 2018
Adafruit 4x3 Phone Matrix Keypad (with I2C)
This entry details the setup for using the Adafruit Phone style 4x3 Matrix Keypad. I liked the way this one looked, even though there wasn't good documentation how to use it. I wanted to prevent utilizing so many digital pins, so I went the I2C route with the PCF8574 board.
Arduino IDE Paths
When developing in the Arduino IDE there are a number of paths for where specific examples or libraries are stored, or can be stored for easy access.
By preferences set in the IDE you can set where your own generated sketches are.
From here, an internal libraries folder is created. Any files placed within that path are considered part of the system path, and therefore files can be included with the <*.h> syntax.
There are also the following:
- C:\Program Files (x86)\Arduino\libraries
- C:\Users\[username]\AppData\Local\Arduino15
Push Button (non latch)
When adding non latching push buttons to an arduino, it's not obvious from the button itself how the signal flows through its prongs. In the image below, top two prongs are shorted, and the bottom two are shorted. The switch essentially joins the top to the bottom when pressed.
Traditional methods of wiring for these buttons are as shown. A pull-down resistor method on the left, and a pull-up resistor method on the right.
Friday, August 31, 2018
I2C Backpack for LCD
This link more than adequately covers the setup and execution of using a PCF8574 backpack with a standard LCD https://www.instructables.com/id/Using-PCF8574-backpacks-with-LCD-modules-and-Ardui/
The beauty of the backpack is that it reduces all the digital IO needed to run an LCD down to two digital pins!
I have some caveats to identify when working with the NodeMcu ESP8266
NodeMCU - ES8266 Board
The NodeMCU ES8266 board is probably the most affordable method making use of the Arduino IDE to have WiFi capability in a microcontroller package. It is as simple to use as an Arduino, although I have found that there is a great limit in using it like an Arduino in terms of what pins are available.
Sunday, August 26, 2018
ENC28J60 - Ethernet Board
In continuing to pursue ethernet communication with the arduino, I purchased an ENC28J60. My initial plan was to use this small board as a replacement for the Arduino Ethernet Shield for when working with the Arduino Nano. However, not only has this been the most difficult board to integrate with, it also did not seem to work with the Nano.
Sunday, August 19, 2018
Ethernet Shield
Saturday, August 18, 2018
Gikfun Soil Moisture Kit (EK1915)
I purchased this kit to learn how to integrate a soil moisture detection circuit with a watering pump mechanism. This kit works however I have the following criticisms:
- It came with no instructions
- The one schematic on amazon is incorrect
- There is no arduino involved (contrary to the description)
Friday, August 17, 2018
Motor Shield - Stepper Motor
Using the Motor Shield for controlling a stepper motor is about the same amount of effort as it would be to run it if you had a ULN2003, however, the wiring is a more tedious in this case since you have to run all 5 wires directly into the shield, rather than plug it into an adapter board.
Motor Shield - Servo
Using a servo with the Motor Shield is basically a pass-through. The main points primarily revolve around wiring.
Wiring
- Brown wire should be nearest to the corner of the shield when installed
- Digital pins (orange wire) are D9 and D10 on the arduino
- The row connected (shown above) is D10
- External power is not needed in the shield
Coding
- Use all the same example codes as you would for Servos without the shield.
Adafruit MotorShield v2.3
The Adafruit MotorShield is a convenient way to control DC motors, Servos and Stepper motors. Within a current limited capacity, one could run all three.
Upon purchase it is worth noting that you have to solder the stand off pins that connect the shield to the arduino.
After that, in the Arduino IDE, download the appropriate MotorShield library which has all the examples I'll reference for applications using this shield.
DC Motor Direct
Connecting a DC motor directly to the Arduino is pretty involved and requires a resister, diode, and a transistor. In the grand scheme of things, it isn't that much, by comparison to the simplicity of using the Motor Shield, it's seemingly not really worth it, especially if you want to run more than one DC motor simultaneously.
A straight forward tutorial on how to do this can be found here: https://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/overview
Stepper Motor - Direct Connect
This entry covers direct connecting a stepper motor to the Arduino. In this case it is common to use a ULN2003 board to simplify the wiring interface.
Servo - Direct to Arduino
This covers controlling a micro-servo directly connected to the Arduino. I say directly connected as opposed to using a motor shield.
Power Supply Module
The Elegoo kit came with a power supply module, shown below. This board simply plugs into a standard bread board, and supplies power to the rails. This is convenient if you want to be able to supply 5V or 3.3V external to the Arduino power (i.e. driving motors).
Ensure that when installing you note the orientation so (+) is in the positive line and (-) is negative.
- Input is 6-9V
- Output is either 3.3 or 5V (based on jumpers)
- Max Output Current: 700mA
LCD
This is the summary information for getting an LCD up and running with the Arduino. For this example I have two different LCD, one backlit, one not.
Starting with Arduino
For most of the initial posts, I'll be working with an Elegoo Uno R3 Arduino. This was purchased as a starter kit with a diverse set of sensor, motors and controls. So far the kit is great and I've been able to run a number of example projects already.
Subscribe to:
Posts (Atom)