week13 : networking and communications

Assignments: Design wired/wireless network via at least 2 modules.

About wired network, I suppose I will not use this technic in my final project, so this week, I focused on the wireless network. I brought some HC-05(Bluetooth modules) from Japan and it's really easy to use, so first I tested it with my previous boards. Basically the HC-05 has 5 pins. Key, RXD,TXD,5.0,3.3 and GND. Key pin is for changing its mode, so if a board has FTDI pins, it's able to use Bluetooth modules. Actually I already have an experience with these modules (but with Arduino), so it's not difficult for me. I made an Arduino code for programming Attiny44 and a python code for serial communication via Bluetooth. Then I tried to communicate between my computer and the board. Yes, it sucess. Here is the video.

There are two things you need to change from the serial communication. One is to change the port. The other is to change the rate (normally the serial communication uses 9600 bps, but for bluetooth, it is needed 38400 for HC-05).

About python code, I typed it in command line.

  • import serial
  • ser = serial.Serial("port",38400)
  • ser.write("data")
  • About the power supply, I would like to use button batteries. However generally the battery only can supply 3V or 1.5V. So if you wanna 5V, you need a regulator in order to convert 6V to 5V. I think it's good idea to make a battery holder and attach a board which has a regulator on it, and make a button battery 5V power supply module.

    I might not use such network communication among the boards, but defenetly I use the communication via internet in my final project. I suppose I should connect my final project to a computer via a cable, but if I can use wifi module and access to the internet without PC, it's could be more great project. Then I tested the wifi module (ESP8266). The carefully thing is that its VCC is 3.3V. So if I use it with Attiny44, I need to let the 5V down to 3.3V in whole board or in VCC, TX and RX before wifi module. I made a whole new board which has 6 pins for analogRead, 1 LED, power supply pins and also it has female pins for the wifi module.

    I downloaded the Arduino example from here, but it's too big for Attiny44 to install, so now I'm managing to making it smaller. Also I need to establish the server for just making sure it works or not.

    Download files

    Bluetooth AT commands code .ino

    Bluetooth simple test(which I used it above)

    Eagle: btn board btn sche Bluetooth boardBluetooth sche

    btn cut btn trace Bluetooth cut Bluetooth trace