Sunday, August 6, 2017

Magic Mirror build

When I started on this project, I intended to have a tablet PC behind a 2 way mirror.  After mocking it up, I realized that it would be too small.

I just happened to have a 22" IPS display handy and the size was right, so I took the screen out of the plastic housing and measured that for a mirror and a frame.

I ordered the mirror from a place called TAP plastics.

I then cut pieces for a frame that would hold all the electronics and the mirror.

I used 1"x3" pine for the box that holds the screen and whatnot, and 1/2"x3" pine for the facings.
Cutting by hand is tough work.
Frame construction finished.  22.5" tall, 16" wide. 

I used glue and countersunk brads to hold the facings to the box.

The corners weren't perfect. 

So I filled them with sanding putty.




The Raspberry Pi 2 that runs the software for the magic mirror.  It's mounted on a 3d printed holder.  The blue, yellow and green wires at the top go to a thermal motion sensor, and tells the screen when to go in and out of low-power mode.  Also, if you look really close, you might see 2 air holes drilled into the box above the pi. There are more on the bottom of the box, for air circulation.
 Bit of a bodge for the power adapter.  Hot glue is fantastic stuff.
 All the parts installed. You can see the circuit board for the motion sensor at the top.  I got a 25 foot extension cord and cut the end off, splicing it into the power supply for the Pi, and a plug for the monitor.

It verks!  The software I went with is called Magic Mirror 2.  There many add-on modules.  Loads more have been added since I built this mirror, and add functions that will be interesting to play with.

Saturday, April 8, 2017

Here's how I built my Proof of Concept Spot welder.

I have had a couple of requests for more detail on my projects, so I'll try and fulfill that request.

This is my prototype spot welder.  I use it for welding battery tabs on 18650 cells.  

I started off with a transformer from a microwave oven.  With the help of my bench vise and a hack saw, I removed the secondary winding.  I replaced it with 3 turns of 2 gauge wire I got from the local welding supply.  The primary coil is connected through one of the relays on the side board.  

It's driven by an arduino nano.  I found that it didn't have enough oomph to drive the relay module by itself, so I had to run it through a MOSFET.  IT's an NPN something-or-other, I used what I had on hand.   
I have a foot pedal that I connect to the blue and yellow leads to the lower left.  This allows me to use both hands to hold the electrodes, and still actuate the machine.


Pin d5 is attached to a 10k pull-up resistor, and also to the foot switch.  When the foot switch is engaged, d5 goes to ground.  You can see that the yellow lead to the foot switch is connected to the ground rail.

d2 is the output that connects to the gate of the MOSFET (NPN), and also a 10k pull-down.  When the gate goes high, enough power is passed to the relay module to trigger it.
Eventually I'll move all the things to a proto board. 
So, when the pedal pin goes low (I step on it), it fires the output in a pre-programmed pattern.  Right now, I do 10ms on, 10ms off, 50ms on.  Read somewhere that a shorter burst followed by a regular sized one is better for penetration without overheating.
I dunno, but it seems to work better than just 60ms, especially when I'm going through 2 layers of tabbing strip
My device is also triggered to only fire one per press.  If you hold the pedal, it won't continuously trigger.  The pedal must be released before it will rearm.
For the next version, I want to connect an LCD and a rotary encoder, so the firing timings can be modified without having to re-upload code.  Also, I'll use a single relay board.  I used a 4 relay version because it was what I had on hand at the time.

Here's my code:


// Battery tab welder code.
// When the foot switch is activated (switchPin goes to ground), the relay will trigger for a pre-configured fire time.


const int switchPin = 5;
const int relayPin = 2;
//const int relayLED = 1;
int buttonState = 0;
int relayState = 0;

void setup() {
  // put your setup code here, to run once:

pinMode(switchPin, INPUT);
pinMode(relayPin, OUTPUT);
//pinMode(relayLED, OUTPUT);
digitalWrite(relayPin, LOW);
//digitalWrite(relayLED, LOW);

}

void loop() {
  // put your main code here, to run repeatedly:
buttonState = digitalRead(switchPin);
if ((buttonState == LOW) and (relayState == LOW)) {
  relayState = HIGH;//So the circut won't continually re-trigger if the switch is held.
  //digitalWrite(relayLED, HIGH);
  digitalWrite(relayPin, HIGH);
  delay(10);//initial fire
  digitalWrite(relayPin, LOW);
  delay(10);//inter-delay
  digitalWrite(relayPin, HIGH);
  delay(50);//Welding fire
  digitalWrite(relayPin, LOW);
if ((buttonState == HIGH) and (relayState == HIGH)) {
  relayState = LOW;//resets the state, so the machine can fire again.
  delay(50);
  //digitalWrite(relayLED, LOW);
    
}
}

Tuesday, February 7, 2017

Well, that was a short experience.

I took my drone over to my friend's house over the weekend, was showing off the drone.

Figured I would teach him how to fly and let him give it a go.  He's a pretty quick learner and had a ton of fun flying it around the yard.  After a quick stop to make sure that the camera was working fine, we swapped out the battery for one last flight.  I thought that maybe he should get a view of the sunset over the trees.

So, he flew up, and the wind caught it.  He tried to fight it, but it just disappeared over the woodland.

So, that's a drone, a battery, and an action cam with some probably good footage.  I spent the better part of an hour looking for it this afternoon where I thought it might have crashed, but no luck.

If you find it, please do the right thing.

The next one will have GPS hold - I promise.


---UPDATE---
Fast forward 3 days.  Just got a text from Kim, someone found it. It's been returned with 3 broken props, a cracked camera, and a scuffed battery.

Not too bad.

Thursday, February 2, 2017

Life has been full of adventure.

So, where to start?  I mentioned the motorcycle, here are a few pics.
That's it, in the drive.  Looks nice, but it's missing a few things that are required for my local inspection.  Like a horn, rear reflector, and a license plate lamp.

Pulled off the seat, and it appears someone was in here before.

Small rats nest of wires.




I spy, with my little eye, bare wires.

Yeah, that's bad.  It was under the fuel tank, which was removed because it was leaking. :(

So, that's the morotcycle.

I also got a new-to-me bicycle.  Trek 7100.  Appears to be a 2007.  I'm going to move all my touring kit to the new bike.  I"ll upload some pics when I'm done.

In addition to that, I've started playing with drones.  I got a cheap radio and a drone kit, then started working on a home-built 3d printed version.

Here's a few pics of that:



I also build a magic mirror for Kim.  I'll put a few pics here, but have already had requests for proper instructions, so I will make a separate post with that.


Cheers!