Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug
Treehouse
Photography
Videos
Projects
Unicycling
About

SD Card errors with Arduino / Teensy 3.0


With my LED cyr wheel I kept getting random errors in reading data from my SD card with Ardunio code. Sometimes init would fail, even at half speed. Most often I would get corrupted data, or not be able to read the filenames. Worse, it would start to read and then fail. Searching around, I found it could be one of the following problems:

* Bad SD card (I tried a few of them)
* Improperly formatted SD Card (I used the official SD Card Formatter from SD: https://www.sdcard.org/downloads/formatter_4/ and it still failed)
* Floating CS (Chip Select / Slave Select) pin. I made sure I had the Chip Select pin was correct, and it was. This can be set to anything you want as long as it is wired properly and passed to the initializers.
* Incorrect voltage for the SD Card; it needs 3.3v. Now…long story short: this was the problem, but I thought it wasn’t because the SD Card Adapter from PJRC has an onboard voltage regulator.

I poked through the SdFat library quite a bit adding in debug logs and couldn’t figure it out.

Finally, I poked at the voltage that the SD Card Adapter was reading; it had a 5v input and the regulator was outputting about about 3.0something volts. I thought this was okay…but later I came back to it, and wired the 3.3v directly from the teensy output to it. Then stuff started working!

So: be warned. The PJRC Teensy SD Card Adapter needs a separate 3.3v input (and solder together the 3v joint). The onboard regulator doesn’t work well enough!

UPDATE: I’m not 100% confident this was the problem. Dealing with the SD card has been a nightmare due to read errors and inconsistency. I could reproduce the corrupt data problem on my breadboard and with my physical hardware, which is why I felt like the voltage was the problem. However, in my LED wheel I still had issues, and it seemed to be due to wire length and size. I’m now using 22 gauge wires with shielding, and slightly shorter. It seems to work so far.

UPDATE 2: Maybe I am just an idiot; after re-wiring a bunch, I realized what CS pin I thought I was using may not have been right! That may have been my problem all along..


Firewood Hutch


An oak tree fell down at the end of last winter and I ended up with a lot of great firewood. I saved a few pieces for woodworking (we’ll see how those turn out), but the rest is going to heat my house. I needed a convenient place to store the firewood, and I originally was going to turn my back door cement area into a covered firewood area…but Costanza and my friend Mark convinced me it was a bad idea (it would block too much light into my house). So, I designed a little firewood hutch that would go under my bathroom window.

The final result, packed to the brim with firewood:

IMG_1952.jpg

I had to pour some concrete posts, as wood+ground contact creates rot and termite infestations:

IMG_1924.JPG

IMG_1925.JPG

I wanted the floor to be level with my existing concrete floor; I had to dig out a bit of earth and set a four by four on top of the concrete pillars, along with a hacked up support for them embedded in the concrete:

IMG_1932.jpg

Simple roof construction, 4x4s with 2×4 roofing:

IMG_1937.JPG

3/4″ ply on top (leftover from Burning Man — I had used the plywood as flooring for cyr wheel), and then painted/stained to match the house (I also did all the back side, which needed it!):

IMG_1947.jpg

Then, roofed (tarpaper + shingles):

IMG_1951.jpg


LED Cyr Wheel on Stage


Some pictures of my work with Velocity Circus at an event for UCSF

tumblr_nbs2g3jlVb1svr83uo4_1280.jpg


tumblr_nbs2g3jlVb1svr83uo5_1280.jpg

Photos by Hiromi Yoshida, Courtesy of Gregangelo & Velocity Arts & Entertainment


Photography: LED Cyr Wheel v2 Self Portraits


Self Portraits, Corbin Dunn, LED Cyr Wheel v2, September 11, 2014. Canon 5d, a timer of 10 exposures manually set for a specific aperture and shutter speed.

UW1A7111.jpg

Man

UW1A7199.jpg

Silhouette

UW1A7206.jpg

Pattern Test

UW1A7242.jpg

Single Pattern Test

UW1A7251.jpg

Final drive ratio in an electric conversion car


So, I’m getting a new transmission for my VW bug (number 3), and probably buying it from http://www.mofoco.com/category/Rebuilt_VW_Transmissions/c112. What drive ratio should I get? They can do a few different options.

My bug is/was currently running the stock stuff for a 69 bug:

Screen Shot 2014-09-04 at 6.10.30 PM.png

I have 165R15 coker tires, and the diameter was calculated via:

http://www.evsource.com/motor_calculator.php &

http://store.cokertire.com/tire-styles/radial-tires/wide-whitewall/165r15-bfg-2-1-4-whitewall.html

The ratios I got from the VW manual, and the screen shot is from my Numbers spreadsheet (email me and I’ll send it to you).

Here are my current speeds for a given RPM and a given gear. Max motor RPM is around 5000 (maybe 5500, but that is pushing it), so I have to shift before then. I don’t use first; it is pointless (I have enough torque to not need it), too jerky, and would have to quickly shift.

Screen Shot 2014-09-04 at 6.12.07 PM.png

I always start in 2nd, shift into 3rd at about 40mph, and 4th at 65mph; this keeps me under the 5,000 RPM limit. I have a top speed of a bit under 100mph, based on the RPM.

So, the diff ratio is 4.375 (also called 4.38); also known as the “ring and pinion” gear ratio. What if I get a freeway flyer 3.88 ring and pinion? Dropping that into my spread sheet gives

Screen Shot 2014-09-04 at 6.19.11 PM.png

So, if I did this, I would: start in 2nd, shift to 3rd at about 45 mph, and shift into 4th at about 75 mph. I rarely go 75 mph; the car starts to shake a bit at high speeds, and it just isn’t designed to do that. The lower ratio would probably make the car less torquey, so I’ll stick with the standard ratio.


Electric VW: Transmission Killer


In my last post on the bug, I had mentioned that I replaced my brushes, hoping it would fix some noise I was getting in the transmission/motor area. It didn’t help, and I then replaced two CV joints, as one was worn pretty bad. That also didn’t help.

So, I bit the bullet and removed the transmission/motor. This isn’t fun; I have to remove some of my cells in the rear seat area as they cover the hatch that lets me undo the transmission from the shifter. It isn’t too bad; I simply undo the red hold down strap, disconnect the BMS and cell wires, and then pull out the center set of cells.

IMG_1886.jpg

The hardest part about getting the rest of the stuff out is to remember how to do it. I had made a motor mount thing that I used to slip under the motor and get it out, but I forgot that it doesn’t work anymore (for some reason), and I simply use a piece of plywood under a jack to lower the motor/tranny combo. I have to first remove the “ears” on the transmission to get it to do this; it is a pain. Once I remembered all the tricks, it slid right out (this took a while).

IMG_1894.JPG

Now, here’s what failed. The bearing that holds this shaft in place is blown (not the throw out bearing, but the bearing on the case itself):

IMG_1895.JPG

The shaft wiggles like mad, and the bearing has clear damage that I can see, and it is obviously leaking when it shouldn’t leak from there.

So, time for a new one. Last tranny was from Bugformance in San Jose, CA. I’m going to try this place next: http://www.mofoco.com/category/Rebuilt_VW_Transmissions/c112 which means waiting a few weeks…


Kitty Cabinet: Finished


I finally finished my Kitty Cabinet. I had to wait for some more Water Based Poly finish to come; I had accidentally ordered “gloss” when I really wanted “satin”, so it had to be put on hold until I got back from a vacation in Italy.

IMG_1871.jpg

I use water based finishes from Target Coatings.

IMG_1872.jpg

It looks rough in the picture, but it turned out quite nice. I put one coat of a shellac amber sealer on, followed by 4 coats of satin poly (water based).

Without the doors:

IMG_1874.jpg

Doors:

IMG_1877.jpg

IMG_1879.jpg

Kitty entrance:

IMG_1881.jpg


Photography: Rome Street


Rome Street

UW1A6229_30_31_32_33_tonemapped.jpg

Camogli, Italy. August 2014. HDR from 5 exposures. Canon 5D Mark III, 24-70mm lens. No tripod; supported by a plant for a bit.


Photography: Camolgi, Italy


Camogli

UW1A6601_2_3_4_5_tonemappedb.jpg

Camogli, Italy. August 2014. HDR from 5 exposures. Canon 5D Mark III, 24-70mm lens


Electric VW Bug: Brushes replaced


The rear end of my car has been making quite a bit of noise lately. It seems to only happen when I apply power, and I wasn’t too sure of what it was. If I put the car in neutral or pushed in the clutch it would also go away, so it seemed to be related to the motor. I was guessing it was the brushes; on the two brushes per section, one seemed worn about 1/8″ to 1/4″ more than the other. The brush springs aren’t worn out, but I figured they might need replacing:

IMG_1640.jpg

So, I got some of the newer better brushes (with 4 wires in the top) from EVWest.com .

IMG_1642.jpg

It shows how much wear has happened, assuming the original brushes started out this size. I put them in and ran the motor on a 12v battery for a while (not too long before it was dead…I’d charge it a bit and run it again). I then did some slow driving for about 80 miles…still lots of noise. So, it wasn’t the brushes, but the new ones should work better.

Brush change electric mileage: 37,550.

So, I did some searching on bugs, and it seems to be the CV joints (Constant Velocity joints) on the old VW bugs. I pulled the CV Joint dust cover off, and a ton of oil poured out! I wasn’t expecting this; they are supposed to be filled with grease, so now my ground has a big oil stain on it. It turns out the cap on the transmission popped out, and allowed transmission gear oil to seep into the CV Joint. This low viscosity oil is not good for the CV joint, and it caused it to wear away. I see visible grooves in the joint from the bearings, and lots of bits of metal. So, I got new ones from Bugformance in San Jose. I’m going to just replace the ones next to the transmission. HI bought the good german ones (more expensive).

Unfortunately..even after changing out two CV joints, it still is making quite a bit of noise. It is either the motor or transmission; I’m going to just drive it…



(c) 2008-2012 Corbin Dunn

Corbin's Treehouse is powered by WordPress. Made on a Mac.

Subscribe to RSS feeds for entries and comments.

14 queries. 0.750 seconds.