Thursday, August 29, 2013

Part I - Bluetooth communication

To make this controller work, I started making a list of components that will do the work.
The heart of this thing will be Arduino Uno.

It has more than enough of power for this task. Only problem is number of connectors. But that can be fixed with multiplexer. On Spark Fun Electronics I found just what I was looking for, Mux Shield.
Mux Shield goes on top of Arduino Uno nicely. 48 inputs/outputs for the price of 7 pins sounds like great bargain. When I put these two together I did not put pin headers between shields and short circuit appeared. Mux Shield lower part touched USB connector of Arduino board so I put a bit of isolator between these two. This fixed the problem.
Next I was thinking about interface to work with the controller. Since I am better Android developer than I am Arduino developer, I decided that for start I will control this thing with my phone over bluetooth connection. I fount this peace of electronics:
It is JY-MCU Bluetooth Wireless Serial Port Module v1.05. I found how to connect it to Arduino board on this link. Since Arduino has 5V output and bluetooth module works with 3.3V, I put voltage divider between Arduino trasmition pin and Bluetooth receiver pin.
To set it up my way, I had to try quite a few code samples. I was trying to set my own PIN, name and classification. Classification still does not work. Here is Arduino code for setting up bluetooth.


When I connected all these components together and connected Arduino to my computer with USB cable, I installed this code on it and it looked fine. Then I made Android application for connecting to bluetooth devices. I found everything I was looking for on Matt Bell's blog.
This is schema of current situation:

To show how all works, here is short video:

In next post I will add Real Time Clock Module for keeping time even when electricity turns off.

Thursday, August 8, 2013

What's the big idea?

My friend has beautiful salt water aquarium, but has problems with controller. So I came up with an idea that I would like to take a shot at making one. It should be easy to use and as cheap as possible.
For months I was looking for project where I could use Arduino microcontroller for something meaningful. This was just what I was looking for. Ideas started to fill my mind and I started to write them down. I could even include Android device for better control and internet connection. Since salt water aquarium is a complex set of devices that have to work together properly, the controller will have to be build in stages.
On this blog I will try to show my ideas and how I will implement them. There will be problems and the solutions will be found. Tomas A. Edison said: "When you have exhausted all possibilities, remember this - you haven't."