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

Adafruit CC3000 + Webduino = Arduino Web Server over Wifi


Adafruit has a CC3000 breakpoint board for $35 on their site. Rather expensive, considering the chip should be $10, but it adds some nice features and they wrote a library for it.

Cut to the chase: for a rather full featured Arduino web server with the CC3000 chip, check out my port of Webduino CC3000 on my GitHub page.

———–

Longer story: I want to add Wifi support to my LED cyr wheel. My goal is to be able to wirelessly control it from an iOS device (iPhone or iPad). I also want to be able to update my LED Pattern Sequence files from my desktop Mac computer. Right now, I manually put them on an SD card, but it seems like I could skip that step and send it over wirelessly. Short range wireless connections on iOS are difficult; bluetooth would be ideal, but has stupid rules to be able to use the API/hardware. Bluetooth LE is newish and supported by the later iOS devices and computers, but my Mac doesn’t support it. Stupidly, my friend Jason gave me the solution for that: just by a dongle. Oh yeah… but anyways, I’m going to try Wifi first.

I now realize the CC3000 chip isn’t ideal because it can’t create an ad-hoc wifi network. It can only join one. That means I have to bring a wireless router with me for circus jobs and have the phone/wheel on the same network. Or setup internet sharing on my phone and connect to the iPhone wireless network from the wheel (that does work, and is okay for now). Bluetooth LE may have been better…but I’m not sure if I can control multiple wheels at the same time (another goal) and synchronize them, as I think bluetooth is a 1-to-1 connection (I could be wrong, I don’t know). I also heard the newer CC3100 chip(or 3200) might have more features; maybe ad-hoc. I should investigate if I ever make my own PCB board that has it on it.

So, using the CC3000 and wifi. I quickly realized I have to make a web server in the wheel. I came up to speed on some new(hah) “protocols” like REST, which seem to be all the rage today. I like stateless, so it seems good. I found a few REST solutions, including aREST (Arduino-REST) that uses CC3000, but it isn’t very flexible.

I then ran across Webduino; it is a few years old, but looks awesome. You can plug in your own handlers for URLs, which is a very simple way to implement REST. So, I ported it over to use Adafruit’s CC3000 breakout board. Check it out: Webduino CC3000


LED Cyr Wheel v2: Custom PCB


I finished designing a custom PCB for my LED cyr wheel. It simply combines all the chips I use into one board. Ideally I would eliminate all of the other boards except the Teensy, but I’m not so good at SMD soldering yet.

I designed it in Eagle:

Screen Shot 2014-10-10 at 9.20.18 AM.png

And I’ll be printing it with OSH Park based on advice from my friend Spencer.

This things should be awesome! It’ll be my first PCB, so i’m crossing my fingers that I did everything right.

Screen Shot 2014-10-10 at 9.22.18 AM.png


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.



(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.586 seconds.