Friday, October 14, 2016

Mail

A simple email notification sent by Cayenne and triggered by a PIR motion sensor3 (connected to a Node MCU ESP82665) powered by a USB power bank.


Paste the device token into the Arduino code.
Add your SSID and Password to the Arduino code as well.
And upload to the Node MCU ESP82665 .
#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space

#include <CayenneDefines.h>
#include <BlynkSimpleEsp8266.h>
#include <CayenneWifiClient.h>
#include <Arduino.h>
#include <SoftwareSerial.h>



// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "";
char ssid[] = "";
char password[] = "";

// Virtual Pin of the Digital Motion Sensor widget.
#define VIRTUAL_PIN V1

// Digital pin the motion sensor is connected to. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
int motionSensorPin = 4;

void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token, ssid, password);
 
}

void loop()
{
  Cayenne.run();
  checkSensor(); 
}


int previousState = -1;
int currentState = -1;
unsigned long previousMillis = 0;

void checkSensor()
{
  unsigned long currentMillis = millis();
  // Check sensor data every 250 milliseconds
  if (currentMillis - previousMillis >= 250) {
    // Check the sensor state and send data when it changes.
    currentState = digitalRead(motionSensorPin);
    if (currentState != previousState) {
      Cayenne.virtualWrite(VIRTUAL_PIN, currentState);
      previousState = currentState;
    }
        previousMillis = currentMillis;
  }
}

Plug the Node MCU ESP82665 into your power bank.


Connect power and ground to your PIR motion sensor3 (depending on your sensor you may need to provide 5V from the power bank) and the signal out to Pin D2 of your Node MCU ESP82665 .


Add the digital motion sensor to Cayenne after the device connects.
Make sure to select your "Arduino"-(Node MCU ESP82665), Virtual Pin, and Pin V1.


Click the top right drop down and add a trigger.
Drag your ''Arduino"- (Node MCU ESP82665) to trigger and add your email to notify.


Place in your mailbox for the unsuspecting mailman.


Enjoy that feeling of knowing your package has arrived safely in your mailbox from anywhere in the world!
I would like to thank Cayenne for sponsoring this project and Chao @Electrodragon1 for some amazing and cheap parts (that I hope to arrive soon)!

"I get mail; therefore I am."
-Scott Adams


Thursday, September 22, 2016

The TErover | Custom Bamboo Deck | Hanger Trucks | Turnigy Aerodrive SK3 motor | Custom Mount | 8S | VESC

I haven't posted a project for quite some time and decided an electric skateboard was the way to go.

The Board

I first mixed up some epoxy: 
 The hardeners set time is around 2 hours which gives me plenty of time to make 3 boards.

Then I filled the grooves with it.
 A tongue and groove bamboo flooring was the perfect choice for a solid and appealing board.

I slotted the boards together.
 The process was repeated once again for a total of 3 bamboo floor boards per longboard deck.

Ratchet straps were used to put the joints under pressure. 
 Although the size of the straps might have been a bit overkill they did provide enough tension to put a slight curve in the "composite" board.

Mineral spirits saved the day!

The extra epoxy that oozed out was easily wiped off with paintbrush cleaner. 

For the layout of the board I used Adobe Illustrator:

At this point, I used 3M Super 77 spray adhesive to stick the template to the rough side of the board.
I first used a combination of a handsaw and a circular saw, but quickly realized those were not the right tools for the job. Thankfully the Touchberrys (my friend's parents) let me use their bandsaw and router until 11PM. 
 Top after being cut out and sanded.
Bottom after being cut out and sanded.

Power Train 

To mount the motor I used a piece of aircraft grade aluminum that was cut drilled and bent at home:
Marking holes for the motor mount and using a hacksaw to cut out the piece.
My largest drill bit was not quite big enough.
 So I used a drill rasp to make it larger.
 Large enough hole.
Mounting holes drilled.
This video:
and this one:
and this presentation (especially page 28):
and this forum thread: 
http://www.rcuniverse.com/forum/tips-techniques-180/265481-how-do-i-harden-k-s-soft-aluminum.html
are very useful if you are planning to bend your own motor mount.
To anneal (soften) the aluminum plate I first used a regular lighter to put a layer of soot on the aluminum to indicate temperature.
 I then used a blowtorch to heat the plate until the soot disappeared.
 I then bent the plate at a 90degree angle with both a homemade metal brake and regular hammer.
 I repeated the annealing process, but this time I quenched the aluminum on ice (heat treating).
I then put the mount in a toaster oven at 200 degrees for 1 hour for the precipitation process to occur (hardening aluminum is complicated). I used a thermocouple attached with Kapton tape to monitor the temperature more accurately.

On the wheel side, I used a timer pulley that I modified by knocking out one bearing.
 I then drilled and tapped holes on the pulley and screwed in M3 screws.
I also had to file down the truck so that the inside of the pulley did not scrub.
On the motor  side, I used an 8mm bore hole timing drive pulley and the collet provided with the motor.
 I drilled holes in the board for the mount.
(Drill from the clean face down if you don't wan the ugly chips seen here).
I then bolted on the mount.

Test run of the board:
I used this belt from eBay.
I am using this board from Walmart to test things out before mounting onto the bamboo board.


The problem with the current setup is that the belt slacks after use and then starts to skip teeth.
 In order to try and solve this, I tested different types of tensioning, but to no avail.
Back to the drawing board for the motor mount.

ESC

Building Benjamin Vedder's  VESC was a major challenge that I decided to take up. 

You need very fine tweezers in order to place SMD component's on a PCB.
It also really helps to use double sided tape to stick down the cut tapes and then mark the parts on the table with an expo marker.

Bamboo skewers are the perfect tool for dabbing solder paste on all the pads.

When (not if) you drop an SMD component, sweeping the area around you helps (unless you have carpet, in which case the static discharge probably killed it (or that's what you can tell yourself anyway) ).
Into the toaster oven at 170 degrees Celsius for 30 seconds.
Then Ramp the temperature to 225 as rapidly as possible and keep it there until the solder reflows.
Lower the door keeping the temperature high for around a minute and then allow the board to cool fully before taking out.

I had quite a few solder bridges, so I used solder wick to clean up the board.
"Whatever good things we build end up building us."
- Jim Rohn

Friday, February 20, 2015

On the topic of VTOLS [Updated 11/2/16]

My ultimate dream is to build what Elon Musk talks about here at around 2:16

What I have accomplished so far: https://www.rcgroups.com/forums/showthread.php?t=2553790

Present to future:
Current Manned drones:
The amount of innovation the RC world has sparked is unbelievable!
From [Boosted boards](http://boostedboards.com/) to [Movie Camera Gymbals]( http://www.dji.com/product/ronin) the effort of hobbyists is advancing "real world" technologies very rapidly.
I believe the hobbyists forums are where the best VTOL design will be developed for the future.
"When something is important enough, you do it even if the odds are not in your favor."
- Elon Musk

Monday, February 9, 2015

The Journey to FPV Part 3

For my last order from Hobbyking I used their new USA warehouse and I was amazed.
With $17 shipping the parts arrived in two days! Definitely not what I expected from Hobbyking.

 Since I already had the ESC I ordered only the essentials which included motor, servos, Skywalker, batteries, and props.
The batteries are super cheap and will go out of stock quick, so buy them up!


After the box showed up I got to work.
I glued the halves of the plane together after running the servo wires from the tail.
I used Guerrilla Glue, but Hot hot glue would have held the halves together better and dded some flexibility.
Great hot glue tips video:

I ran wires for the FPV equipment and chiseled out some of the back spar of the plane.

The prop an APC 11X5.5 doesn't have clearance from the motor to the fuse (my bad). The move shouldn't effect the core strength too much. 
Mounting servos is my least favorite part. I put on all the hardware in the back of the plane, but the wings were more difficult. The wing servos didn't have servo extenders, so I had to make some.
Anytime you pull out the soldering Iron, plan on spending lots of time soldering. After re-solderering cables twice (because the pairs were incorrect) I was able to mount the wing servos and glue in the wires.
I tested spray painting some EPP (the foam the plane is made out of) and it held up well. I used spray epoxy/enamel which can be found at Walmart. I tried dusting the plane with coats, but it was cold out and I knew the layers wouldn't dry in time so I just blasted the thing. Only a few spots were a bit to thick, otherwise I think the paint job looks great!


Video of the test flights:


 The plane was under powered and the elevator wasn't installed correctly. The hinge point between the control surface and rear horizontal stabilizer was incredibly stiff making the effective servo movement in the up elevator direction, near zero.
The last crash, seen at the end of the video, was hastily repaired and the nose was made much stronger (though uglier) with an apple juice bottle.

A better balanced prop helped with the noise of the plane and adjusting the throttles travel on the Transmitter from 30% to 100% helped just a bit with the power (no wonder the thing wasn't moving!). 
Going out alone for the second round of flying I recorded no video of the incident, but I will try and recount it. For the first toss I noticed that the plane wanted to only turn in circles. After about 4 times around I landed it. I adjusted the rudder hoping this would solve the issue. On the second toss things seemed a bit better, the plane climbed like a mountain goat! With the FPV goggles sitting on my head I decided to give it a go. My first FPV flight was not a total failure. As I slid down the goggles over my eyes I saw the trees, a pond, and the horizon from 500 feet up. The everything began turning upside down as hard as  tried I could not get the plane to level out, it just kept going in upside down circles. Then the signal failed and I snatched the goggles off only to see my plane floating down in three parts.
After searching for about ten minutes it began to rain. I went back the next day with a game plan and scanned vertically until I spotted the fuselage close to a swamp. One of the wing halves was near by, but the other I have still not found. After looking over the wreckage I have come to the conclusion that the wing spar which was gorilla glued in came out and the wing halves came lose.

 At the end of the video you could hear me say something, it was: "Dang it even popped the spar out!". So I did notice the problem I just didn't fix it in time. 
 
The journey will continue, but for now I will need a break. $1000+ already in the hobby sometimes makes you want to cry. I need a hobby that makes money...

"Starting a company is like eating glass and staring into the abyss." -- Elon Musk