Tuesday, December 3, 2013

Roomba Bluetooth Interface


After discovering issues attempting to power my wireless router off the roomba, I decided to build a simple bluetooth interface similar to the roototh interface from sparkfun.

Since I have this weird unmutable DIY motivation; I decided to build my own interface.

The interface is pretty simple; a standard Bluetooth module; some level conversion and power supply.

Design Goals:

  • Low Cost
  • Low Profile (so it doesn't get caught on things)
  • Configurable Baud Rate (as to work with any roomba)
  • Configurable Bluetooth name (So it will show up as "Roomba" when scanning)


Parts:


QTY    Description       Manufacturer    Part Number
1      Roomba Connector  Kycon           
KMDLAX-7P
1      Bluetooth Module  CSR             BlueCore4
1      PCB               Me              Roomba-01
1      3.3V Regulator    TI              LP2950-33
1      0.1uF Capacitor   -               -
1      10uF Pol. Cap.    -               -

I bought a cheap CSR bluetooth module from dx.com; they're about $7 each including shipping

For the connector I hacked a 7 pin mini-din I ordered from digikey; it worked pretty well.:
7-pin Mini DIN connector $3.04

Interface PCB came in aroudn $1 each (since I ordered 10)


Details:

https://github.com/scottjgibson/rootooth-low-profile

Circuit Board:



Schematic:



Pictures:

 


Encapsulating:

To finish the devices I encapsulated them in Plasti-Dip; its awesome stuff and provides good protection to the circuitry.

Friday, October 25, 2013

$12 LED photography lights

Intro:

I needed dimmable photography lights for a photo booth project I'm building for a friends wedding.  Pre-built lights are quite expensive so I decided to build my own.  I based the design on white LED strips which can be purchased quite economically when purchasing directly from Chinese distributors (Like aliexpress.com)


The LEDs:

I went with the largest and densest LED strips I could find.  The LED strips come in 5 meter lengths; I found for $12 (inlcuding shipping) I could get a 5M LED strip with 600 LEDs.  The leds are the 5050 size which is the largest commonly available on LED strips.  The 5M of LEDs draw 72W.

Building the Panel:

I build a quick panel out of some white hardboard and pine trim I had around from home renovation work.  I sized the panel to fit 10 50cm lengths of LEDs.  This made a nice ~60cm x 20cm panel


Wiring:

The strip is directly powered off of a 12V source (I used an old ATX computer power supply).  Each segment of the strip was wired to a 18 gauge power supply wire.  From here it can be connected directly to 12V or via a control circuit as I have done.


Control:

The photo booth I'm building runs on a raspberry pi embedded computer.  Attached to the raspberry pi is a PCA8685 I2C PWM driver.  Adafruit sells a nice breakout (http://www.adafruit.com/products/815) board to make wiring it up easy.  This way the photobooth control software can simply set the desired PWM duty cycle and be done with it.  The PWM output of the PCA8685 is connected to a mosfet which switches the LEDs on and off at the right duty cycle to set the brightness. 


Mosfet Dimmer Board:

I designed a simple four channel low-side mosfet switch board for connecting the LEDs (and other DC things) which needed control from the raspberry pi.  The hardware design is open source and can be found here: https://github.com/scottjgibson/4ch_mosfet_switch



Demo Video

Thursday, August 1, 2013

Ultra Geek Dad

I created a separate blog for the projects I do with the kids.  Check it out here: www.ultrageekdad.com

Wednesday, June 26, 2013

CNC Machine Progress

Its been quite a while since I added information about my CNC machine, I've made a few videos describing the machine.


First run of the CNC Y axis (gantry):


Here is my first video after getting the three axis together:


First time running with a router:

A bit more progress on the machine

Monday, June 24, 2013

Car Battery Recovery (Desulfation)


I had recently replaced a failed car batter in my older BMW (10 years old).  The battery was only 5 years old but it had failed none the less.  Before replacing the battery it wasn't able to light the dome lights let alone start the car.

In the interest of "science" :) I decided to try to recover the battery.  First I attached it to a typical 12V battery charger.  I left it connected for a long time but the battery would not take a charge (the current meter of the charger showed 0 Amps). I plan on using the battery in my camping trailing to operate the lights and charge our cell phones and that sort of thing, so if I can get the battery in some sort of working order it will be useful to me.

My back of the envelope calculations estimate the average car battery should have an internal resistance in the order of 0.02ohms; my initial measurement (using a 1.3 ohm high power resistor as a test load) showed an internal resistance of over 30 ohms.

Reasons Car Batteries Fail:

Some online reseach indicated that often the reason for non working lead acid battery is sulfation (lead sulfate crystal build up on the battery plates).  It is especially a problem if the battery gets deeply discharged; or isn't brought up to full charge regularly.  This was likely the case with my battery.  The car wasn't winter driven before I bought it so it is likely it sat discharged.  Also I have a very short commute; so in the winter I start the car; run the defrosters, seat heaters and blower motor for a short time (7 minutes to work) then do it again on the way home.  

Battery Desulfators:

There are lots of conflicting reports on battery desufators, I figured I would give it a try and puchased a cheap battery desulfator off aliexpress.com; as far as I know most battery desulfators use the same principle; pulse a high voltage high frequency across the battery to dissolve the sufates back into the electrolyte.

I bought this one (I'm not affiated with the brand or seller)

its a "Clen" brand; pretty much the cheapest available.  It makes a fair amount of buzzing I assume from the DC-DC converter inside.  The device specifies a pulse frequency of 10kHz with a peak voltage amplitude between 60 and 100V. It works with 12V to 48V batteries so I'm assuming that is the reasoning for a range of peak amplitues.


Testing Procedure:
I followed the following procedure when checking the progress.
(1) Disconnect the charger and desuphator
(2) Attach a 1.3 Ohm resistor to get about a 10 Amp load on the battery.
(3) Measure the voltage with the load attached (V_load - voltage under load
(4) Disconnect the load and check the voltage again (V_oc (voltage open circuit)
(5) Calculate the internal resistance of the battery:
(i) V_drop = V_oc - V_load
(ii) I _load = V_load * R_load (1.3)
(iii) R_battery = V_drop / I_load

The Results:
I took some initial measurement of the battery after it had been sitting for about a month and things didn't look good:
No Load Voltage (V_oc): 6.5V 
Voltage with 1.3ohm load (V_load): 240mV
Current with load attached (I_load):  185mA
Estimated internal resistance (R_battery): (6.5-.24)/(.185) = 34 ohms

So the battery wasn't taking a charge (likely due to the high internal resistance).  The high internal resistance is a sign of sulfate buildup on the plates which minimize the plates effective area.

So I hooked up my $25 desulfator (pulse conditioner) and let it run.  I did the above measurement criteria quite often (as indicated on the graphs)




As you can see in the above plot the desulphator worked quite well for my battery.  Within 24 hours the batteries internal resistance was within the right order of magnitude (yay)!  Within about 4 days the battery was pretty close to as good as it was going to get.

Testing Retrospective:

  • I should have measured the resistance of the load after each measurement; as the resistor heats up the resistance can change significantly.
  • I should have had a set amount of time of applying the load, as voltages varied depending on how long the load was applied.

Final Capacity Test:
So it was great to see the battery's interal resistance returned to normal but how about the overall battery capacity?  This battery specifications indicate an initial capacity of 80AH; some research showed this is measured by applying a load until the battery voltage reaches 10.5V.  There are many unknown variables (temperature; load current, etc); but I figured I would wing it and atleast get an estimate of the battery capacity mostly to get an idea if the battery will be usable to me or not.

This is a little tricky to do manually; so I decided to use an microcontroller (an Arduino in this case) to take the measurements periodically.

I just hacked something together quick; it measures the voltage and the current (using a 1 ohm shunt resistor) every 30 seconds and if the voltage falls below 10.5V disconnect the battery (using a relay).

I used a load which would give me around a 3A draw (a 4 ohm dummy load used for audio amplifier testing).  If the capacity is near 80AH I would expect my test to take at most 26 hours. 

So twice per minute I log the current and voltage; and calculate the energy drawn in the 30 second period (1/120 * A); to calculate the total capacity used I simply summed up all the measurements.

https://github.com/scottjgibson/CarBatteryTester

Capacity Results
 - In Progress