|My Tech Projects|
|Last updated: Man-O-War Cay, 13 Sep 2012||Contact:|
|Current downloads / Notes|
I'm also interested in the various ways to organize, index, and generally analyze my website (well, websites in
general). I'd like to play around with semantic web constructs. E.g. how are
my photos of fishing boats in Peru related to
photos of my dinghy and sail placement and
graphs of sailboat characteristics? I'd like to describe each
of those with semantic markup linked to (public and private) ontologies, then graphically link and navigate (pun there?) between them.
Something for the future. In the meantime, below is a HTML grapher that I found and am starting to fiddle with.
- * What's needed to use the Apple Accessory Protocol? - a gem which references:
- Apple Accessory Protocol on nuxx.net Wiki
- Iphone Serial Port Tutorial
- Sparkfun's iPod connectors
- Controlling an Apple iPod with the Atmel Mega32 - a Cornell course
- Kineteka Samsung Galaxy Tab breakout
- Apple iPod, iPhone (2g, 3g), iPad Dock connector pinout
- Apple iPod, iTouch, iPad jack pinout
- Project HiJack - simple communications with an i-device using audio (blurb)
|Hello World Remote Controller - Notes|
|Man-O-War, 25 Oct 2011||Download|
If you have an iPod Touch or iPhone, to see the actual look:
If you have an Arduino and either the Asynclabs WiShield 2.0 or Sparkfun WiFly shield (and an iPod Touch, iPhone or any browser that can make a WiFi connection to an ad-hoc device), please download the code and try it out. Let me know if you have any problems with it ().
Some notes regarding the code:
Installing Apache Tomcat 6 on Mac OS X (Snow) Leopard - pretty helpful
|Last updated: Melbourne, 9 Feb 2010||Demo (you may need to use your browser's|
|zoom to fit - e.g. View > Zoom > Reset)|
|I think what would make this an interesting project is integrating the UI for all these functions on a snazzy device like the iPod.|
is a mock-up of the current GUI.
Note: you might need to zoom in
or out a little in your browser for the demo pages to fit right. (e.g. "<command> +" and
"<command> -" on Firefox on a Mac, "<CTRL> +" and "<CTRL> -" on Windows, etc).
The buttons along the bottom of these mocked-up pages (as well as the "8.63 volts" drill-down button
and the "?" button) are hooked up so please try them.
The other buttons would need to invoke functions on the Arduino so they don't work here.
That mock-up should look OK with any web browser, BUT if you have an iPod Touch or iPhone, to see the actual look:
Melbourne, 6 Mar 2010
Video of my first version:
|[25 Dec 2011: I'd like to port this code to the new Arduino WiFi shield when it becomes available.]|
|Stereo Webcam - Notes|
|Man-O-War, 16 Dec 2010||Download|
|16 Dec 2010|
As a first pass to learn about the USB interfaces to these Logitech Orbit AF webcams and see how the stereo video is going to come out,
I wrote an Objective-C program that runs on the MacBook which controls one or two webcams. The webcam(s) are plugged directly into
the USB port(s) of the MacBook (ie. no microcontroller). If you have one or two Logitech Orbit AF webcams and OS-X (I developed it
on 10.5 and then upgraded to 10.6 when it became available so they should work), you can download my code
here. I'm still working on the demo video and some documentation.
|Everything but the kitchen sink|
For my boat monitoring projects this winter, I'd like to interface a bunch of sensors to my microcontrollers.
This blog entry will describe my results from interfacing them to a Raspberry Pi and/or BeagleBone -
just to shake things out and maybe try to organize a plug&play approach. I suspect the RasPi and
BeagleBone will be my preferred microcontrollers (rather than the
Arduinos that I have used in the past). The Arduinos are just too limited, IMO.
For the final installation, I'd pick an
The stew as of Feb 2012 (not everything is hooked up)
Top: The GPS module (under the USB plug), the Arduino ADK
board and WiFly Shield, the 5V-3.3V level converters. Bottom:
the various sensors, a Bluetooth module, and the SD card readers.
appropriate microcontroller, PCB breadboard, container, power supply, etc. Plus, use solder connections instead of the plug-in breadboard.
And seeing this installation art makes me want to add some kind of interactive light - maybe to the underside of the hardtop bimini. Something inspired by bioluminescent plankton that I've seen in the wake. Or a reflection like this but "reflected off" somebody in the cockpit. Hmm.
|Component||Function||Where I'd like to use it|
Triple Axis Accelerometer Breakout - MMA8452Q
3-Axis Accelerometer Module
|Measure acceleration (G's)|
in 3 dimensions
|Dinghy Black Box|
BMP085 Barometric Pressure/Temp/Altitude
|Measure barometric pressure||Weather Monitor|
Weatherproof TTL Serial JPEG Camera
with NTSC Video and IR LEDs
|Takes photos and video||Boat Security Monitor|
Paralax Compass Module HMC5883L
|Measure compass heading||Dinghy Black Box|
Paralax GPS Module PMB-648 SiRF
Adafruit Ultimate GPS Breakout - 66 channel
w/10 Hz updates - Version 3
|Lat/long||Dinghy Black Box|
Paralax Gyroscope Module L3G4200D
in 3 dimensions
|Dinghy Black Box|
Humidity Sensor - HIH-4030 Breakout
AM2302 (wired DHT22) temp-humidity sensor
|Measure humidity||Weather Monitor|
|Logic Level Converters||Convert 5V signal to/from 3.3V||microSD, SD-MMC cards|
1. Arduino ADK, Duemilanove, Mega, Nano USB
2. Raspberry Pi
3. Beagle Bone
|Microcontroller||Well, to prototype this
and then the individual uses
Electret Microphones (4) + amp & board
Breakout Board for Electret Microphone (1)
Listen to the sound
of the engine
|Boat Engine Monitor|
PIR (Passive Infra-Red) Sensor
|Detects motion||Boat Security Monitor|
Continuous Rotation Potentiometer
|Create a resistance depending on orientation||Dinghy Black Box - for a DIY wind direction instrument|
Hall Effect sensors and some Magnets
|The Hall Effect sensor detects presence of the magnet||
Boat Security Monitor - for an
Dinghy Black Box - for a DIY
Weather Monitor - for a DIY
anemometer and rain gauge
RS232 Shifter SMD
Droids SAS Serial Adapter RS232-TTL
|Interface to RS232 cable||Boat Performance Monitor and Weather Monitor - interface to the Raymarine SeaTalk multiplexor|
|Read/write to SD card||Dinghy Black Box
and anywhere I want to do persistent logging
1. ChronoDot - Ultra-precise Real Time Clock -
2. Large waterproof OtterBox - 3000
3. Solar Lithium Ion/Polymer charger - v1.0,
Large 6V 3.4W Solar panel - 3.4 Watt,
Lithium Ion Battery Pack - 3.7V 6600mAh
4. IR sensors - TSOP38238 and Mini
|1. RasPi doesn't include a RTC
2. They claim waterproof to 100'
3. These should all fit in (or mounted on) the Large OtterBox
4. To enable remote control (other than an iPod or Android device, which I plan to do also)
|1. Any uses that need an accurate timestamp
2. Any uses that need to be weatherproof or 3. self-powered
TMP36 - Temperature Sensor
One Wire Thermometer - DS18B20
|Measure temperature||Boat Fridge Monitor and
|Wind Speed and Direction
1. My old Datamarine mast-top instrument
2. My new Raymarine mast-top instrument
|Measure wind speed and direction||
1. Dinghy Black Box
2. Boat Performance Monitor
and Weather Monitor
1. Asynclabs WiShield 2.0
Sparkfun WiFly Shield
2. Miniature WiFi (802.11b/g/n) Module
3. Sparkfun Bluetooth Modem - BlueSMiRF Silver
1. WiFi for the Arduinos|
2. I've ordered 3 of these - one for each of the two RasPis and one for the BeagleBone
3. I guess this could work on any of the micros
|All these Boat Monitors and
Dinghy Black Box
|Dinghy Black Box|
Essentially the Boat Performance Monitor, but portable and waterproof -
that I could use on a sailing dinghy to monitor and improve my performance.
|Boat Engine Monitor|
Monitor engine RPM, temperature, oil pressure, sound, boat speed.
Plot boat speed vs. engine RPM (ideally taking into account effect of wind and waves).
|Boat Fridge Monitor|
Monitor fridge on/off cycles, power usage, fridge/cabin/seawater temperatures.
Possibly modify compressor speed to minimize power usage as described in the Frigoboat section of
this Practical Sailor article.
|Boat Performance Monitor|
|The iPod user interface would make this snazzy, of course. But what I think would make this real interesting is keeping the history of how the boat has performed in the past on that particular point of sail. Ie. on that particular heading relative to the wind and that wind speed. Then we could use that past performance as a benchmark - can we do better? I think it would be very cool to have a public repository of performance data like this somewhere so that we could see how we compare with other boats - sort of a distributed, time-lagged sailing regatta.|
|Boat Security Monitor|
This can probably be done with various off-the-shelf products. But I'm thinking I can do a better job
creating an integrated dashboard specifically for my needs. We'll see.
I'd reuse parts of the Stereo Webcam and Boat Performance Monitor from above.
Monitor wind speed and direction, barometric pressure, humidity, and rainfall.
Logged and plotted over time. Available via a website. Shared with
|HTML Grapher - Notes|
|Last updated: Mt. Desert Island, 3 Aug 2010||Download the code|
I added code to allow viewing more than one page. A sample screen shot is shown below. Each connected blob represents a different page on my website (/cr34-analysis.php is yellow, /index.php is red, /sv-breakaway.php is blue, /about-me.php is green, etc). The page you're now reading, /tp.php, is purple. It looks like spindly creatures under a microscope. To me anyway. In the future, I'd like to show the links between pages and add the ability to pick which pages to show.
|Monitor the battery on my Macbook|
|Man-O-War, 18 Oct 2010||Initial (rough) pass at the server-side UI|
Anyway, I got to thinking that a battery cycle grapher might be interesting and could maybe help
me improve the battery life. I also saw some Apple(?) documentation suggesting that at the end
of the battery life, these power readings get erratic, so this tool may help me determine when it's
end of life is approaching (how morbid is that? :-).
I wrote a little program that samples the same Power readings as can be viewed
in the About This Mac panel I mention above (by programatically invoking
once a minute). I currently simply write the data to a .csv file. Here is a sample of the results after formatting the .csv data a bit in Excel.
The vertical axis for the voltage (the purple line) is on the right hand side (0-14V). The plot starts (on the left) with me unplugging the charger. When it got to 5 minutes left on the battery (the bottom of the blue "V" in the graph), I plugged the charger back in. I stopped the plot when the battery indicator (on the MacBook menu bar) was showing "(Charged)". I was surfing the web and watching a DVD on the laptop while this was going on.
Man-O-War, 22 Nov 2010
|Here's the current UI. It displays the readings in realtime (albeit slowly - one sample per minute). There is also a plot of the daily min/max/ave and a plot of the battery health (current full charge capacity divided by it's capacity when it was new) and the current battery life (how long it takes to discharge from a full charge to empty). There are a couple screen samples of those plots in my Welcome page for the server side reporter.|
I'd also like to have included the ability to overlay previous recharge cycles. But I am
stopping here. I've just recently come across a very similar
utility called MiniBatteryLogger
(although that developer's website has apparently been down for the past couple days. I am curious
to see what he was charging.. hmm.. pun there? :-). Still, I think this project was a "successful failure" in that
I learned a lot and got to try some new stuff (new for me anyway). For example, my user interface included pinch to zoom in/out
on the plots and the 2-finger gesture for scrolling the plot (that sounds a little vulgar, doesn't it?), and 3-finger swipe to
move between pages. I'll hopefully be able to resuse some of the code in future projects. And I enjoyed working on
Again, the first draft of the server side of this (now defunct) app is found here. The user (running the UI, shown above, on their MacBook) would be able to post reports to the server and display them, along with others, on the Reports folder. My Aggregate Plots folder was intended to look similar to MiniBatteryLogger's Shared Data Battery Archive Page. As they say, C'est la vie.
[Update: Currently, storing the sample screens from the user is not working on the server, so those parts are blacked out in the Reports folder. I need to update the version of the jdbc driver on the GoDaddy server to support writing of the images (as BLOBs) into my host database. It works on my local development server.]
|Sailboat Characteristics Plotter|
|Man-O-War, 29 Nov 2010||
The tool itself
My interactive plotter can be found here. Below is a screen sample from it, where I've selected to plot the designs for Alberg, Crealock, and Paine. You can also select from a list of builders, or from a list of all the models. The model list should be complete. The others are still under construction. Please try it out. And come back from time to time. I hope to make improvements.
|2 Dec 2010|
Here are my implementation notes.
|5 Dec 2010|
Regarding browser compatability.. I had wanted to develop this app such that the user does not require a Java plug-in
(to run an applet), as was the case for the HTML Grappher. So,
The app does require HTML5 and I'm happy to say that most of the HTML5-enabled browsers appear to be playing well with the app.
Here is what I'm seeing to date:
The app appears to be working well on Firefox (v 3.6.12), Opera (v 10.63), Safari (v 5.0.3), and Chrome (v 7.0.517 on Vista and 8.0.552 on Mac). It was not working well on IE8 (v 8.0.6001) - to be expected as IE8 doesn't support HTML5. On IE 9 (Beta, v 9.0.7930) the stuff does display but there are scroll bars placed around the graphical navigator. Apparently IE9 doesn't recognize the style="overflow-x: hidden; overflow-y: hidden;" that I'm using on the <frame> element for that section. I'll try to work around it (or maybe just give IE a little time to catch up). If you're on Windows, please try one of the other browsers for now.
Hmm. Regarding this project (well, all these projects), I see this as a form of self-expression. Sort of an intersection of three popular retirees' pursuits: writing, photography, and model building. I used to enjoy this sort of stuff at work.. a lot. Towards the end though, that got kind of knocked out of me. Too many co-workers asking, "Who asked you to do that/say that/think about that?". Now, I'm kind of enjoying it again. I need to say though that my manager for the last 7 or 8 years at work was very flexible and a pleasure to work for. She kept me from burning out until the very end (when she went on to a non-managerial position).
|Traer's physics library to Processing.js - Notes|
|Last updated: Man-O-War, 10 Feb 2011||Download & samples|
|Man-O-War, 9 Dec 2010|
|Downloaded the 3.0 source code from traer.cc/mainsite/physics/ (what is now murderandcreate.com/physics). Here are
the terms from his download page:
LICENSE - Use this code for whatever you want, just send me a link jeff [at] traer.cc
|Commented out the import java.util.* in ParticleSystem and RungeKuttaIntegrator. I thought I would need to do something with ArrayList, but thankfully that appears to be supported in Processing.js so there was nothing more I needed to do there.|
|To remove particles and attractions from a ParticleSystem, I tried using the existing removeParticle(Particle) and removeAttraction(Attraction) methods. They seem to work OK in the IDE, but not in the Processing.js environment. I didn't spend any time investigating. Using the removeParticle(int) and removeAttraction(int) versions seem to work OK. I added a couple methods (marked in the code with "mrn") to make using the "int" versions a little easier.|
|Man-O-War, 10 Feb 2011|
|Carl Pearson made some nice
improvements to the traer3.pde
which I am reposting here as traer3a.pde. In particular, (paraphrasing him) he
1. fixed a bug in the Euler integrators where they divided by time instead of
multiplying by it in the update steps,
2. eliminated the Vector3D class - converting the code to use the native
3. did some code compaction in the RK solver,
4. added a couple nice convenience classes, UniversalAttraction and Pulse,
simplifying my Pendulums sample considerably.
There is a small change to the Traer library API, namely change Vector3D to PVector.
Here is the result (download the code):
|Here is my previous version of the library and pendulums sample code for reference.|
The pendulums sample displays the frames per second (fps). Here are some results from that (original Pendulums) sample:
OS-X / Windows
|Frames per Second|
for pendulums sample
OS-X / Windows
|Processing IDE||1.2.1 / 1.2.1||60 / 60||60 / 60||460 / 433|
|Opera||11.00 / 11.00||221 / 215||58 / 58||218 / 220|
|Chrome||8.0.552.231 / 8.0.552.224||202 / 223||61 / 60||201 / 220|
|Safari||5.0.3 / na||98 / na||60 / na||99 / na|
|IE9 Beta||na / 9.0.7930.16406||na / 58||na / 53||na / 58|
|Firefox||3.6.13 / 3.6.13||47 / 36||47 / 35||47 / 36|
These were all run on a 2009 13" MacBook Pro (2.53 GHz Core 2 Duo w/ 4GB RAM)|
OS-X: Snow Leopard v10.6.4
Windows: Vista Home Premium SP2 on Bootcamp (sorry, that's all I have)
I think whether the sample can do 400 fps is a little moot - it should be limited to say, 60 fps (by making a call to frameRate(60) in setup()) to make sure it looks OK across browsers. But, the questions IMO are:
- How well does the performance scale with the complexity of sketches using this library? That is, in a larger animation (more objects, a larger canvas), does performance become unacceptible on the browsers that are marginal on this (as yet) very simple sample?
- Are there easy changes to the application or library that result in good gains? -- the low-hanging fruit.
- Why is there such a big spread between browsers? Will some browsers/platforms do better on graphics applications because they have a better graphics library implementation/hardware assist/underlying support?
Jeffrey Traer's physics library
|Man-O-War Heritage Museum Website|
|Man-O-War, 15 Mar 2011|
|My Mac Notes|
|Saylorsburg, 12 Nov 2012|
- Install and configure Apache, MySQL, PHP and phpMyAdmin on OSX 10.8 Mountain Lion - Very clear and concise
-- End-of-file --