Week 11: Networking and Communications
Designing and milling the board
I decided to design my board around the ESP8266 chip. I have my own router in my room so that I can connect my smart devices (Chromecast, Google Home, Wi-Fi lights), and I think it would be pretty cool to be able to develop my own smart devices that can communicate over my network. Neil's hello-world board for the ESP8266 has the ESP8266, FTDI header, 3.3V regulator, and two capacitors so I added those components to my design. Here are the Eagle files for the board I made:
I milled and stuffed the board. I forgot to grab another capacitor from the EDS so I only have one capacitor on my board but it is still pretty stable.
Programming the board
My first goal was to open up a serial connetion with my board. I've been using an Arduino Uno as a USB to TTL converter but removing the ATMEL chip and just connecting the RX and TX pins. I also powered my board from the Arduino. I first used the 3.3V pin but I was only getting 2.3V out of the regulator so I changed to sending in 5V from the Arduino.
I was using both the Serial monitor in the Arduino IDE and python miniterm in my terminal to try to send AT commands. I was not getting readable characters for a while because my baud rate was wrong. The baud rate that I needed to use was 115200 so the terminal command I used to start up my connection was python -m serial.tools.miniterm /dev/cu/usbmodel1421101 115200
I used AT commands to set-up my network connection. The commands I used in order are:
- AT
- AT+GMR
- AT+CWJAP="NETGEAR64", "mywifipassword"
- AT+CIPMUX=1
- AT+CIPSERVER=1,80
- AT+CIFSR
I opened up another terminal window and pinged this IP to verify that the board was actually up and running.
When I accesed the IP on port 80, I saw a response in my terminal that there was a GET request made from my machine.
Now that I am more familiar with the ESP8266, I think it would be really cool to look into the Google Home API to see if there is anything I can develop that will work with the smart devices I currently have in my room.