Using the Microchip PIC Kit 1 with Linux

Microchip PICKit 1

The PICKit 1 is a combination programmer and development board for midrange PIC micro-controllers. In addition to being able to program FLASH pic devices, it also allows them to run and access 8 (charlieplexed) LED’s, a pushbutton switch, and a potentiometer. It’s a great little board for learning the basic of micrcontroller programing, but unfortunately it is not supported by Microchip’s new MPLAB X software (that is written in Java, and supports Linux/Mac in addition to Windows).

You CAN however use the PICKit 1 under linux. The piclab software is supposed to support it (I have not tested this). I use version 1.6 of the PicKit1 flash usb programmer for unix. Even the newest 1.6 version reports checksum errors after writing the hex file, but it does work correctly.

To make it work as an external program in MPLABX I had to select the “format HEX file for download” option under the Linker so that it would not fill all 2048 flash bytes when the program was smaller than that. I am able to manually run the usb_pickit command after building to flash the code, but it’s kind of annoying, as that program has a problem verifying the checksum and reports an error every time (which is interpreted as a build failure) plus, I have to run mplab X with root permissions to be able to access my USB port.

Ferrofluid Sculpture test 3 (a)

The main problem I had with my previous ferrofluid test was that the magnets would repel each other enough that I was not able to achieve a single, solid object. After (mostly) cleaning the ferrofluid off of my magnets, I carefully removed half of the magnets and a washer, replacing them with a bit of Sculpey that weighted exactly the same. I pushed half of the magnets into the Sculpey, and then used them to hold another 17 magnets “outside” of the main body. This spacing keeps them far enough apart that they do not repel each other, and the Sculpey fills in the areas between the magnets.

The Sculpey will probably lose some weight when it is baked, but I’m counting on the ferrofluid to allow me to adjust the weight of the hanging object suitably. I don’t want to test it with ferrofluid until after I bake the Sculpey and coat it with black spray paint. The punk potato has a magnet with a plastic cap on it, so I needed to determine the lowest possible temperature that will harden the Sculpey without demagnetizing the magnet or melting the plastic cap. (Currently, the “punk potato” is right at the lower weight limit for successful levitation.) As the lowest curie temperature I could find for common rare-earth magnets was 310 °C, the plastic (which I assume is ABS, with a melting point of 105 °C, (or 220 °F) is my limiting factor. I set the oven to 215 °F and wrapped some tinfoil around the plastic in an attempt to protect it.

When I showed it to my wife she closed one eye, tilted her head, and said “Weird”, so I know I’m getting close to the aesthetic I’m aiming for.

Solar Panels on the Electric Truck

Two 175 watt solar panels mounted to the bed cover of my electric pickup truck.
I purchased two used GE Energy GEPVc-175 watt solar panels and mounted them to the bedcover of my truck using 10-24 machine screws and T cone washers as rubber vibration dampers. Each panel weighs 31 pounds, and is rated to deliver up to 175 watts of power in full sun (at around 36 volts each, or 73.4 volts at 4.7 Amps in series). I am still waiting on a group of Georgia Tech ECE students for the magic box that does maximum power point tracking (MPPT) and voltage boosting to charge my 120 volt battery pack, but I hope to be generating 1-3 miles of my daily commute from the sun soon. As my daily commute is 4 miles, this can be a significant percentage of my total energy usage.
Diagram showing the panel layout over bed cover support structure.

I have calculated that in the summer the panels are far enough behind the cab that they will not be shadowed by it, even if I have to park facing south. In the winter and early spring / late autumn I need to park facing north to avoid shading a strip of the solar panels.
I still need to figure out a way to tilt the panels towards the sun to collect as much energy as possible. This is especially critical during winter, when the solar angle is way off of vertical. As the bed cover tilts, AND the bed of the truck can tilt (the other way) I figure I can work something out (with a few pieces of wood cut to the correct height, or linear actuators if I want to get fancy.

Ferrofluid Sculpture test 2

After buying some strong rare earth magnets I re-tried my ferrofluid levitating sculpture. The main problem is that the ferro-fluid moves to the poles of the magnets (top and bottom, with gravity favoring the bottom) and does not surround the sides of the magnets. It was also hard to get enough small magnets to fit under the main magnet (as they repel each other), so I had to include a screw in the middle to get the weight correct.

Note: Working with Ferro-fluid is dirty and messy. If magnets snap together they can throw dark oily fluid which stains just about anything. Be sure to have lots of paper towels on hand, jars/shields under/around everything, and don’t work in a nice room. Dish detergent and abrasive scrubbing will eventually get it off of most surfaces that are not porous. Wear disposable rubber gloves and use disposable pipettes. Wear disposable clothes. Don’t use any of your wife’s kitchen appliances or instruments that you can’t afford to replace.

Update: After floating under the magnetic levitation for 24 hours, the ferro-fluid became much less “spiky” and eventually the drops at the end of the magnets became spherical.

Also, cleaning ferrofluid from a magnet is almost impossible.

Controlling the Cricut Personal (desktop cutter) via Linux

Cricut personal cutter
I caught a deal on cricut.com where they were selling their original “Cricuit Personal Cutter” (refurbished) for $49.99 ($65 with shipping). This seemed like a very good deal to me, so I bought one. By itself, the Cricuit can cut specific shapes and letters from paper (it includes a free set of shapes/letters, and you can purchase cartridges to add more). I plan on using it to cut metal foil (one of the few things you can’t cut with a laser cutter, because it is reflective) and potentially make stencils. I may also be able to use it as a plotter using special attachments for pens. (Circuit board resist markers anyone?)

To make full use of it, I wanted to be able to cut arbitrary paths from my material, which means controlling the Cricut from my computer. Continue reading

Tracking individual battery voltages

Line graph that shows the voltage of six batteries dropping under load. All six batteries follow the same deep V pattern, staying within 0.1 volt of each other.

This graph shows the voltage (multiplied by 10, so 65=6.5 volts, and 50 = 5.0 volts) batteries 1-6 of my electric pickup while accelerating. My first battery (blue) is consistently 0.1 volt below the others, so I am keeping an eye on it. But this graph shows that although it is a 1/10th of a volt lower, it does not sink lower than the other batteries under load, so it appears to be holding up well so far.

The graph also shows off my new (to me) Pak Trakr system. The Pak Trakr system connects to each battery in your pack with small remotes that daisy chain together. Each remote monitors six batteries and transmits the voltage levels once a second to a display and optional serial data logger.


Ferrofluid Sculpture – test 1

Test 1 was not a failure. A Failure would have involved getting ferrofluid all over my clothes and/or workspace. However, I was not able to get enough ferrofluid to “stick” to the magnetic mount to get the weight up to the 74g needed for proper hovering action. Gravity pulled the ferrofluid down to the bottom of the screws and it started to drip off much too soon. It looks like I will have to augment the upper magnet with magnets on the lower parts to get the ferrofluid to surround the hovering part of the sculpture.

ferrofluid-test1

Adding range to a Dakota Alert WMT-3000 wireless driveway alarm

Inside of a wmt-3000 wireless driveway transmitter
This is a photo of the radio transmitter inside of a Dakota Alert WMT-3000 wireless driveway alarm system. The wire coming through the hole drilled in the bottom of the case and soldered to the base of the antenna extends out to a 27″ wire whip antenna. Note the jumper circled in yellow. This jumper has a “high” and “low” setting. It is set to the “low” setting by the factory, and the “high” pin has been cut off. I found that the range was extended by soldering the “high” (cut off) pin to the center pin.
wireless driveway alarm with wire whip antenna

New voltage gauges


This picture shows off my new flush-mount laser cut panel with voltage meters installed. These new gauges are Datel self-powered LED voltage displays (DMS-20PC-8-DCM for the red traction pack display and DMS-20PC-0-DCM-B for the blue accessory battery display). They are considerably more expensive than my previous gauges ($50 for the red and $59 for the blue) but have two major advantages. First, they actually fit inside the dash, so I can flush mount them instead of building a box around them. Second, they are “self-powered”, which really means they have their own DC/DC converter built in and draw power from the source they are monitoring. But, because each gauge has it’s own DC/DC converter, they are completely isolated from each other (something that my previous “isolated” DC/DC converter didn’t really do well.) Having all the power circuitry integrated into the gauge also greatly simplifies the wiring.


The gauges come with metal clips to fix them to the back of a panel, but the clips were too big for my opening. I improvised with a very close fit on the cutouts and some large rubber bands. If I ever need to replace the rubber bands, I just unscrew the four 6x 5/8 inch screws to remove the panel. (The screws are not exactly balanced on the panel as I was matching up to pre-existing holes.)

I wanted two different colors for the accessory and traction pack voltage, so I paid $9 extra to buy the blue LEDs for the 12 volt accessory battery. It turns out that this was a mistake. The blue gauge is much brighter than the red one, and at night it is blinding. I wired up a toggle switch to allow the driver to turn it off when driving at night. (The red gauge is just right, easily visible in the daytime but not too bright at night.) If anybody wants to buy a blue self powered voltage gauge for $50 including shipping I’d gladly sell it and buy a red replacement.

On-Dash voltage guages

I received a VWRAS2-D12-D9-SIP isolated DC/DC power adapter from Digikey and built an updated voltage gauge module with dual gauges (one for the 12 volt accessory pack, and one for the 120 volt traction pack). The gauges were slightly too large to fit inside the dash, so I built an enclosure out of craft plywood that sticks out flush with the bottom of the radio.
Continue reading