Sprucing up my print bed

In preparation for installing a heated print bed and just to clean up from some previous mistakes, I cleaned up my print bed yesterday.  I sanded it with several different wet/dry sand papers, washed it with soap, applied a metal polish and then cleaned with acetone.  I only did this to the top since it is where the glass will lay and the bottom won’t be seen often anyway.  Having it so smooth will allow better heat transfer from my aluminum sub-bed to the glass on top.  The aluminum will be used to distribute the heat from the nichrome square wave pattern under it so that by the time it gets to the glass it won’t cause tension, cracking and shattering.  I’ve had enough of that already, thanks.  I was running a pared down clothes iron as a bed heat source before but that was dangerous, heavy, heated too unevenly, ugly, hard to control, had to be turned off manually and dangerous.  Safety is worth mentioning twice.  The plan now is to do from lowest layer up, a foam thermal barrier, nichrome square wave heat element secured with kapton tape, aluminum plate and thermistor, glass and then possibly some kapton to print on if I’m not getting good results from printing directly on the glass.

Car Unlock Project Update

I took a break from my 9 to 5 (see SquidTooth.com) this weekend and made some progress on my yet to be officially named car door unlocking with my phone project.  I got my phone talking to my Arduino via Bluetooth and my Arduino doin’ stuff based on that input.

I became aware of some limitations to the systems I was using that forced me to re-engineer my approach a couple times.  The BlueSMiRF Gold board I was using for the Arduino side of the Bluetooth connection doesn’t tell the Arduino when it’s connected.  Nifty that it just functions like a serial connection with no config required, though.  Well, thought I, I could just connect and send something over serial Bluetooth connection from my Android phone (HTC G2).  I went about trying to have a broadcast receiver run when the device’s screen was turned on so all I’d have to do is tap the power button on my phone.  That way I wouldn’t even have to remove it from my pocket.  The bad news is that Android doesn’t handle that broadcast the way one might think it would.  The Android Team decided that it would take measures to limit what apps would run at specific performance critical points of device usage, such as turning the device’s screen on.  There is a way to get code to run when the screen is turned on but it basically involves always running and telling Android that is what you’re waiting for.  Not ideal.  So, I adjusted my design again.

The idea now is to tap an icon on my screen that connects to the Bluetooth in my car which unlocks the door.  The Arduino will then send back confirmation that it was successful and the app will close and display success.  I got most of that working.  I seem to be having some issues with reading the message the Arduino sends back from withing the Android code and I’ve yet to actually do any door unlocking.  I still need to order those actuators and install this all in my ride.  One other thing I’m not certain about is connecting the Arduino Pro Mini I have directly to the car’s power.  A fully charged car battery can put out more than 12v which is the Pro Mini’s stated max voltage and then there’s also the issue of the voltage that the alternator supplies.  I may have to get a voltage regulator to go before my Arduino’s built in voltage regulator.  I’ll post stuff as I figure it out and code will be up as soon as I have a few more things finalized with it.

I hate keys

I don’t like having more in my pockets than I absolutely have to and I don’t like having to extract keys and sort through them each time I access my car.  I want my car to automatically unlock when I approach it.

This is a project I have been considering for a while but never started because my car had manual locks and I wasn’t going to install automatic locks on it when I didn’t intend to keep it for long.  It also only had two doors so unlocking everything wasn’t much of a hassle.  I now own a Jeep Cherokee which has four doors and unlocking all of them is a hassle.  In this case it is worth is for me to convert to automatic locks.  (Currently has manual locks.)

In order to have my car unlock as I want it to I will need:

  • Aftermarket automatic door locks installed
  • Arduino w/bluetooth aware of when paired phone is in range
  • Phone or other bluetooth host device
I already have an Arduino Pro Mini 5v, bluetooth serial adapter and phone with bluetooth.  I’ll just need to order that lock kit and slap it all together.  I’ll post updates on my progress.

Arduino Knight Rider KITT Lights

After I had the LEDs plugged into my breadboard for the watch project I’m working on I couldn’t help but make a quick sketch that flashes the lights like the light on KITT from Knight Rider.

 

The code is very simple.  First we just set up all of the pins we use as output pins:

void setup(){
//Set the pins we use as OUTPUT
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
}

The next and last thing we do is turn on and off the lights in sequence with a small delay in between each like so:

void loop(){
//Flash from the lower numberd pins to the higher numbered ones...
digitalWrite(3, HIGH);
delay(80);
digitalWrite(2, LOW);
delay(80);
digitalWrite(4, HIGH);
delay(80);
digitalWrite(3, LOW);
delay(80);
digitalWrite(5, HIGH);
delay(80);
digitalWrite(4, LOW);
delay(80);
digitalWrite(6, HIGH);
delay(80);
digitalWrite(5, LOW);
delay(80);
digitalWrite(7, HIGH);
delay(80);
digitalWrite(6, LOW);
delay(80);
digitalWrite(8, HIGH);
delay(80);
digitalWrite(7, LOW);
delay(80);
//and back the other way again
digitalWrite(7, HIGH);
delay(80);
digitalWrite(8, LOW);
delay(80);
digitalWrite(6, HIGH);
delay(80);
digitalWrite(7, LOW);
delay(80);
digitalWrite(5, HIGH);
delay(80);
digitalWrite(6, LOW);
delay(80);
digitalWrite(4, HIGH);
delay(80);
digitalWrite(5, LOW);
delay(80);
digitalWrite(3, HIGH);
delay(80);
digitalWrite(4, LOW);
delay(80);
digitalWrite(2, HIGH);
delay(80);
digitalWrite(3, LOW);
delay(80);
}

This could also be done much more efficiently would be much easier to change the number of and position of the lights or the speed the array blinks at just using the loop and incrementing the value of the pins being set high or low.  A while loop could even be used in the set up to make the pins all output pins and the highest and lowest value pins as well as the speed could all be defined at the top of the sketch.  Maybe I’ll code that up sometime and post it but as this sketch stands now it is really just a glorified Arduino “Hello World.”

Here is the source in a .zip folder: Knight Rider KITT Lights Arduino Sketch.