Here is final presentation Slide for my smart fishing float and rod base project.
Here are final presentation videos.
My original idea want to make a device to help people to memory or remind they where are there things.
There are memory loss with elderly people. They had forgotten their glasses where is it and could not read the newspaper.
They forgot to turn off the power for stove after cooking. Blablabla......
I want to make a knob.
It can connect your phone and to set mode which you want to remind you and how long you want to use it.
This is my original idea.
Last month my friends and me go to fishing, I decided another topic about my final project.
I observed most of people could not to set a hook on the perfect timing. So lots of people loosing the chance to caught the fish.
Another reason is, we have to keep our eyes fixed on the fishing float or rod all the time. It is very tired.
The purpose of project is to help people to set a hook on the right time.
I used Fusion360 to design fishing float.
I have done planning at week17 in the final project.
Its very hard to combine it and hard to print so I redesign structure of float.
After for long time to printout and combine it.
Then used Fusion360 to design fishing rod holder.
After for long time to printout.
I used Fusion360 to design fishing rod base platform for milling.
Looks great! After milling.
Put foam and pole to simulate putting fishing rod.
To design fishing sinker with molding and casting(week12).
To protect all of board, I used hot glue to protect them.
Then start to write program for software. I put ADXL345、RF433MHz transmitter、Battery、LEDs and Satsha kit into fishing float.
When the fish bite bait, the acceleration of gravity can be observed by ADXL345 then LED color will turn RED from Blue and send a signal to rod base via RF433MHz.
There are RF433MHz receiver、Battery、LEDs、Buzzer and Satsha kit on the rod base platform.
When the rod base received a signal from float the rod base LED color also change color to RED and can hear buzzer.
That is important news to info you that it is the perfect timing to set a hook.
Making Satsha kit and testing input device at week11.
Testing output device at week13. Testing communication at week15.
I received Z-axis value from ADXL345 every second.
So I used the difference between two value(this time and last time) larger threshold value then send a signal to rod base.
Trial and error is a fundamental method of solving problems or finding threshold.
Finally I used 50 to judge fish bite the bait. It is very specific but not very sensitive.
Programming in transmitter:
#include#include #define DEVICE (0x53) #define TO_READ (6) byte buff[TO_READ] ; char str[512]; int regAddress = 0x32; int x, y, z; double roll = 0.00, pitch = 0.00; int led1_R=2; int led1_G=3; int led1_B=4; int led2_R=5; int led2_G=6; int led2_B=7; int led3_R=8; int led3_G=10; int led3_B=9; int temp = 0; int difference_temp=0; int duration = 50; void setup() { vw_setup(2000); vw_set_tx_pin(12); Wire.begin(); Serial.begin(9600); writeTo(DEVICE, 0x2D, 0); writeTo(DEVICE, 0x2D, 16); writeTo(DEVICE, 0x2D, 8); pinMode(led1_R,OUTPUT); pinMode(led1_G,OUTPUT); pinMode(led1_B,OUTPUT); pinMode(led2_R,OUTPUT); pinMode(led2_G,OUTPUT); pinMode(led2_B,OUTPUT); pinMode(led3_R,OUTPUT); pinMode(led3_G,OUTPUT); pinMode(led3_B,OUTPUT); } void loop() { readFrom(DEVICE, regAddress, TO_READ, buff); x = (((int)buff[1]) << 8) | buff[0]; y = (((int)buff[3])<< 8) | buff[2]; z = (((int)buff[5]) << 8) | buff[4]; Serial.print("The acceleration info of x, y, z are:"); sprintf(str, "%d %d %d", x, y, z); Serial.print(str); Serial.write(10); RP_calculate(); Serial.print("Roll:"); Serial.println( roll ); Serial.print("Pitch:"); Serial.println( pitch ); Serial.println(""); delay(500); int difference = z -temp; int differ_result = abs(difference_temp)-abs(difference); if(difference>50 || difference<-50 && differ_result >30 ){ Serial.print(difference);Serial.println("difference"); Serial.print(abs(difference_temp)-abs(difference));Serial.println("befiore"); send("A"); //"send" function for sending data temp = z; difference_temp = difference; delay(300); digitalWrite(led1_R,HIGH); digitalWrite(led2_R,HIGH); digitalWrite(led3_R,HIGH); digitalWrite(led1_B,LOW); digitalWrite(led2_B,LOW); digitalWrite(led3_B,LOW); for (int thisNote = 0; thisNote < 20; thisNote++) { //for sync with rod base tone(11, 1047, duration); delay(1000); Serial.println("RED Light"); } } else if(difference<50 || difference>-50 && differ_result <30){ difference_temp = difference; Serial.print(difference);Serial.println("difference"); Serial.print(abs(difference_temp)-abs(difference));Serial.println("befiore"); send("B"); //"send" function for sending data temp = z; delay(300); digitalWrite(led1_R,LOW); digitalWrite(led2_R,LOW); digitalWrite(led3_R,LOW); digitalWrite(led1_B,HIGH); digitalWrite(led2_B,HIGH); digitalWrite(led3_B,HIGH); Serial.println("BLUE Light"); } } void send (char *message) { vw_send((uint8_t *)message, strlen(message)); vw_wait_tx(); } void writeTo(int device, byte address, byte val) { Wire.beginTransmission(device); Wire.write(address); Wire.write(val); Wire.endTransmission(); } void readFrom(int device, byte address, int num, byte buff[]) { Wire.beginTransmission(device); Wire.write(address); Wire.endTransmission(); Wire.beginTransmission(device); Wire.requestFrom(device, num); int i = 0; while(Wire.available()) { buff[i] = Wire.read(); i++; } Wire.endTransmission(); } void RP_calculate(){ double x_Buff = float(x); double y_Buff = float(y); double z_Buff = float(z); roll = atan2(y_Buff , z_Buff) * 57.3; pitch = atan2((- x_Buff) , sqrt(y_Buff * y_Buff + z_Buff * z_Buff)) * 57.3; }
Programming in receiver:
#includebyte message[VW_MAX_MESSAGE_LEN]; byte messageLength = VW_MAX_MESSAGE_LEN; int led1_R=2; int led1_G=3; int led1_B=4; int led2_R=5; int led2_G=6; int led2_B=7; int led3_R=8; int led3_G=9; int led3_B=10; boolean stateLed1=false; boolean stateLed2=false; int melody[] = { 784, 659, 659, 698, 587, 587, 523, 587, 659, 698, 784, 784, 784, 784, 659, 659, 698, 587, 587, 523, 659, 784, 784, 659, 587,587,587,587,587, 659, 698, 659,659,659,659,659,698, 784, 784, 659, 659, 698, 587, 587, 523,659,784,784, 523 }; int duration = 50; void setup() { Serial.begin(9600); vw_set_rx_pin(12); vw_setup(2000); vw_rx_start(); pinMode(11,OUTPUT); pinMode(led1_R,OUTPUT); pinMode(led1_G,OUTPUT); pinMode(led1_B,OUTPUT); pinMode(led2_R,OUTPUT); pinMode(led2_G,OUTPUT); pinMode(led2_B,OUTPUT); pinMode(led3_R,OUTPUT); pinMode(led3_G,OUTPUT); pinMode(led3_B,OUTPUT); } void loop() { if (vw_get_message(message, &messageLength)) { Serial.print("Received: "); for (int i = 0; i < messageLength; i++) { Serial.write(message[i]); if(message[i]=='A'){ Serial.write("receive"); digitalWrite(led1_R,HIGH); digitalWrite(led2_R,HIGH); digitalWrite(led3_R,HIGH); digitalWrite(led1_B,LOW); digitalWrite(led2_B,LOW); digitalWrite(led3_B,LOW); for (int thisNote = 0; thisNote < 20; thisNote++) { tone(11, 1047, duration); delay(1000); } } if(message[i]=='B'){ digitalWrite(led1_R,LOW); digitalWrite(led2_R,LOW); digitalWrite(led3_R,LOW); digitalWrite(led1_B,HIGH); digitalWrite(led2_B,HIGH); digitalWrite(led3_B,HIGH); } } Serial.println(); } }
Communication with float and rod base platform.
After software testing, then all components in assembly.
Here are some testing about trial and error for threshold videos.
when the ADXL345 detect acceleration then send a signal to rod base and chanhge LED color from Blue to Red.
This is my final project for fabacademy2016. Will add mobile Apps for this devices in the future.
You can seeing fishing float situation on the mobile immediately.
Add log feature to record how many fishes you catch every month or every week.
My Project - Smart Fishing Float and Fishing Rod Base was released under the MIT license.
The MIT License (MIT)Copyright (c) <2016> <by Tai, Bruce Chang-Jung>
PPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.