Introduction: LinkIt ONE Bluetooth Solenoid Control

Hello!

In my second Instructable, I will show you how to control a solenoid using the LinkIt ONE board.

A solenoid is just a coil, which when provided with electricity, acts as an electromagnet. It can be used as an actuator, closing door locks or something similar.

Using the functionality of the LinkIt ONE, we can use it in with many different technologies very easily, such as Bluetooth, GSM, and WIFI, where we can control it from anywhere in the world remotely. But today, in this Instructable, I am only going to use Bluetooth to control this.

Step 1: Introduction

As most of you must now know, that the LinkIt ONE cannot provide enough current to a solenoid through its digital pins. Due to this, we need to have a transistor such as the TIP120. This same circuit can be used in many other different applications too. A 12v bulb or a 24v motor, it can be driven by this circuit and the good thing is that you can control it by the LinkIt ONE itself.

Step 2: Materials Required

  • LinkIt ONE with firmware already upgraded
  • USB cable to connect LinkIt ONE to your PC
  • A Solenoid (Mine is 5v, extracted from an old floppy drive)
  • TIP120 transistor
  • 1N4001 diode
  • 2.2K resistor

Farnell is a excellent source for electronics but if not,
then even better is scavenging from old electronics. Old radios and TV’s can provide nearly all of the components you ever need for hobbyist electronics, such as resistors, capacitors, etc.

I will not show you how to upgrade the firmware of the LinkIt ONE, because as said in my previous Instructable, it is given on the Mediatek website, and, now there are many tutorials for that. Before uploading my code, I will expect you to be successfully able to upload sketches to your LinkIt ONE board.

Step 3: Now to the Android Side

I have attached an Android application. Download that and place it on your Android phone’s storage. Navigate to it and then click on it. Allow it to install the application. Make sure that you have enabled installing 3rd party apps in your phones settings.

Note: I have tested this on a few phones and it works. If there is any problem, please post in the comments and I will be more than willing to help.

Step 4: Uploading Code to LinkIt ONE and Final Working

  1. I have attached the code here. Download it and then upload it to your LinkIt ONE.
  2. Unplug the board and then make this very simple circuit on your breadboard. I have included a Fritzing diagram. Do not get confused by the Fritzing diagram, the solenoid has no polarity, as it is just a coil. You can plug it in any direction.
  3. Then connect the LinkIt ONE to its battery or USB connection to power it up and switch on the solenoids power supply also, which is 5v for mine.
  4. When done, take out your Android phone and click “LinkIt Switch”.
  5. If Bluetooth is not switched on, it will prompt you to do so. Do that and then press the settings button and click “Make Discoverable”. When done, click the Bluetooth icon next to the settings icon and then scan for devices.
  6. It will show available devices and when clicked on that, the device will show paired devices.
  7. Click on the the device in paired devices and then you will be able to connect to the LinkIt ONE, whose name will be "My_BTServer". Hopefully, it should connect successfully.
  8. When done, press “On”. The electromagnet will be powered at once and the metal piece held in place, difficult to pull out. Similarly, pressing ”Off” will switch off the current passing through the solenoid.

If you follow the steps to the point, I think, you will have no problems in completing this still, if you have any problems, feel free to comment and I will surely help you out.

Comments