Sunday, March 22, 2015

Update: T'Rex Rover and Orion Robotics 15a RoboClaw Review

All running off the battery... FINALLY. Still a lot of work to go
So I have been plugging away on the rover. I got in some new things for Adafruit so that now I think I have everything I need in order to build version 1 of a complete rover controlled by WiFi. At least on the hardware front. The work is now moving more into the software side of things. ANyway, here is what is working so far:


  1. Pan and Tilt:
Ping style sensor temp mounted. Base is velcro but it proved pretty 
unstable while the servos were moving so I added the clothespins while testing
Will need to figure out a better mounting solution...

  1. The distance sensor is.... sorta working. Not sure if it is a bad sensor (cheap sainsmart unit) or bad programmer at the moment. It is mounted by rubber band which I need to sort out at some point. 
  2. Camera is throwing a stream up (that is the window on the monitor in the first picture) 
  3. Arduino UNI is talking to the RoboClaw motor controller and I have a serial command solution for fwd/bkwd and pan/tilt control
    1. back is negative 1-127
      1. command takes a positive number, fun part was figuring out how to split a ramp that went from front to back or back to front...ie if I was going forward and wanted to go backwards I didn't want it to just throw over to the backwards speed. It slows down forward motion to zero before increasing the backward rate to the requested setting. 
    2. forward is positive 1-127
    3. 128 - 307 controls pan
    4. 308 - 487 controls tilt
  4. Reading values from the RoboClaw (more on this in a bit) so I can figure out encoding for more accurate motor/movement control. Right now it is just giving me the main battery pack voltage. 
  5. Multiple Serial lines are up and confirmed, this stopped some cross talk I was getting between controlling the motors and the Arduino sending data to the Pi. 
  6. The big news: It is now working while self contained. Batteries are connected to the motor controller, it has a 5v 3a circuit that I built a franken USB cable to use to power the pi. Still using the UNO so it is powered via USB from the pi for now. Intend to move to the much smaller Trinket pro and power it from the 5v pass through pin from the Pi. 
A picture of the growing rats nest


What is left:
  • Still need to work on a serial line between the Arduino and Pi GPIO pins. Now that I have the multiple serial lines setup that should be easy
    • Means I also need to spin up a serial connection program on the pi instead of using the command line or the Arduino IDE serial interface Ultimate goal there will be to connect to the remote system (Macbook initially, iPad, Android apps eventually). 
  • Decide between 5v trinket pro and 3.3v trinket pro
    • 5v will require logic shift to talk to the pi, definitely doesn't require logic shift to talk to the servo's, sensors and motor controller. You can see this setup below on my new pi Hat, trinket is to the right, logic shifter is to the left, camera ribbon goes between them. This is just mocked up right now. Still have to transfer all the wiring from the uno to this board if I can make it all fit. If you zoom in you can see my learning process on the solders. The hat is a bit scorched in places. No idea yet if I over did it or not. Same on the trinket and shifter... 
    • New enclosure, pi hat, wi fi (increased range I hope), and camera housing.  4 line logic level shifter and 5v trinket are sorta mounted

    • 3.3v doesn't require logic shift to the pi but may require a shift for the motor controller or sensors. I have a 4 and 8 line shifter if needed. 
      • You can see the scorch marks... as homer simpson might say... "DOUGHT !!!"
      • If the cabling for the above doesn't work right I may go to the 3.3v trinket to simplify the wiring coming out of the hat. Supposedly the Roboclaw outputs are 3 volt logic tolerant.... so I shouldn't need the shifter for it. Not sure about the ping sensor. Think it needs 5v... 
  • Sort out some servo freak outs. Getting some random servo jerks when sending serial in and out. Guessing I need to pull the pin low with a resistor or something or maybe add a cap or two. Right now the signal wire is plugged straight into the Arduino so I suspect the pin is floating and getting pulled high here and there. Also possible I fried something on the Arduino so I am going to wait until I have the trinket wired it to try and nail this one down. 
  • Start building a control program to replace using a VNC session to the Pi desktop. Eventual architecture will be 
    • Remote (laptop/mobile device) <-> Pi WiFi interface via bi directional packet traffic <-> Pi to Arduino <-> Arduino -> Roboclaw, servos, sensors etc...
      • Joystick or other analog process (mifi from mobile?) for motion control
    • Pi Camera -> Netcat stream or HTTP webcast -> remote receiving system (laptop/ mobile)
      • Joystick or other analog process for pan/tilt control (wifi for mobile?)

RoboClaw 15a Review:

So far I have liked this controller lineup from Orion Robotics. Prior to these units (ranging from 2x5a - 2x60a) popping up it seemed the only easily available higher amperage hobby controller that wasn't R/C based were the SaberTooth modules you see on most of the various robo building sites. Of particular interest here to me where the various modes of control (usb, serial, PWM) and encoder capability. With a decently encoded motor you can effectively turn relatively cheap DC motors into powerful stepper motor/servos with these controllers if you so desire.  While this level of precision is not something I am after with my initial rover setup it is something I want to explore down the road. Until this it looked like I would be doing a separate encoding solution through a micro controller.

It has so far survived my idiocy (see previous post for my infinite current goof) with the exception that the voltage information is reading high. I got the same problem from the circuit I had on the UNO and the RoboClaw was a part of that configuration. I suspect a resistor got partial fried or something. Unfortunately I had no readings prior to that event so I do not know if I caused it or if it was reading high (compared to my multi-meter) originally. I suspect the problem was me... just no way to know for sure short of buying another one. 

My only real complaint thus far has been the somewhat sparse documentation. Orion's site forums are not terribly extensive and there seems to be few other places with info beyond some regurgitation of the built in examples they provide and... well they are in some cases not easy to pick up. At least not for this particular noob. They consist of working examples more or less... but none of the 'why' or what the different choices mean. For those familiar with this kind of gear I am sure what is provided is more than sufficient to get your bearings. But, if you are a novice these controllers may not be the best choice. I am not a complete novice... but my basic electronics knowledge is definitely lacking. You can read up on my various learning experiences with this controller in the previous posts on this project. Hopefully they will pop up on google searches if anyone else hits similar snags. 

All in all though the units are similar priced to the Sabertooth controllers, seem to have more options and are built well. Definitely worth a look if you are in the market. 

Monday, March 09, 2015

Thoughts: Apple Spring Forward Keynote - iWatch and Macbook

So Apple did its big spring announcement and the short version is....

Pricing and final features of the Apple Watch - no real surprises, if you liked it carry on
Brand new MacBook design - It is exciting like the Ford Thunderbird remake

and the really big news, Research kit.... no seriously. But back to that in a bit, got to save the best for last after all :-)  

Apple Watch:

First lets talk price vs function:
$350 - $10,000+ pricing. Difference in function? Zip. The utilitarian sport aluminum $350 apple watch will do everything the 18kt gold Apple Watch Edition will do. The only functional difference is style and materials. The truly valuable (from a functional standpoint) difference in watch face of Sapphire (also avaialble starting at $549) seems the more worthy of the two. Gold vrs Aluminum.... that has me scratching my head. Granted I am not a watch person so I place almost no value in precious metals for the sake of precious metals. I was kind of surprised the edition really didn't have more to distinguish itself. In this I grant creedence to the folks saying Apple is to some extent going after the "Vertu" crowd. For those not familiar Vertu has made a business of selling ho humm android phones in fancy casings of precious metals and jewels. However, I would suggest it is more accurate to say that Apple is at risk of only attracting the Vertu crowd rather than who they really desire.... but who is that? Vertu is about folks that place form over function. They do not CARE the Vertu phone does nothing new only that it is more unique and 'stylish'. This is a bit different crowd than you see buying 10k watches where regardless of how valuable you view hand crafted movements and polished micro gearing etc... there is a functional difference you get in the higher end mechanical movement watch world vrs the lower end mechanical movement watch world. Really, stereotypes of silver spoon folks with inherited fortunes and silly sports/pop/lottery winners aside, folks with money generally do not get that money by being stupid with money. Hence my surprise that Apple didn't do a bit more on separating the functionality. This would seem to leave naked snob/peer pressure as what will drive folks to go for the Edition over the more plebeian offerings. On the other hand, separating the rich from the poor functionality wise would cause some development nightmares. The numbers that make the Apple ecosystem so attractive to develop for are kind of the antithesis of a elite device owned by only a select few. 

Now lets talk style vrs. function:
Like it or not, understand it or not, agree with it or not, from a social standpoint there are circles in which someone would not be caught dead wearing a 'cheap' or 'common' watch no matter how utilitarian. It would be akin to things like a clip on tie, tennis shoes under a suit, gaudy costume jewelry in inappropriate situations  etc... they are signs of not belonging, of immaturity etc... and in such cases it would be better to go with no watch at all IF social opinions of you in that peer group is something which concerns you. One can argue all day and night for or against the merits of such a circle with such values but they will not make them go away. In this world one gets the sense that cellphones have invaded those environs somewhat in spite of their everyman nature due to their indispensable nature. In this context it would seem that companies like Vertu have exploited a void in this world unfilled by smart phone makers to sheath that utility inside something more aesthetically pleasing (talking theory more than the actual success here... but they are still in business...). Yet to me (someone who generally cares not about these things) the difference between a phone and a watch is simple. One you wear for the world to see whether or not it is in use. The other they only see when in use. As a result one is a fashion item that is subject to all that goes with that. The other is not. I think Apple's bet is Vertu is gilding the lily.... or perhaps more accurately... putting lipstick on a pig when they try and turn a purely utilitarian and largely hidden item like a phone into a fashion item. By comparison, it could be argued that the Apple Watch Edition is about having a necessary fashion IQ for an item that requires it in order to be used by a VERY desirable class of customer. Translation: The iPhone is used across all social strata without stigma BECAUSE it is not generally viewed as an item of fashion. An Apple watch attempting to penetrate in the same manner as the phone across all strata of society is fighting an uphill battle if it does not make an attempt to make a version that wouldn't be viewed the same as a 'clip on tie' at a black tie gala event. Even a bad silk tie with a garish pattern and poorly tied is better than a polyester clip on in this sense. In a way if all Apple manages to do is start a legitimate conversation (heck make that argument) in this world as opposed to being outright dismissed they win. Why? Because if they can get their foot in the door on the fashion front I think the obvious utility may carry them through to true success in making a successful high end fashion luxury item. I think their chances of success are better than 50\50. 

Now lets talk value:

Should you plunk down a minimum $350 for an iPhone accessory? Most Android wear devices and the Pebble are cheaper than this and in about 1.5 years have not managed to exactly set the world on fire. Will the Apple Watch be different? My bet is yes and Android wear is actually my answer as to why. Despite its awkward ways, an Android wear watch is useful. Surprisingly so. If an Apple Watch is only as good as the best Android wear device it will be far more successful than any single Android wear device to date, and most likely all of them combined along with Pebble to boot. That is to say I think Apple clears 2 million devices (the current combined estimate of those two worlds) before 2016 hits. Probably before 2nd quarter is over to be honest. Why? Here are the keys as I see them.

  • Even with slower iOS 8 adoption Apple has a much more homogenous audience than Android and they are proven higher spenders. 
    • This all but assures higher adoption rates and better app eco system development. Since this can add to existing apps/eco systems there are already a myriad of ways for folks to be seduced into wrist wrapped silicon.  
  • Glance notifications on your wrist are better than you think if you have not yet experienced them.
  • Silent wrist notifications are better than vibrating phones on desks or even in pockets in many cases. 
    • Even if the phone in your pocket is silent, your rustling and moving to dig it out is not.
  • Glancing at your wrist has a much higher social acceptance than glancing at your phone. 
    • It is possible this will erode over time if folks start associating wrist glancing with phone glancing but if that happens it will only be because it has become common enough that someone looking at their wrist is no longer associated with looking at a watch 'first'. Trust me, Apple would be thrilled if this happened.  
  • Apple Pay biometrically authenticated on your wrist is the potential killer feature.
    • I see this as a way to finally kill the password. If this works and folks trust this feature with their bank account then I suspect this could be a link to a drastic reduction in password entry needs. 
  • Design may prove much more stable than folks seem to think. Mass discussion seems to all assume this device will be on a phone/tablet type refresh cycle and that is probably not the way it will go
    • The horsepower is on the phone. The watch just needs to be able to display stuff snappily and by all appearances it is on par with current phone level responsiveness and the last generation or two of phones really have hit the point of diminishing returns on speeding up the interface.  
The reasons to not get one? 
  • It is possible it won't take off. If the app ecosystem development does not follow\scale at a similar rate to those of iPhone and iPad it will be a good indicator of whether or not this thing has legs. 
  • First generation designs from Apple have a tendency to be rougher than they look so if you can hold off from having the latest thing I'd let this get out into the wild for a month or three and see if any ugly unforeseen design flaws raise their heads. 
  • Apple only seems disappointed in two things and combined I think these two things will drive Apple watch early adopters to eventually want to get a new version much earlier than will be the case down the road (v2-v4 at a guess). But I do not expect this to be on a similar pace as phones.
    • Battery life. Expect Apple to figure out how to drastically improve this if the watch takes off. They seem to be on the longer end of all the smart watches (other than Pebble) and the reviews will tell us if this is true or not. They have got to be betting the utility makes it worth dealing with charging. My experience with Android wear says it can make it worth dealing with.... but only just. I think long term a week is the territory a smart watch needs to get to, if not a month. 
    • Sensors. Several credible stories seem to prove out that Apple had to drastically scale back their plans on the sensor front as they proved tougher nuts to crack than expected. Those same sources are all also saying they didn't give up.
Bottom line? 

If you are tired of the smartphone hunch and on a scale of thumb warrior and read only you slot more towards the read only end then the Apple Watch (or Android Wear/Pebble) are worth your attention and quite possibly your money. If you have callouses on your thumbs from your furious texting despite the oily glossy smooth touch screen of current phones I am not sure you will get much benefit unless you are going to talk to your watch as your phone will be out most of the time anyway.

As for me, its the first time I have been interested in personally buying a watch for any reason since I got my first smart phone. Apple Sport Space Grey (or maybe Watch) with a Milanese loop please.... and yes, from the Apple page it seems the sport/Milanese loop combination is possible. And it would be cheaper than an Apple Watch with a Milanese loop. If I go for the watch it will be for the Sapphire and if I think it has a legitimate chance of being a 5 year device. Otherwise I will wait.


Macbook Revamp:

I am really excited about this design. But unfortunately I think I am more excited about what it means for the Pro updates down the road than I am for this particular device. I smell the original Macbook Air part II. Why? Looks like you can't go to 16GB of RAM on the configuration. Combine that with the current lackluster M core chip performance folks have been seeing in all the other supper thin and lights popping out and I think 'tolerable' will be the best outcome on the performance front once these hit reviewers hands (I'll be happy if they prove me wrong mind you...). For those that want silent and portable it will be enough and it should be a success. I tend to require more oomph and it looks like that is not ready for prime time with a serious chip. The Air's have more power than this guy.... quite a bit more power.

The single USB C port thing is I think going to cause more wailing and gnashing of teeth than it merits. But, that said, until the world catches up a bit to the connector less laptop method of operating it is going to be a bit painful on the early adopter front. Be very sure before buying this thing that it will fit your work flow needs.

Those misgivings aside everything else looked stellar. The keyboard I look forward to trying. The trackpad seems a good update and the 30% reduction on the screen power consumption is staggering. All metal body, no internal moving parts, solid keys, more solid track pad. If they got the design nailed this thing could be a very long lived device. Hence my real worry about the somewhat under powered nature of the CPU/RAM options. They may have sacrificed to much to get rid of the fan/vents. 

Why does this make me salivate for the MacBook Pro updates? Take the current design that gets 9 hours and add a 30% reduction in screen power needs and you probably wind up with 10 - 11 hours of battery life with no other changes. Shrink the logic board in a similar fashion and even if you still need an active cooling solution for the higher horse power it still fits in a smaller package. Bump up the battery capacity using that terracing technique at the same time you drop the logic board and display power\space usage and you may hit 15+ hours of real usage on a serious laptop. Put USB C ports on both sides of the chassis and you can now plug power in from either end YES. No more being just the width of your computer away from the nearest power source (happens to me all the time for some reason). I do give a frowny face for loosing mag-safe power connection. I'll get over if if a future Pro has USB C that can power the laptop from either side of the device.

I would like to see a fully tarted up 15" along these lines at WWDC or maybe in the fall (new display tech, new keyboard, new terraced all metal unibody with form fitting batteries, shrunken logic board even if it retains active cooling). But it is more likely it will get bumped more along the lines of the way the 13" got bumped (Flash speed bump, force trackpad). Does it get USB C though? That seems to be the way Apple thinks things are going to go. But I was kind of surprised to not see a USB C on the 13" RMBP refresh. Perhaps they are hedging their bets a bit here? Or just that they admit the professional world adoption of USB c is likely going to lag behind the more general consumer market. Who knows. 

Research kit:

Everyone is talking about the Watch and Macbook announcements. But I have seen almost nobody talk about Research kit. Folks.... that is a bonefied potential game changer in the world of medical research. And, that is a big deal. Even if they do not significantly increase participation levels and they only manage to significantly increase the amount and quality of data points per participant it will represent a significant improvement. If they successfully change the scale (they are talking potentially going from 10's - 100's to MILLIONS) at which folks participate AND increase the amount and quality of data capture it could lead to major increases in both the speed and accuracy of results from medical studies. This is a foundation they are laying and it seems to align nicely with the idea that future versions of the Apple watch will introduce major advancements in health related sensors. Future headline prediction "Many decry the supposed frivolousness and waste of insurance companies now paying for Dr. proscribed Apple watches for medical monitoring". You heard it here first. 

Friday, February 27, 2015

FCC and Net Neutrality: What does it mean to classify ISPs as Common Carriers

Put simply, the FCC wants to make the ISPs dumb pipes for the internet. That is they make no decisions about what a user can access. THIS. IS. A. GOOD. THING.


IF

That is what they do.

The current malestrom of debate around mostly boils down to whether or not folks believe the FCC will truly forbear (waive) the vast majority of Title II regulatory requirements in order to focus on this rather important issue.

But the internet already works, how can this be anything other than a needless government power grab, or Obama over reach etc... ???? Glad you asked.


Let us talk about some examples of poor behavior in the business practices of ISPs with regards to the internet 'working' and this concept of Network Neutrality.

Corporate E-mail vs Private e-mail:

Back in the dark days before smart phones where a 'cool' thing we had an interesting state of affairs when it came to accessing e-mail on your phone. Work e-mail was different from personal e-mail according to mobile internet providers. To access your corporate e-mail you had to sign up for a corporate data plan which was more expensive. The technical differences of accessing Corporate e-mail vs Personal e-mail was.... anyone? anyone? Nadda, zip, zilch, zero, NOTHING. Yet one required a more expensive plan to move bits round between sources and destinations of internet traffic in precisely the same way as the other. This is an example of a non-neutral internet. This is not a post FCC ruling thing folks are worried about. This was, in some cases may still be, a reality of mobile broadband service offerings.

Tethering:

Current business practice of ISPs is that tethering your phone to another device for the purpose of that device to access the internet (ie use your phone as a wifi hotspot for your laptop) requires an additional charge over you basic access charge. This means you as a user cannot decide to use your (insert bandwidth amount of your choice within the limits of your plan) how you like. You MUST pay extra to use those bits to send data to your laptop. Again, in terms of the service provided to you on by the ISP there is ZERO difference between bits that stop at your phone and bits that stop at your laptop. This is a current example of a non-neutral internet. This is not a fear of something to be added post this FCC ruling. It is a fact of life for millions of US smart phone users.

App/File Download Limits:

Ever gotten a message when purchasing an app or downloading a file where it says something like "File to big, you have to connect to WiFi"?. So if you have paid for 5GB of data and you want to download a 500MB  (or 10% of the amount of bandwidth you paid for) why can you not do it? Again this is not a state of affairs people are afraid this move by the FCC will cause. It is a current reality\limitation imposed by Mobile internet providers. Again this is an example of a non-neutral internet.

Service Blocking:

Apple Facetime was not allowed on mobile networks by both Verizon and AT&T at launch. Numerous other services have faced a similar fate. Often terms of service of broadband providers has a clause about 'streaming' content. You know like Netflix video, Pandora Radio or pretty much the most common kinds of things folks use when accessing the internet. Do you know what the technical difference is between download 1GB of data and "streaming" it in terms of the ISP system? If you guessed "nothing" you would be correct. This is another example of how ISPs restrict your ability to utilize data allotments you pay for. This is an example of how we currently do NOT have a neutral internet.

Throttling of Unlimited Bandwidth plans:

Beyond an arbitrary limit it is standard practice to throttle users with unlimited plans to lower rates. That is you pay for a service that says it is unlimited and then they introduce artificial performance reduction once you past a number (5GB is a common threshold). If someone pays for an 'unlimited' plan is it fair to artificially limit their level of service because they actually use it as 'unlimited'? Balancing user load is a core function that must be managed by ISPs. When there are to many users and not enough bandwidth to go around it is ok to reduce service across the board in order to continue providing service to all users. It is not fair to single out users based on how much or how little of their plan they choose to use. This is yet another example of how we have a non-neutral internet now.

How does this move help? 


These examples all have something in common. They are cases the FCC has already been pursuing against broadband providers on the behalf of users. They are all cases at the ISP level and related to ISPs trying to differentiate between the various types of services being used by a customer instead of treating all passage of internet traffic as the same.

To boil it all down as far as I know how you have to remember a very fundamental thing. No matter what you are doing with your internet connection, in the end it is all about moving 1's and 0's from one point to another. Net Neutrality is about making sure 1's and 0's move equally regardless of what requests/services etc... are driving them.

To make matters worse in many cases the ISPs have competing services. Take Netflix vs say on demand content provided by Comcast or Comcast partners. Comcast has a vested interest in having customers paying for their on demand content vs Netflix content. There are numerous documented cases where Comcast (and other ISPs) artificially limited customer access to services like Netflix where no similar constraint was placed on access their on demand (or that of a favored provider (read Netflix competitor)). This is a classic conflict of interest where the FCC seems intent on making sure that providers are not allowed to pick which services to support. Without Common Carrier status imposed on them there is no legal reason why Comcast cannot chose to deny a particular service, or worse, sabotage them. The particular case of Netflix is one worth a post on its own as it does a good job bringing up a lot of the complexities involved in this debate. Here is a taste. If Comcast reduces service levels of Netflix traffic at the same time it increases/prioritizes traffic to its own On-Demand content who do you think the customer blames when their netflix stream doesn't work (or works poorly) and the other content runs without a hiccup? Is it fair for Comcast to not inform their customers they chose to intentionally lower Netflix traffic capacity in such a case?

Why do they think they have to regulate it now?

The FCC has been trying to enforce the idea of a neutral net for many years. Had the ISPs made moves and changed practices to uphold a neutral internet service it is likely the FCC would never have passed a rules change to re-classify them as title II common carriers in order to have the necessary legal powers to force them to behave. Put another way, for about a decade now the FCC has been counting to three like a parent trying to get a misbehaving child to correct themselves before more drastic action is required. They didn't, and the FCC reached 3. 

Don't get me wrong. I am not a fool to think more government intervention is a good thing. I am by no means thinking the FCC should be given a blank cheque on this issues. So long as they stick to what they have already been trying to enforce and do not start making Chinese government (or UK for that matter) type of noises about internet content I think this is a good move. I look forward to the release of the full draft of changes so that a more educated debate of its merits (or flaws) can be had.