Weekly Random: #53

Excellent

Miscellaneous

Technical

Posted in Random | Leave a comment

Weekly Random: #52

Interesting

Miscellaneous

Readable

Technical

Posted in Random | 2 Comments

Weekly Random: #51

Very Miscellaneous

Music Videos

Technical

Posted in Random | Leave a comment

Weekly Random: #50

Cool

Miscellaneous

Posted in Random | 3 Comments

Weekly Random: #49

Interesting


Heavier

Technical

Posted in Random | Leave a comment

Weekly Random: #48

Misc

  • No one wants to die. Even people who want to go to heaven don’t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life’s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true. Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.“- Steve Jobs

Technical

Posted in Random | Leave a comment

Weekly Random: #47

Miscellaneous

  • Is Junk Food Really Cheaper?
    • Good article. Resulting comments are pointed and hint at more underlying issues though, real and perceived.
    • Great tweet on the comments from B. Weiser, a friend of mine: “NYT readers are savvy group. Read some comments. I think some missed the message b/c they were too busy formulating counter argument.”
  • Foster The People – Pumped Up Kicks
    • Cool song. Stuck in my head for days.
    • Discussing this song in Rolling Stone, Foster said:  “I was trying to get inside the head of an isolated, psychotic kid. It’s a fuck you song to hipsters, in a way — but it’s a song the hipsters are going to want to dance to.

More James Altucher

  • Who Are Your Friends
  • From Porn Star to Painter
  • The Ten Commandments of James’ism
    • Not my favorite post, but I liked this: “Think about it, when you say you want to have more money, why is that? You may answer that you want it so that you would be able to travel some more, or have more time for your children. And why is that? You may say because then you would see the world and write that novel you always wanted to write, or teach your kid to throw ball.  And why is that? And you may say, because then I will be happy.  So why not go for “happy” in the first place?   Why the long route when there is a shortcut? Certainly money buys some degree of freedom. So getting more money is a reasonable goal. And we’ll get it. But let’s cut out as many intermediaries to happiness as possible.
  • Threesomes, Success, and More
    • Also not a favorite post, and yet I really liked this: “Note: I had no experience making websites, no experience in TV, no experience in trading, and no experience in writing for financial media. But I did it anyway. Nobody was going to tell me not to. I would not have listened“.

Technical

Politics

  • We’re being attacked for what we do in the Islamic world, not for who we are or what we believe in or how we live.
    –Michael Scheuer, former Chief of the CIA’s Osama bin Laden Unit
Posted in Random | Leave a comment

Weekly Random: #46

Interesting

Miscellaneous

  • Was Marx Right? 
  • In Capitalism, Man exploits Man.
    In Communism, it’s the other way around.
    – John Kenneth Galbraith

Technical

Posted in Random | Leave a comment

Favorite Quotes: #1

Collected over the past 15 years.

—————————————————-

Simplicity is the outward sign and symbol of depth of thought.

— Lin Yutang

—————————————————-

Live a good life. If there are gods and they are just, then they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are gods, but unjust, then you should not want to worship them. If there are no gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones.

— Marcus Aurelius

—————————————————-

Things are not as they appear to be, nor are they otherwise.

— The Lankavatara Sutra or Surangama Sutra

—————————————————-

The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.

— Eric Hoffer

—————————————————-

I asked him if he would come up with a few options. And he said, “No. I will solve your problem for you. And you will pay me. And you don’t have to use the solution. If you want options, go talk to other people. But I’ll solve your problem for you the best way I know how. And you use it or not. That’s up to you. You’re the client. But you pay me.” And there was a clarity about the relationship that was refreshing.

— Steve Jobs on working with designer Paul Rand on the NeXT logo

—————————————————-

Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent. The slogan ‘Press On’ has solved and always will solve the problems of the human race.

— Calvin Coolidge

—————————————————-

Cynicism is a sorry kind of wisdom.

— Barack Obama?

—————————————————-

Anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that ‘my ignorance is just as good as your knowledge.’

— Isaac Asimov

—————————————————-

Is God willing to prevent evil, but not able?
Then he is not omnipotent.
Is he able, but not willing?
Then he is malevolent.
Is he both able and willing?
Then whence cometh evil?
Is he neither able nor willing?
Then why call him God?

— Epicurus

—————————————————-

Because we don’t know when we will die, we get to think of life as an inexhaustible well. And yet everything happens only a certain number of times, and a very small number really. How many more times will you remember a certain afternoon of your childhood, an afternoon that is so deeply a part of your being that you can’t even conceive of your life without it? Perhaps four, or five times more? Perhaps? not even that. How many more times will you watch the full moon rise? Perhaps twenty. And yet it all seems limitless.

— Paul Bowles – The Sheltering Sky

—————————————————-

It’s like the universe screams in your face, ‘Do you know what I am, how grand I am, how old I am? Can you even comprehend what I am? What are you, compared to me?’ And when you know enough science, you can just smile up at the universe and reply, ‘Dude, I am you.’

— “philhellenes” on YouTube

—————————————————-

I sold [MicroSolutions] after 7 years and made enough money to take time off and have a whole lot of fun. Back then I can remember vividly people telling me how lucky I was to sell my business at the right time. Then when I took that money and started trading technology stocks that were in the areas that MicroSolutions focused on, I remember vividly being told how lucky I was to have expertise in such a hot area, as technology stocks started to trade up. Of course, no one wanted to comment on how lucky I was to spend time reading software manuals, or Cisco Router manuals, or sitting in my house testing and comparing new technologies, but that’s a topic for another blog post.

— Mark Cuban

—————————————————-

You have enemies? Good. That means you’ve stood up for something, sometime in your life.

— Winston Churhill

—————————————————-

May the bridges I burn light the way.

—  Marko Rakar, a Croatian data activist
(But used previously by others, including Bass Clef & Dylan on the TV show 90210)

—————————————————-

European car companies build cars with the driver in mind.
Japanese car companies build cars with the car in mind.

American car companies build cars with themselves in mind.

— Unknown

—————————————————-

On Going Dutch: “When you pay for just yourself, you usually get what you pay for.”

On Language: “Unless our whole conversation is to be in Spanish, don’t lead off with ‘hola’.”

On Lady Luck: “Be wary of a woman who only shows up when you are winning.”

On Pick-Up Lines: “There’s a time and place for them. The time is never. You can figure out the place on your own.”

— The Most Interesting Man in the World
(Produced by the marketing firm Euro RSCG for Cuauhtémoc Moctezuma Brewery.)

—————————————————-

I like men who have a future and women who have a past.

— Oscar Wilde

—————————————————-

I have little doubt that when St. George had killed the dragon he was heartily afraid of the princess.

— G.K. Chesterton

—————————————————-

You know you’re in love when you can’t fall asleep because reality is finally better than your dreams.

— Dr. Seuss

—————————————————-

Life is simply shades of grey.  War is the greyest conceivable shade.

— Iain
(A commentor on James Altucher’s blog post “Name a Single War that was Worth It”.)

—————————————————-

Remember: Write a wise saying, and your name will be remembered forever.

— Anonymous

—————————————————-

Things don’t have to change the world to be important.

— Steve Jobs

—————————————————-

Posted in Miscellaneous, Random | Leave a comment

Weekly Random: #45

Miscellaneous

More James Altucher

Technical

Posted in Random | 1 Comment

Peak Design’s “Capture” Product & Kickstarter

I received my “Capture System” this weekend.  It’s a camera attachment accessory making it easy to attach and carry a camera on a belt, shoulder bag strap, etc. I think it is an excellent product, both in design and construction. It should make bringing along my midsize camera (a Panasonic GH2) more convenient, and yet still keep it accessible.

What I find just as interesting as the product though is how the product came about. It started on Kickstarter.  Kickstarter is a website where people can list their ideas and how much funding they require in order to get the idea realized. Anyone can review the ideas, and pledge money if they are interested. If the project receives the specified minimum amount needed, then the pledges are obligated to pay their share. (It’s done automatically.) Usually the contributors are promised something in return from the project originators.

In the case of the Capture Kickstarter project, I was an early contributor and was promised to receive shipment as soon as the product existed.  I also got the product for less than the eventual retail price (although I couldn’t know that at the time for sure since they also weren’t sure what the retail price would be).  There were different levels of contribution amounts. I pledged enough so that I will also get a planned additional accessory (the “Extender”) whenever they have time to design and produce it.

The Peak Design founder, Peter Dering, has been very open throughout the entire process and it has been fascinating to see the ups and downs of something like this becoming real. In addition to the surprise phenomenal success he had on Kickstarter (eventually becoming the 2nd highest funded project), he also had his first kid around the same time.  When it rains it pours.

I have read articles explaining how the “new economy” could be more micro-based due to crowd sourcing, social networks, and the progression of manufacturing technology.  Something like the “Capture” might never have existed (at least not as much to the benefit of the original inventor) without Kickstarter. If the experience I’ve had with Kickstarter and the Capture device is repeatable, then the next decade could see a surge in innovation and creativity. I’m excited.

Posted in Miscellaneous | Leave a comment

Software Framework for Robotics

This post describes the current state a software framework I have been working on randomly over the past year. It was designed to allow for advanced experimentation around concepts that come in to play when interfacing a computer to the physical world.

The implementation is far enough along that I’ve tested end-to-end functionality through all the layers described below. The joystick controlled RGB LED project I wrote about previously is using this framework with all of the specific technologies and tools that I have baselined here.

Layers

(Graphic created on the iPad using Omnigraffle.)

Purpose

At first glance this framework might seem over engineered. However, I have thought a lot about the layers along with some of things I hope to accomplish eventually.  My constant goal has been to keep things as simple as possible, but no simpler.  Some of my ideas involve doing things that aren’t easily possible when using off-the-shelf components.  For example, I want to have enough control that I can custom program ease-in/out movements of servos (both RC Servos and Dynamixel Servos). Most of the servo controllers on the market do not have that capability. In earlier experiments I tried programming these custom movements in the PC layer using an SSC-32 for actual servo control, but the communications latency (RS232, buffers, microcontroller, etc) made the end result unreliable and not as smooth as I had hoped for.

Controller/Keyboard

A controller could be a joystick, a mouse, a Belkin Nostroma n52te, a computer keyboard, or any combination. The controller layer could also eventually include a head tracking device like the Natural Point TrackIR.

My current joystick is a Cyborg FLY5 Stick. It’s notable only because it has two independent throttle slide controls.

User Interface

The computer provides the GUI and all visuals. In all the other layers of this framework I have decided on specific technology and product choices for a baseline. However, I am still undecided as to which GUI framework/platform I want to use as a baseline. Options for the GUI layer include:

I keep holding off because I only have so much time to learn new things. The state of GUI development for business is a bit up-in-the-air presently.

Keeping the GUI as its own self-contained layer means it’s possible to make use of the remaining parts of this framework without any GUI at all. That’s what I’ve been doing mostly to-date because GUI’s take so much time to develop and generally require a clear goal.

Most recently I’ve been experimenting by creating a Java wrapper with an embedded Groovy engine. This lets me prototype console applications quickly using a dynamic language, but with all the power of the JDK and many available Java libraries.

High Level Logic on PC

Hobbyists, and even many professionals, seem to want to do as much as possible on the on-board computers or microcontrollers. I am guessing many of them come from an EE background. I am of the opposite mind though. I want to do as much as possible on the PC. My reasons for preferring to develop on PC vs. microcontroller:

  • More advanced development tools available
  • Often using same tools I already use for business app development
  • More resources available (CPU and Memory)
  • More language/platform options &
  • Easier to test and debug.

The only reason not to do something on the PC is that it would be too slow. As it turns out in robotics, that is often the case, and so highly optimized routines and lower-level microcontroller programming is required. Still, being able to do as much of the high-level, non real-time, logic on the PC as possible opens up a lot of possibilities.

TCP/IP Server and Serial Port Proxy

The TCP/IP server is a custom C++ server that listens on a generic network socket for clients. Its primary purpose is to convert network messages to serial messages that get sent to the microcontroller and vice-a-versa.

The C++ server was written in cross-platform C++, making significant use of Boost.  Boost provides the cross-platform threading, network socket abstraction, and serial port abstraction.  (The network and serial port programming share the same paradigm in the  Boost::ASIO library).  Everything in Boost is impressive, but the ASIO library especially strikes me as being written by the elite of C++ craftsmen.)  If you want to get a feel for the type of programming involved, you can see snippets of my code in a question I posted to StackOverflow while working on this a while ago: “How should I delete a child from parent’s slot?“.

The C++ server is very generic in its base from.  As part of the initial setup protocol when a client connects (all of which is custom), the client instructs the server which serial port to open and provides port configuration parameters. The server is meant to be an executable piece of code requiring little to no configuration that can be run almost anywhere to provide network to serial conversion.  The ability to run it almost anywhere is important because it means that the server can be run on the PC workstation, or it can be run on an on-board computer (perhaps even one as small as a Linux Gumstix.)  C/C++ is not the easiest of languages, but it can be one of the most cross-platform in source code form.  After developing the C++ server, I came across a few open source projects that are essentially doing the same thing. (i.e. TCP/IP to Serial proxying). However, I didn’t see anything open source that could be easily made cross-platform or that looked as robust and as flexible as the server I developed myself using ASIO.

Instead of C++, I could have used Java. I have used RXTX for serial port access and Bluecove for Bluetooth access in Java successfully. However, there were minor issues with both. (RXTX wasn’t super reliable. Bluecove experienced random delays when connecting.) More importantly though, using Java would have severely limited options for running the serial port proxy on embedded devices.

Native Capabilities

Another benefit to using a custom C++ server is that it provides the option to write very low-level routines if needed. Most of the better GUI frameworks and platforms I’m familiar with (Java, Flex/Flash/AIR, Java) have limited capabilities for interacting with low-level OS functions and hardware directly. (Java provides JNI/JNA, but that would mean yet another conversion layer.) There are ways of integrating native C/C++ code with these platforms, but the techniques and/or libraries are specific to each platform. By providing a smartly designed network interface, the native interfacing layer is common and sharable with all the front-end platforms.

If needed, I can implement  C/C++ routines when and where needed, which can then be easily called by any client via the uniform network interface.  The network latency might be a problem for certain types of problems, but this is still a great addition to the framework’s capabilities.

Microcontroller

The microcontroller is where the programming hits the metal.  This type of programming is often referred to as embedded programming or realtime programming.

There are significant differences in the various types of microcontrollers and related programming distinctions, but these differences would seem arcane to anyone outside of the embedded space. Keep in mind that a company might be producing hundreds of thousands of devices with an embedded microcontroller and being able to select a microcontroller that costs even a few cents less at bulk quantities can be a significant cost difference. For this reason many microcontrollers are highly specialized and limited in their capabilities. Luckily, hobbyists don’t have to make the same trade-offs and the sorts-of microcontrollers I’m interested in tend to be more powerful and feature rich.

One of the more popular microcontroller platforms for hobbyists currently is the Aurdino.  However, I wanted something more powerful, so my baseline is a Parallax Propeller microcontroller. (Parallax is probably best known for creating the BasicStamp line of microcontrollers.)  The propellor is available in various forms. I started with the education kit (breadboard and 40-pin DIP) so I could learn the Propellor’s Spin language. I then purchased a PropStick USB:

PropStickUSB

This is a smaller version of the chip with supporting voltage regulators and USB interface already soldered on.  I put this onto a custom board where I soldered headers for connecting servos. The end result is quite powerful (for a microcontroller), easy to program (via USB), and yet is smaller than most dedicated servo controllers.

My custom board compared to SSC-32

The only technical difficulty I’ve run in to so far with the propellor that I probably wouldn’t have with the Arduino, is that the Propellor is 3.3v, whereas the Arduino is 5.0v.  Because of that I had to be careful with the power rails to the servos.  (I think I need to redo my current power connection setup regardless. I didn’t count on how just how much amperage could be needed if all servos are active at the same time.)

A key feature of the Propellor design is the notion of “Cogs”…a paradigm for multithreaded like programming:

Propeller Block Diagram courtesy of Parallax  (click to enlarge)

The Propellor design does not use interrupts which is a big difference as compared to many other microcontrollers.  The cog design is similar to having 8 CPUs each being given a slice of (real)time to operate with relatively safe access to shared resources.  I have used this capability to simplify the programming such that one cog handles communications to/from the serial connection, two more cogs are used to track and drive PWM signals to the connected servos.

On the robot/device there could be other components and addons, such as a dedicated servo controller like the Lynxmotion SSC-32, sensors, motor drivers, and other hardware interfacing components. The expectation as that my custom microcontroller brokers all of these devices to the higher level layers of the framework. Common protocols and related terms at this level include PWM, I2C, RS232, RS485, TTL, SPI, 2-wire, Relays, H-Bridges, MOSFET, ESCs, BECs, etc.

Next

I think the next step will be to use all of this to make my Lynxmotion BRAT derived chassis take some smoother steps. (Mentioned in an Alibre 3D case study previously.) Maybe. Or perhaps I’ll design a physical graphing apparatus so I that can accurately plot the motion curves of servos. Maybe. Or perhaps it’s time to start on that FPV RC Truck Platform with head tracking camera project I have had in mind. Maybe.

Posted in Projects, Technical | Leave a comment

Weekly Random: #44

Miscellaneous

For Future Reference

Technical

Posted in Random | Leave a comment

Weekly Random: #43

Heavy

Miscellaneous

Technical

Posted in Random | 1 Comment

Weekly Random: #42

Miscellaneous – Serious

Miscellaneous – Not So Serious

Technical

Future Reference

Posted in Random | Leave a comment

Weekly Random: #41

Random

Technical

For Future Reference

Posted in Random | Leave a comment

Weekly Random: #40

Miscellaneous

Technical

Posted in Random | Leave a comment

Weekly Random: #39

Educational

Political

James Altucher’s Blog

David Thorne’s 27b/6

Technical

Miscellaneous

Posted in Random | Leave a comment

Technical People vs. Entreprenuers

“To paraphrase author Michael Gerber, the technical person (read, web designer / developer / SEO expert) looks inward at his skills and asks, ‘How can I sell this?’ But the Entrepreneur looks out at the needs of the market and asks, ‘How can I fulfill this?‘”

John Tabita

Posted in Miscellaneous | Leave a comment

Weekly Random: #38

Cooler

Heavier

Lighter

Technical

Posted in Random | Leave a comment