Week 12

networking and communications


Supplies, Tools, and Software

  • RN4871 Bluetooth Chip
  • Bluetility - mac app for scanning bluetooth devices
  • LightBlue - iPhone app for scanning bluetooth devices
  • pyserial with miniterm - to communicate with the chip via FTDI

Files

Overview

This week, I used an RN4871 chip to communicate via bluetooth, which I’m hoping to use to communicate between an iPhone and my final project.

Board Design

I started by using Neil’s hello.RN4871.ftdi board on this page, and also connected an LED and resistor to one of the pins (pin 7 of the RN4871), which I was hoping to be able to toggle on and off via bluetooth.

bt

Board Fabrication

Milling

Per usual, I used the Roland SRM-20 and mods to mill the board. I ran into a few issues here this week. The sacrificial layer on the mill was really beat up after machine week, and it must have been a bit uneven because of that. Jen helped me change it after my first mill came out a bit messy.

bt

Then I got a good one, but accidentally vaccuumed it up as I was cleaning the mill. Whoops.

The 164” endmill that I was using ended up not cutting cleanly, so it took me a couple more attempts to find one that was clean, but finally I got a good, clean chip.

bt

Soldering

Soldering went smoothly, except that the RN4871 had really small connection points that were difficult to attach without running into the neighboring pin’s connections. This took me a few attempts.

Things finally worked out when I realized that I didn’t need to solder all of the pins, and only soldered. the pins that were connected to something.

bt

Programming

Powering the board

I gave the board power with an FTDI connection, but I didn’t see it on any bluetooth scanner (Bluetility on my mac and LightBlue on my iPhone) and wasn’t able to communicate with it via the Arduino IDE serial monitor.

bt

I used the multimeter and realized that some of my traces must have been bridged under the chip, so I used the heat gun to pull things up. I resoldered and ripped up a few times, but eventually saw it show up in the bluetooth scanners.

Communicating with terminal via FTDI
sudo miniterm.py

This shows the available ports. I checked the port for the USB by running this a couple times and plugging it in.

I reran the code above, this time adding the port name (/dev/ttyUSB1) and baudrate (115200):

sudo miniterm.py /dev/ttyUSB1 115200

The next part was confusing, since no CMD> prompt showed up initially. To get this to show up I typed (but couldn’t see):

$$$

By default, you can’t see the chip’s responses, so you can toggle echo on by sending:

+

Then:

SS,C0

and to reboot the board:

R,1

There were a ton of bluetooth devices near the archshop, so in order to make mine recognizable, I renamed it:

SN,JimBluetooth
Communicating via bluetooth

I used Bluetility on a different computer to scan for the chip via bluetooth, and found it. I was able to send messeges between them.