Showing posts with label Demo Video. Show all posts
Showing posts with label Demo Video. Show all posts

2017/05/12

A remote controlled AC power switch with visual monitoring capability

As a 3D printing and electronics hobbyist, I recently developed a device to help me remotely monitor my print and cut off power to my printer in case it starts making spaghetti.

Different Flavors of 3D Printed Spaghetti

Spaghetti Making Videos:
https://youtu.be/YS6gH66_7yE
https://youtu.be/87gsL-Luvis

2016/07/01

How to use 555 to make a full range dimmer / speed controller

This is a quick summary of how to make a dimmer using 555. The 555 Timer IC used is NE555P from TI.




Design-1

The design below has a minimum of 50% duty cycle and maximum of 100% duty cycle. It's capable of making the attached device performing at its peak (100% duty cycle, but it's unable to turn off the device completely (the device will still operate at 50% of its peak performance even when the potentiometer is turned all the way to the end).


Design-2

The design below can do 0 ~ 100% duty cycle.


For a chip that was designed back in 1970 ~ 1971 (I was around 1-year old at that time), this is truly an amazing chip. I salute you Hans R. Camenzind.

Put the circuit to work

Below are the videos showing the waveform and the running of the motor. One of the motor has 0.1uF capacitor across the positive and the negative terminal of the motor, and the other one doesn't.

DC 12V Brush Gear Motor PWM Speed Control - w. 0.1uF Cap.



DC 12V Brush Gear Motor PWM Speed Control - w/o 0.1uF Cap.


Note,

When the above design is used to drive motor via MOSFET, it's better to have the PWM frequency in the range of 10KHz (C TRI = 1nF), than 1KHz (C TRI = 10nF). See below scope screen shot for the difference.

The 1KHz operating range is within human audible frequency range. The noise may be annoy to some people.


References

LEDs, 555s, PWM, Flashers, and Light Chasers Index <-- Very good. Must read!!
http://forum.allaboutcircuits.com/blog/leds-555s-pwm-flashers-and-light-chasers-index.378/

Full range PWM (555)
http://forum.allaboutcircuits.com/threads/full-range-pwm-555.31324/

**555 on 24v Circuit**
http://www.555-timer-circuits.com/555-on-24v.html

**LM317 / LM338 Voltage Calculator** <- Very Useful!!
http://www.reuk.co.uk/LM317-Voltage-Calculator.htm

Simplest Method to Make a Motor Turn Off, Turn On, Go Forwards, and Go Backwards
http://www.robotroom.com/DPDT-Bidirectional-Motor-Switch.html

H Bridge Motor Speed Controller Tutorial
https://www.youtube.com/watch?v=iYafyPZ15g8

2016/06/21

Interfacing a RC transmitter with a computer

This post is about how to interface a RC transmitter for plane / boat / car with a computer. The purpose of doing so is to use the RC transmitter to control the games / simulators running on the interfaced computer. For this post, I will be using DEVO 7E and RX601, but this post is applicable to any RC transmitter and receiver pair that works with Servo motor similar to the one shown below.

DEVO 7E Transmitter and RX601 Receiver
3-wire Servo 

How it works?

An Arduino Uno board is used to take in the PWM signals from the PWM outputs of the receiver. The PWM signals are then processed by the software running on the Arduino Uno board to come out with the control signals to be fed to the computer connected to the Arduino Uno board via a USB cable. The computer treats the input signals as from a connected joystick and the signals are used to control the games / simulators running on the computer.

The PWM waveforms

Before a program can be made to process the PWM signals, we need to know how they look. The photo below shows the division of the channels on the RX601 receiver.

The waveform of the PWM output of each channel on the receiver are shown below.










Code

#include "UnoJoy.h"

int tmp;
unsigned long time_now;

void setup(){

  setupPins();
  setupUnoJoy();
}

void loop(){
  // Always be getting fresh data

  dataForController_t controllerData = getControllerData();
  setControllerData(controllerData);
}

void setupPins(void){
  // Set all the digital pins as inputs
  // with the pull-up enabled, except for the
  // two serial line pins

  for (int i = 2; i <= 12; i++){
    pinMode(i, INPUT);
    digitalWrite(i, HIGH);
  }
  pinMode(A4, INPUT);
  digitalWrite(A4, HIGH);
  pinMode(A5, INPUT);
  digitalWrite(A5, HIGH);

  // RX601 Receiver CH1 Input,
  pinMode(A0, INPUT);
 
}

dataForController_t getControllerData(void){

  //  Set up a place for our controller data
  //  Use the getBlankDataForController() function, since
  //  just declaring a fresh dataForController_t tends
  //  to get you one filled with junk from other, random
  //  values that were in those memory locations before

  dataForController_t controllerData = getBlankDataForController();

  //  Since our buttons are all held high and
  //  pulled low when pressed, we use the "!"
  //  operator to invert the readings from the pins
  //  The section below is not used in our application.
  //---------------------------------------------------------------
  controllerData.triangleOn = !digitalRead(2);
  controllerData.circleOn = !digitalRead(3);
  controllerData.squareOn = !digitalRead(4);
  controllerData.crossOn = !digitalRead(5);
  controllerData.dpadUpOn = !digitalRead(6);
  controllerData.dpadDownOn = !digitalRead(7);
  controllerData.dpadLeftOn = !digitalRead(8);
  controllerData.dpadRightOn = !digitalRead(9);
  controllerData.l1On = !digitalRead(10);
  controllerData.r1On = !digitalRead(11);
  controllerData.selectOn = !digitalRead(12);
  controllerData.startOn = !digitalRead(A4);
  controllerData.homeOn = !digitalRead(A5);
  //--------------------------------------------------------------

  // Get the input from CH1 of RX601

  while (digitalRead(A0) == LOW) {}
  time_now = micros();
  while (digitalRead(A0) == HIGH) {}
  tmp = micros() - time_now;
  controllerData.leftStickX = tmp >> 2;
  //Serial.println(tmp);

  while (digitalRead(A1) == LOW) {}
  time_now = micros();
  while (digitalRead(A1) == HIGH) {}
  tmp = micros() - time_now;
  controllerData.leftStickY = tmp >> 2;
  //Serial.println(tmp);

  while (digitalRead(A2) == LOW) {}
  time_now = micros();
  while (digitalRead(A2) == HIGH) {}
  tmp = micros() - time_now;
  controllerData.rightStickX = tmp >> 2;
  //Serial.println(tmp);

  while (digitalRead(A3) == LOW) {}
  time_now = micros();
  while (digitalRead(A3) == HIGH) {}
  tmp = micros() - time_now;
  controllerData.rightStickY = tmp >> 2;
  //Serial.println(tmp);

  // And return the data!
  return controllerData;
}

Demo Video

Click here to play the demo video on Youtube.


For more about how to prepare Arduino Uno for the above application, please refer to the posts mentioned in the reference section below.

References

How to use Unojoy with Arduino Uno

How to turn Arduino Uno into HID Keyboard - Part 2 of 2

How to turn Arduino Uno into HID Keyboard - Part 1 of 2
http://wei48221.blogspot.tw/2016/06/arduino-uno-hid-keyboard-joystick-part.html

---------------------------------------------------------------------------------------------------------------------

Buying Info.

I've prepared a kit that contains one Arduino Uno board pre-configured and pre-loaded with the necessary software and accessories (see below photos for the included items). Please e-mail me if you want to order or have any questions.

Price: US$30 per kit;
Shipping: Free shipping for order over US$50 to most major countries (please contact me to see if free shipping is applicable to your location);
Tax and tariffs: To be paid by the buyer;
Item location: Taipei, Taiwan;
Items included:
- 1 x Arduino Uno board;
- 1 x USB cable;
- 6 x Jumping wires with connectors.


The photo below shows how to connect the RX601 with the Arduino Uno board.



2016/06/07

What can be done with a DIY 3D Printer?

This post contains photos and brief descriptions of the things that I made with my DIY 3D printers (see below photo for reference). More will be added as I make more stuff with them.


DIY 30cm x 30cm x 30cm Prusa i3 3D Printer


The cap of blender cover

The 2 latches of the cap of my blander cover were broken, so I drew a new one and printed it out using a white flexible filament. It's a perfect match and my wife is happy.. :-)


Spheres for parachute

I saw an interesting video on Youtube (https://www.youtube.com/watch?v=sdF1lcoNt1Y) that teaches the making of throw-able parachute. As I don't have access to the ball used in the video, I drew 2 types of spheres (smaller one with holes, bigger one without hole) and use used plastic bag (left), and PVC cloth (right) to make the parachute.


The gears and wheels of DIY camera trolley

I use flexible filament for the wheel and PETG for the gears of the camera trolley that I built. This trolley is capable moving back and forth and rotating the camera at the same time or separately. The trolley is controller by Arduino plus my custom-made motor driver board..


Docking station enclosure

This is an enclosure that I made for a friend to fit different connectors. Because the size of this enclosure cannot fit into the printing envelop of my DIY 20cm x 20cm x 20cm printer, I built a 30cm x 30cm x 30cm Prusa i3 style printer to print it.


The funnel base for the DIY extruder for making 3D printing filament

Click here for the time lapse video of the printing process.



Where to buy?

3D Printer - 30 - Free Shipping
http://wei48221.blogspot.tw/p/products.html#!/3D-Printer-30-Free-Shipping/p/62075835/category=17963923

--------------------------------------------------------------------------------------------------------------------------

Other People's Projects

Building an Enclosure using SketchUp and 3D Printing
http://bikerglen.com/blog/building-an-enclosure-using-sketchup-and-3d-printing/