Tuesday, April 17, 2018

Adding a LCD to a ESP8266

Tutorials for adding a LCD to a Arduino are all over the net. It's pretty simple, and I2C makes the wiring even simpler, and libraries prevent complicating the code much. However, adding a LCD to a ESP8266 is not as common, and there is much misinformation posted about logic levels, and what not. So here is a working project using a I2C LCD, and a ESP8266. Wiring is very simple.

SCL to SCL
SDA to SDA
(these two pins are redirectable to another set in the Wire.begin command:

//Wire.begin(); default
Wire.begin(0, 2); // specified SDA, SCL pins

Gnd to Gnd
+5v to +5v (USB or Vin)

Yes, the LCD prefers 5v, and it won't affect the 3.3v logic of the ESP8266, as the ESP8266 I2C is in output, not input mode.

Some slower I2C devices won't work out of the box with the ESP8266 because of timing issues, and a stretch adjustment needs to be made. We found one I2C display that would not register on the I2C scanner sketch, but the rest did. If the scanner finds it when connected to a UNO, but not a ESP8266, place the following command after the Wire.begin line.

Wire.setClockStretchLimit(500L);

Make sure you run the I2C scanner first, to check what I2C address your display uses. See more in our Instructable at https://www.instructables.com/id/I2C-LCD-ESP8266/

If you don't have one already installed, you will need to install a I2C LCD Library. Those instructions are included in the Instructable.

Saturday, March 31, 2018

Controlling a ESP8266 with Alexa

Here is an easy project using a Echo Dot (Alexa) to control my ESP8266. I give it simple commands (Alexa, lights, off) and the command shows on the LCD screen attached to the ESP8266. Actual relays will be the next step to attach.

The project is based on the Adafruit tutorial at https://learn.adafruit.com/easy-alexa-or-echo-control-of-your-esp8266-huzzah/overview

with LCD and other modifications made by me. My code is found at https://pastebin.com/NjMcsTRh

Also see my ESP8266 LCD Project at https://www.instructables.com/id/I2C-LCD-ESP8266/



Friday, February 23, 2018

5mm LED Holders

One of the things I find myself making often, is plastic (plexiglass) control panels. I still have not made my desktop cnc yet, but when I do, I can stop drilling these panels by hand. Mounting LED's is always a task, and I started using these very nice chrome LED holders. They come with a plastic plug for the 2 LED leads to stick through, and hold the LED securely. For my 4 lead RGB LED's, I just use a spot of hot glue to hold the LED, and heat shrink tubing to insulate the leads. Use a silicone coated wire for flexibility and stress relief.

http://amzn.to/2op7MGL




Tuesday, February 20, 2018

FreePBX - Open Source PBX Phone System

I just installed FreePBX, a linux based open source phone system at work (12 SIP trunks, 40 extensions), and thought, why not a home / small office unit based on a Raspberry Pi? The Raspberry Pi can easily handle multiple SIP trunks, and enough IP phones for the whole family / small business to have a extension or even a private DID. The FreePBX software is free, the Raspberry Pi is inexpensive (about $80 for a complete kit) and PolyCom IP Phones are readily available for around $80 each. Now you can have individual voicemail (email integrated), auto attendant, intercom, paging / bells, and music on hold just like the big boys. The phones and paging adapter can be powered by a inexpensive POE network switch, as can the Raspberry Pi with a POE Hat.

Arduino integration? Yes your Arduino can make outbound calls with prerecorded alerts!

Thursday, January 11, 2018

ATX Bench Power Supply

As a Ham Radio operator and a electronics / programming fanatic, I'm always on the lookout to improve my bench equipment. This weeks upgrade is a multi voltage bench power supply. For those that have been looking, bench power supplies can be very pricey, but many people overlook the ubiquitous computer power supply. It has +12v, -12v, 5v, and 3.3v taps, but not in a easy to use form. That changes with a ATX power adapter. Now you can easily add a variety of voltages to your projects, in some hefty current ratings, up to 36 amps or more.

The next stage is to add a Arduino voltage and current display for each output, and maybe some MOSFET's for adjustable output for testing motor speed.

ATX Power Supply $22

ATX Power Distribution Board $30
includes solderless breadboard and breadboard power supply adapter. 

See http://www.electronics-tutorials.ws/blog/convert-atx-psu-to-bench-supply.html for notes on cooling, regulation, and other voltage combinations.
Related Posts Plugin for WordPress, Blogger...