arduino, IOT, Making, PCB Manufacture

Upload a sketch to an Arduino UNO with bluetooth using the Adafruit Bluefruit EZ-Link breakout

I’m working on ways to make my Arduino UNO communicate with my Raspberry Pi 3 over a serial connection, and I’ve used a USB cable to connect the two devices together.

But because the Type-B USB connector on the Arduino is being used, I don’t have a convenient way to upload sketches to the Arduino UNO from my development machine.

I can obviously disconnect the USB connector from the Arduino UNO and connect it to my development machine, but this gets kind of old after a while, and I’d like an easier way to upload sketches.

So I dug deep into my box of electronic bits and pieces, and fortunately found I’ve got another way to do this – I can add bluetooth capability to my Arduino UNO with the Adafruit Bluefruit EZ-link breakout board.

First connect the board to the Arduino UNO

I could have done this with wires and a breadboard, but I decided to make a custom shields with some copper clad PCB board and my Shapeoko.

WP_20170803_11_23_20_Pro

Fortunately there was very little soldering to be done on my custom PCB as my soldering could be better!

WP_20170803_11_23_35_Pro

 

I designed the PCB according the pinout recommended by Adafruit, which is:

EZ-Link Arduino UNO
GND GND
DSR Not connected
V-IN 5V
Tx Digital Pin 0 (Rx)
Rx Digital Pin 1 (Tx)
DTR 1uF in series with Reset

Attaching the breakout board to a custom made PCB makes the whole device more self contained and I can also add other Arduino shields on top.

I found out afterwards that Adafruit actually sells something similar to this already – a Bluefruit EZ-Link Shield.

Now pair the Bluefruit board with a development machine

Adafruit provide some really good documentation for pairing the Bluefruit module with a Windows 7 machine – but I’ve written my own notes before for the Windows 10 operating system.

My Arduino is powered by the USB connection to my Raspberry Pi, so once I attached the shield to the Arduino the blue power light came on immediately. The next step was to pair the Bluefruit device with my development machine.

My machine has bluetooth v4.0 on board, but I could have used an after-market bluetooth dongle like this one – it’s important to get one that supports bluetooth v4.0, some of the cheaper dongles do not support v4.0.

From Windows 10, I typed “Bluetooth” into the search box on the taskbar, and the results gave me the option to select “Bluetooth and other devices settings”.

screenshot.1501708578

I clicked on the “+” button beside the text “Add Bluetooth or other device”, which opened the screen below.

screenshot.1501679214

I clicked on the Bluetooth option, which opened the screen below, and this shows the Adafruit EZ-Link device.

screenshot.1501679192

I selected the Adafruit device for pairing, and received the success message below.

screenshot.1501679253

So at this point, it’s possible to upload sketches to the Arduino through the Bluetooth COM port – and in the image below, you can see that even though my Arduino isn’t connected by USB cable to my development machine, the serial port COM6 is available to me.

screenshot.1501710670

I talked about how to use VSCode to develop and deploy to the Arduino last time, and it works exactly the same way in VSCode.

And as far as the Arduino is concerned, this is just another COM port, as if the Arduino was directly connected to the PC using a USB cable. I don’t need to do any further set up, and I can verify and upload my sketch to the Arduino UNO wirelessly through COM6 (it’ll probably be different on another machine). It’s a little bit slower to transfer a sketch over the air, but at least it’s wireless.

Wrapping up

This was a short post about how to wirelessly deploy sketches to the Arduino using the Adafruit Bluefruit EZ-Link breakout. When I can’t use the Arduino’s on board USB port, this device makes my Arduino development much more convenient. If you have this device in your toolkit, hopefully you find this post useful!


About me: I regularly post about .NET – if you’re interested, please follow me on Twitter, or have a look at my previous posts here. Thanks!

One thought on “Upload a sketch to an Arduino UNO with bluetooth using the Adafruit Bluefruit EZ-Link breakout

Comments are closed.