USBtin (successful on the breadboard)

I have been working on replicating a project by Thomas Fischl. The end goals is to send and receive CAN messages on on a computer. The PCB I made had to many errors to easily debug.  It was easier to build the the circuit on a breadboard, and debug where I had access to all the pins.

IMG_20150418_152404There is a USB cable on the top left, and the Microchip in-circuit-program header on the center left. The pic18f14k50 is the left most chip. The MCP2515 is in the center and the MCP2551 is on the right. I had the USB data wires (D+ and D-) mixed up, and it took me a very long time to identify this. When I was stuck on this I Emailed the creator of the USBtin. Thomas Fischl was responded immediately and was very helpful. It was good to know someone was willing to help me out, and I am very grateful for all he did.

IMG_20150418_152413
Testing USBtin on MPPT

To prove that the system works I had to send and receive CAN messages from a device I knew was good. We had some maximum power point trackers (MPPT) that used can around in the garage. When I send a message an id of 0x711, and no data, the message 0x771 when 6 bytes of data is returned.

Both messages (zoomed out)
Both messages (zoomed out)

The Scope we have(dpo3054) is very cool. It was donated to the team by tektronix, and it truly is an awesome piece of equipment. It has the built in ability to decode can messages.

IMG_20150418_152544
Request message (0x711) with no data

 

Above is one of the first messages I sent from my breadboard USBtin. And below is the MPPT answering the request.

IMG_20150418_152517
Response message (0x771) with 7 bytes of data.

 

Below is quick snap of my bench setup for testing.

IMG_20150418_152638

 

The MPPT uses a MCP 2551, and a MCP 2510 (instead of the newer 2515), and the processors is a PIC16F877. These chips are pretty similar to what the USBtin uses. The code for the MPPT can be found on our github. It was written in assembly, so it takes time to understand.

Fluke Trip

The solar car team won the fluke connect, and we got to visit the fluke head quarters just outside of Seattle (Everett Washington). We won a great deal of fluke tools for our team. Before we won this prize we were mostly using our personal tools to work on the solar car.

fluke_plunder
Our loot!

 

 

The trip to Seattle was great.  Fluke paid for our airfare, lodging, rental car, and our food. We got to talk to people who made the tools we use. I can’t thank the people at fluke enough for their hospitality, and  generosity.

I am front and center. (Mr. Morgan was not really holding the camera. The photographer did a great job setting up this shot.)
The University of Kentucky Solar Car team at Fluke Headquarters.

While in Seattle we also toured the Boeing plant, saw the space needle, and rode the monorail. It was my first trip to Seattle, and it was a awesome trip.

Raspberry pi, bash script, and ad-hoc networks

#!/bin/sh

RESULT=$(iwlist wlan0 scan | grep ESSID | grep -Po '".*?"')

echo $RESULT

ATHOME=false

for i in $RESULT;
 do
 echo $i
 if [ $i = '"solarcar"' ]
 then
 echo "This is home"
 ATHOME=true
 else
 echo "Not home"
 fi;
done

echo "done"
if [ $ATHOME ]
then
 echo "normal mode"
 cp defaultSetup /etc/network/interfaces
else
 echo "adhoc mode"
 cp adhocSetup /etc/network/interfaces

fi

ifdown wlan0
ifup wlan0

 

The UK solar car uses a raspberry pi to collect information from different systems of the car. The biggest are the motor controller, maximum power point trackers , and battery protection system. This information is re-factored on the pi. Then the data is saved on the SD, and the information is re-factored again, and broadcast over our 900 Mhz system telemetry.

The high levels of concurrence required make this a difficult. The physical positions of the pi in the car make it difficult to verify the pi is working.

So, what we(I) want, is the pi to go into an ad-hoc mode when the ssid of the garage is not in range. I wrote a bash script that will switch modes depending the ssids in the available.

The above script is the first pass. There are many irritating things about bash scripts. The white space, and the $ are the first 2 that come to mind.

T= $PWD  
#is not the same as, 
T=$PWD

I have been been playing with the raspberry pi for the last couple of days. I SSH into the machine, so I still have all the advantages of a modern computer at my fingertips. The pi very responsive when the GUI is not running.

 

IMG_0720I need the screen and keyboard because I am rewriting the network config files. Occasionally I will mess up the basic internet connection, and have to undo something using the keyboard, and portable dvd player screen.  I do everything else through an SSH client.

 

Update: The code is on github

 

Jeep CJ-7 (Old) valve cover removed

Below are the images we took when we removed the valve cover. This was a pretty big deal for us. I have only seen this on a few engine in my life.

IMG_0290
Dad and Brother pose for Jeep pictures

I was behind the camera in most of these shots.


IMG_0289

IMG_0288

The rocker arm is the see-saw looking part. The push rod on the right side of the rocker arm, pushes up on the rocker arm. The depresses the spring on the left side, opening the valve.

IMG_0305
Valve cover off, AMC 4.2L engine.

These are the cool parts of working on engines.

PCB design for Can Board

I enjoy PCB (printed circuit boards) layout. Below is a board I made for use on the solar car. It is a clone of Thomas Fischl’s work. Here is link to his project.

First PCB version 1

First PCB version 1

Similar products can be bought for significance more. Our team did not understand why can to usb devices where so expensive.

http://www.peak-system.com/PCAN-USB.199.0.html?&L=1

IMG_0695_ed1

There are some pretty big errors on this board. I might specify what they are later (Now I am still embarrassed about them:).

It is the fist time we used a PIC18F14K50 processor. Most of our boards use PIC18F4480. The programmer is different for the PIC18k’s. It might take a bit longer then we thought to get this board up and running.

 

Jeep CJ-7 (old) Carburetor and Hoses

Vehicles in in the 80’s an d early 90’s did not have computer controlled fuel injection. These older vehicles used vacuum pressures to adjust the timing. Vacuum lines are still used to power, Power Breaks.

The carburetor atomizes the gasoline. The gasoline air mixture will then be ignited in the engine below. Modern cars have fuel injectors and not carburetors.

IMG_0234
Carburetor from a jeep 1987 (re-build)
IMG_0222
Still a mess of hoses. To the left, the three lines that run into a filter are fuel lines, most of the others are vacuum lines

 

 

IMG_0162
Coolant hose into the intake manifold. The AC unit can been seen in the left bottom of this image.
IMG_0164
Intake manifold coolant output.

 

Coolant is designed to cool the engine, however the coolant is also being used to cool the air into the manifold here. Cooling the air in the manifold will allow a greater mass of air in the cylinders (b/c cold air takes a smaller volume)

 

IMG_0319
The AMC 4.2 liter engine with carburetor removed

The engine is starting to look like a equipment, not a junk pile.

 

 

 

Jeep JC-7 (old) On the Stand

 

These are images of the new engine on the engine stand.  The distributor is blue with 6 cables leaving it. The coil is to the left of the distributor with one cable leaving from the top.

IMG_0142IMG_0145

 

 

 

 

Below is an image from the front of the engine. The alternator is on the left side of, and the A/C compressor is dangling on the right.  The harmonic damper is below the fan, and partially obscured by the fan.

IMG_0143

 

 

 

We also took images of the old engine currently in the jeep. It does not look very pretty, but it run reliably.

IMG_0146IMG_0147

 

The image to the left is from above. There is an aftermarket K & N filter on the carburetor. The distributor is in the image below.

IMG_0148

 

 

 

 

 

Neither of these look pretty, but they are impressive pieces of automotive engineering. With two engines we will have backup parts should anything go wrong.

Jeep CJ-7 Old project

One on the most enjoyable projects I ever did was a rebuild of a 1987 Jeep CJ-7. I was 15 years old, and excited to learn about cars. My dad also enjoyed working on cars. We bought the Jeep in thought ebay. It was located in Kansans city Missouri. We had a fly there and drive it back.

1987 Jeep CJ-7
1987 Jeep CJ-7

The Jeep was in okay shape. It didn’t break down once on the trip. The weather was cold on the return trip. We latter learned that in warm weather the jeep would die due to a fault ignition control module.

We enjoyed driving the Jeep for a couple of months before we started the engine rebuild.

We got the jeep and rather then taking the engine out, we bought a extra engine from a man known locally as “Nathan the Jeep Man”.

.This is a 4.2 liter AMC jeep Engine.

Above is an image of the engine while on the trailer. There is a great deal of work that will be required before the engine would be suitable to drive a vehicle.

JeepEngineOnTrailerThe bell housing is on the left side of the image. The intake and exhaust manifolds are on the bottom part of the image. The radiator tubes , vacuum tubes, and wires wrap all around the  engine.