- This topic has 4 replies, 2 voices, and was last updated 4 years, 3 months ago by Evert.
2016-08-14 at 19:33 #1370EvertGuest
I have attempted to build your design, and after a full day of drawing, measuring, soldering etc i managed to complete the BT build. With practically little to no experience with building these kind of things. The theory I do get, at least I think so. I am able to read and understand the schematics. And have some basic programming skills.
I use an iPhone, so I had to dug through the archive to find myself a “vintage” Samgung Galaxy S which belonged to my wife before she made the switch to Apple. When I downloaded the app and ran it, it seemed to work. Only after connectong the blue BT button shows that it is not connected. However, the LED on the HC-06 module stops flashing and turns to a constant burn so I reckon it is connected anyway, but because of some sort of a bug the app shows that it is still not connected. But when I hook up a valve (read: a 12V car light bulb since the valves are still under shipping) it is constantly powered (so first thing i checked was whether the valve wasn’t set to drain mode, which wasn’t the case. After changing a bunch of other settings I was about to give up. When I came up with the idea to change the 009c code on the arduino to device_type 1. Once i changed it I hooked up the board to the PC, plugged in the power and the “valve” and ran the PC software. and to my relief it is now working like a charm!!
Leaving me with the question which I hope you might be able to answer. Why it all won’t work when it is on BT… So I was hoping that you could give me some pointers or even a solution. Perhaps the device which I use is too old, or is one of the settings in the HC-06 module not correct or compatible with my device. or could it be something else?
Hope you can help me out, because I’d love to see it work over bluetooth.
2016-08-17 at 06:59 #1371MartynKeymaster
since the LED on the Bluetooth module is changing then the problem will be with the connection between the BT module and the Arduino.
There are 2 parts to the connection when using Bluetooth. 1. The Android device connecting to the Bluetooth module, and, 2. the app connecting to the dropController/Arduino.
1. The Android device connects to the Bluetooth module. The LED on the BT module changes.
2. The app sends a HELLO message to the drop controller and waits for a reply.
3. The dropController gets the HELLO message and turns on the waiting LED (the yellow one)
4. The dropController sends back the HELLO message.
5. The app gets the reply and changes the BT button and the screen title to connected.
If the waiting LED on the dropController is not turning on then the dropController is not getting the HELLO message.
If the LED is coming on but the BT button is the app is not changing then the app is not getting the reply.
I suspect you have the BT module connected wrong or at the wrong baud rate. The dropController uses 9600.
Check all the connections, check the resistor values and make sure they are the right way around.
If you are still having problems have a look at the Bluetooth guides I have on the other website – http://www.martyncurrey.com, especially http://www.martyncurrey.com/arduino-with-hc-05-bluetooth-module-in-slave-mode/ and http://www.martyncurrey.com/arduino-and-hc-06-zs-040/
2016-08-24 at 20:55 #1382EvertGuest
After some checking I think that all connections are correct. At first I didn’t connect the LED’s so i actually didn’t knew whether they would burn or not. But tonight I connected them as well. So now when I connect BT within the app, the LED on the HC-06 stops blinking and goes to a steady burn. But neither the yellow or green LED light up.
After some fiddling around, by switching back and forth between BT and PC in the sketch and trying to do the same thing over and over again at a certain point the LED’s started burning when I was trying to connect trough BT. And the button in the app finally changed to connected. the only thing is, that the LED’s only come on when i have the USB cable still connected to my PC. But at that point all options in the app work.
What could I be doing wrong, The BT module seems to work, but only when I have the USB cable connected to the PC.
Another strange thing is occuring when i don’t have the USB cable connected, and i connect with BT only (still No LES’s come on, and app shows “not conncted” button). the solenoid valve ports become powered constantly. so that they are in the “open” position.
2016-08-25 at 03:31 #1383MartynKeymaster
The usb and BT version should work independent of each other. If the BT version only works when the usb is connected then there is an issue with the circuit somewhere.
It sounds like the Arduino may be taking power from the USB port.
How is the Arduino powered when using BT? Does it work without a usb connection, does the Arduino power light come on when using an external power source?
1. Get a Bluetooth connection working, and then
2. Confirm you can run the Arduino from an external power source, and then
4. Get a BT connection working while using an external power supply.
5. Test the valves by connecting directly to a 12V power source.
Get a simple connection working with the android device. Follow the examples at http://www.martyncurrey.com/arduino-with-hc-05-bluetooth-module-in-slave-mode/
While resolving the issues I would recommend you make a dropController emulator. Bread baords are ideal for this. This is simply an Arduino with LEDs (with suitable resistors) on all the pins used by the dropController. Do not add the optocouplers and TIP120s. This will make testing a lot easier.
RE the valves opening.
You need to check where the power is coming from and if the Arduino pin is HIGH or LOW. If the Arduino pin is low then you have a wrong connection somewhere.
Do you have the valves connected correctly? Do you have the wires the right way around?
Have you tested the valves by connection directly to a power supply?
Are the TIP120s connected correctly?
2016-08-25 at 21:20 #1384EvertGuest
I also figured that the Arduino was getting power from the USB. Just like you said. So I checked once more whether all connections were good. And apparently the GND wire of the Arduino was not connected, at all!!
You wouldn’t believe how silly I feel at this moment!! But on the other hand I am so incredible relieved!!
Now everything works like a charm. I am now only waiting for the camera trigger cable, and I should be able to start shooting.
And in the meanwhile I can install everything neatly in a project box which arrived last week. And assemble a rig.
Thanks a million for sharing your project and for being so kind and patience to give me some help when I was stuck! It’s really appreciated.