Wednesday, March 28, 2018

Gohst.Host (an IoT Relay)

The ESP8266 is a wonder of a chip!
After talking with Chinese suppliers to negotiated down to 1.5 USD per ESP 12F module, the cost to build an internet-connected relay is nearly within the sub $2 paradigm.


  • A 10A 110-220V Songle brand 5 pin relay costs .17-.18 USD (after negotiation)
  • A AC 95-220V to AC 5-25V constant current LED driver can be purchased for .35 USD (after negotiation)
  • A suitable capacitor to smooth the AC output is 0.01-.05 USD (Caps are tricky business)
  • A liner voltage regulator to step the smoothed AC (now DC) down to clean 3.3V (for the ESP) is .01-.03 USD
1.5 (still trying to get lower)+.17+.35+.02+.02= 2.06 USD!!! to build a Gohst.Host

While this is the price at 1000pcs the total could come down to as low as 1.5 USD with higher volume and a dedicated PCB.

Here is the original Gohst.Host prototype:


Here is the Gohst.Host V2:


(While the Gohst.Host V2 is not wired correctly in the above picture, the form factor will be the same;)

For industrial versions the Gohst.Host could be potted (with thermally conductive potting mixture) and the relay could be swapped for a 10-25-30-45-50-100A or Variable speed module

The sensing capabilities are endless.
Any sensor compatible with the Arduino is usable with the Gohst.Host.

Future improvements to the Gohst.Host include an optoisolator between the ESP 12F and the relay and a low cost ac-dc 5v buck converter integrated design (possible integrated triac design also on the way;).

Shoot for the Stars and you will Land on Mars!- Bp

Sunday, February 18, 2018

Journey to FPV Part 4

This beauty is still lost in the woods even after searching for a total of 36 hours.

Part 5 is going to be good!

Our virtues and our failings are inseparable, like force and matter. When they separate, man is no more.” – Nikola Tesla

Friday, October 28, 2016

Massive Air Force or MAF

Two carbon fiber 21x5.5 propellers on a Multistar Elite:
First, the boards started moving, but I later decided to stake the board down.
Ramp up to 2/3 of maximum power.
@240FPS
Hopefully, I can tame this beast and convert it into a non-traditional fan.

“What I've learned from running is that the time to push hard is when you're hurting like crazy and you want to give up. Success is often just around the corner.” 
― James Dyson

Tuesday, October 18, 2016

Coffee

A Keurig coffee maker controlled by an ESP 8266 , Cayenne myDevices, Arduino Pro Mini and a stepper motor with driver.
In essence, a hot cup of coffee made at 7:00 each morning.


Follow my Mail tutorial for info on setting up Cayenne and use this code on the ESP 8266:

#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[] = ""; //device code
char ssid[] = ""; //your ssid
char password[] = ""; // network password
void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token, ssid, password);
}
void loop()
{
  Cayenne.run(); 
}
This code needs to go into your Arduino

#define IN1  5
#define IN2  6
#define IN3  10
#define IN4  11
int Steps = 0;
boolean Direction = true;// gre
unsigned long last_time;
unsigned long currentMillis ;
int steps_left=4095;
long time;
const byte IOTpressed = 1;
// Interrupt Service Routine (ISR)
void switchPressed ()
{
 if (IOTpressed==HIGH){
    while(steps_left>0){
  currentMillis = micros();
  if(currentMillis-last_time>=1000){
  press(1); 
  time=time+micros()-last_time;
  last_time=micros();
  steps_left--;
   }
  }
  Direction=!Direction;
  steps_left=4095;
}
else {
 IOTpressed==LOW;
 }
}
void setup ()
{
  pinMode(IN1, OUTPUT); 
  pinMode(IN2, OUTPUT); 
   pinMode(IN3, OUTPUT); 
    pinMode(IN4, OUTPUT); 
 pinMode(IOTpressed, INPUT);
  attachInterrupt (0, switchPressed, CHANGE);  // attach interrupt handler
}  // end of setup
void loop ()
{
  // loop doing nothing 
} 
void press(int xw){
  for (int x=0;x<xw;x++){
switch(Steps){
   case 0:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, HIGH);
   break; 
   case 1:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, HIGH);
     digitalWrite(IN4, HIGH);
   break; 
   case 2:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, HIGH);
     digitalWrite(IN4, LOW);
   break; 
   case 3:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, HIGH);
     digitalWrite(IN3, HIGH);
     digitalWrite(IN4, LOW);
   break; 
   case 4:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, HIGH);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, LOW);
   break; 
   case 5:
     digitalWrite(IN1, HIGH); 
     digitalWrite(IN2, HIGH);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, LOW);
   break; 
     case 6:
     digitalWrite(IN1, HIGH); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, LOW);
   break; 
   case 7:
     digitalWrite(IN1, HIGH); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, HIGH);
   break; 
   default:
     digitalWrite(IN1, LOW); 
     digitalWrite(IN2, LOW);
     digitalWrite(IN3, LOW);
     digitalWrite(IN4, LOW);
   break; 
}
SetDirection();
}
} 
void SetDirection(){
if(Direction==1){ Steps++;}
if(Direction==0){ Steps--; }
if(Steps>7){Steps=0;}
if(Steps<0){Steps=7; }
}


Connect Pin D2 from the Node Mcu Esp8266 to Pin 2 on your Arduino.

Connect pins 5,6,10,11 to your stepper driver board.

Use self taping screws to attach your stepper motor.
Use super glue and a popsicle stick to extend the stepper motor shaft. (I used a piece of a broken propeller)


Inspiration: