About

10/31/12

More Rover 5 building

Got some new parts today from Robonor: (ty for quick shipping!)

* 9V to barrel adapters
* Breadboard buttons
* 10 and 50mm standoffs
* Breadboard cables
* Breadboard

Now I can mount both my Uno and Mega with separate breadboards on the Rover 5, and power them both from 9V, as well as having the built-in separate battery pack for the Rover. With two breadboards, I can now add more buttons and sensors too :)

The previous version of my Rover OS used a potmeter for menu selection, so this will make it a lot easier.

Now I just need to wait for some supplies from Robosavvy in the UK....

1 x IR compound eye 
1 x Dagu - 4 Channel DC Motor Controller with Encoder Support 
2 x SparkFun - Optical Detector / Phototransistor - QRD1114

....which should be here in around 2 weeks or so :) Then the Rover will actually be able to run!

Mean while, I have a ton of literally screwing around to do to get the optimal design and layout.

10/29/12

More Rover 5 progress

As you can see, short stand-offs are too small to mount the servo in the hole.

This is as far down as possible with battery mounted

So while there are still nothing moving here, I'm working on a little OS to control the rover. It will be a breadboard button system:


Here the two buttons are essentially a
2-button keyboard for my Rover 5 OS
Menu selection using a potmeter!

OS screenshot
Clicking button 1 will activate temperature readouts to the LCD
Clicking button 2 works as a 'back' button

Pre-broken pushbutton from the Sparkfun Inventors Kit.
I still managed to get it working with some creative wiring :/


Here's the setup so far. It's basically half the SIK projects on the
same breadboard, all rolled into one 7K 'OS'
As you can see, that is all on an Uno, using all digital PWR but #7. So I just moved the project over to my new Android Mega ADK board, and it worked just the same. Both the Uno and the Mega will run the Rover eventually.

10/28/12

Working with Rover 5 and the top plate

Helping hand is configured as low as possible...

...low enough to keep a card in position over a 10 standoff


Tape over reserved holes, these are for mounting on the Rover

Now basically just move and twist whatever you want to mount and
have something that shines from behind so the holes will light up.
Tape will cover holes you can't use! 



So here's a motor controller, an Uno,a Mega and the whole baseblate + breadboard
mounted on a Rover 5

10/27/12

Android Mega ADK test and design work concept

Here's some stills from booting up the CM9 modded S2 with an DFrobot Android Mega ADK (2560)

Haven't tested it yet, just installed the driver so far.
It appears to work and blinks green on boot and reset.

Rooted Galaxy S2

DFrobot 2A dual motor controller

Cyanogen 9/4.0.4 S2 with a 2GB SDcard

Robot top plate mounted on Rover 5 on some stand+offs

The shape of things to come....

Bad DFrobot 2A Dual Controller

When it was time to mount find a place to mount the spacers to attach my new 2nd controller, I discover it's a defect one that is cleary thrown together in a hurry. I have mailed my retailer for a response :D

All the explainations are on the album on http://imgur.com/a/M1Uh4

The good news is that some guy on the sparkfun forum says i'm probably right on the wiring setup as long as the controllers can take the required 2.5A. These are rated for 2A but my retailer recommended me these. I have already ordered the Dagu board. When that arrives, I have other plans for these controllers. (Probably for eye/sensor array arms or grabbing mechanisms ?)





10/26/12

Setting up an Android development environment

Books to read

Apress, Beginning Android 4 (2012) - Comes with source code available here
Although it says it's for Android 4.0, the book uses 2.2 but also tells the reader how to adapt to frameworks you don't actually develop for. Very clear and informational, and had me writing code in just a few minutes.

Addison-Wesley, The Android Developers Cookbook (2011)
Has the same clear style as the above one, with simple XML snippets and the code to support just that. I don't like tech books that wants you to build a huge application, when all you needed was an explanation for how to use a certain GUI element on page 76.

Software to get

Decide if you want Eclipse SDK 3.8 or 4.2. The 4.x series will eventually be better, but 4.3 won't be out until June 2013. 4.2 has a new internal UI engine. Meanwhile, the 3.x series is more than sufficient and also very fast. I also  keep my OS on an SSD drive, and my development stuff on a RAID0 disk. That does help when you are dealing with large Java environments. 



Setting up the environment

Download Android SDK here. This is the toolkit needed to link Eclipse to you Android phone, or to start up an emulator. You can set most Androids up to push debug messages trough the USB. These messages will appear in the debug console in Eclipse. This is generally not needed during normal app development. If you look trough the log you will see hundreds of notices about battery state, memory and the likes.


From the SDK Manger, you can download the API's and tools you want to target for. Some of the API's for the more esoteric phones require that you have a login at their respective manufacturers development network. You can safely cancel the ones you cannot download.


In the AVD (Android Virtual Device) Manager, you set up virtual machines that emulate the platform you want to develop for.

You create the project in File->New->Other->Android Application Project.


Now, all you have to do is to make a Run-configuration for your Android project. 


If you got this far, you should pretty much be able to run a skeleton application on your own USB connected phone 

Hardware and specs

I use a Samsung Galaxy Xcover GTS5690 for development. That is pretty much an S2 stripped of a CPU core and has less memory and smaller screen (a 'medium' class screen in phone terms, 320x480 or 480x320 rotated). Some programs even identify it as an S2. This phone has 512MB RAM, single core Marvell ARMv7 @ 800Mhz and a Marvell GLES2.0 chip as well as some yet unknown hardware for video playback of some formats. I have a 8GB SDcard stuck in it as well. 

While not high end, a quick survey among friends suggest the 2.x series Androids will be around for a long time. Samsung is even still making BIOS updates to this phone as this were written, and a mid-end dev system could be a good exercise in resourse management. Many people out there has low-end older phones as well as mid-end ones.

Flexibility across devices

Android was written with the fact in mind that devices will be different, so it has built in flexibility to handle this. Some things can be done even better with minor effort from the developer, such as simply targeting for a higher level API will enable functionality for adapting to 4.x enhances features.

Targeting a 2.2 device would cover 93% of the market. It seems the 1.x series is pretty much obsolete. Also, the changes from the 2.x to the 3.x and 4.x series seems to be smaller compared to the leap that was from 1.x to 2.x. Not having developed on 1.x, I cannot say for sure, but telling from the literature, most of the features people were missing in 1.x got generously implemented in 2.x. 

Messing up is easy

It's really easy to mess up an Android project, so keep your CVS up and running.

Plans for dual controller Rover5

So this is how I plan to wire the 2x dual motor controllers. It might not work, still discussing this on forum.sparkfun.com. No one has replied yet :/


I am using two of these with an Uno, which should be fine since I'm not going to do step counting.

DFRobot 4.8-46V, 2A Dual Motor Controller

10/24/12

Update on Rover 5 project

Got some new wires, a "Helping Hand" and a 2A motor controller today. Which means I have the parts I need to get the Rover running on all 4 motors according to Robonor.no who recommended these two. I am going to need to get a some standoffs and screws to mount the Arduino and the two motor controllers. Here's some pic for today:
Rover5 with top plate mounted. I have no idea if i did this the right
way, but atleast it sits there. I have no idea how one are supposed to
get a servo motor in that hole, the battery pack is impossible to get
far enough down.

2A motor controller already hooked with the needed wires
Pan&tilt kit
Helping Hand, Comes prebuilt, very... handy..

Sortiment of screws and standoffs




10/21/12

Robot hobbyist laboratory

Heres's some pics of my new lab. Had to make a fitting space to build the robot !


Laptop dedicated to Arduino, with appropiate tools.
Multimeter, soldering, and about anything else need  to tinker!

Assembling Rover 5

Rover5 inside view, 6xAA battery pack and steppers



10/16/12

Sparkfun LCD 09351 and some LEDs


Hooked up the Sparkfun LCD. It is unflashed but for now it will have to do!

Some LED flashing too ;D

10/10/12

Arduino robot project

10/10/12


With the helpful guys at Robonor.no, I've ordered the following parts for my project:
Arrived in the mail today, UNO R3 from Robonor

Dagu 4 motor controller is on it's way from England!

I will eventually get the Rover5 4-engined robot, but as the Dagu controller card is hard to get, I have to put this on hold for a while. At the moment, I will have enough to do by going trough the basics! When the Rover is in place, I will get an Mega ADK board for my Android phone to utilize all the sensors.



I have ordered the Dagu controller from the UK along with an IR compund eye from RoboSavvy. I'll slip right under the 20 pound tax limit! This could take a cool 2 months 4 weeks though. (Seems he could speed it up a bit!?

Meanwhile,I'll get to program the Arduino controller and hooking up the LCD display.
Fun times!
Serial Enabled 16x2 LCD - Black on Green 5V

11/10/12


Got an old laptop from a friend for fixing his new one and installing games and a 'safe' browsing environment. Not too bad either, Dual core AMD Turion with 2 gigs and 256 mb shared gfx memory. Will probably install XP in this to use all the easily available Arduino tools, and run Linux in a VM to run electronics software.

Postal service reports that the package has been received and will probably end up here tomorrow afternoon :)

13/10/12



Picked up package today, everything was included as far as I can tell, except the 3-pin serial LCD, but i actually got a much better LCD with a mounted backpack, so this should be a serious upgrade! Thanks Robonor! Quick delivery too!


Graphic LCD Serial Backpack


Serial Graphic LCD 128x64

First testing footage

From the Circ-02 tutorial with 8 leds

Well, cannot complain, everything worked as expected!

14/10/12



Some connectors was badly soldered from the factory. Fixed that and now it should work. Pixels was all over the screen.



Some error in the manual it seems. It won't work from the 5.5v line, have to use Vin. Here you can see the Sparkfun icon!

Some software I probably need:
http://www.atmel.com/tools/AVR32STUDIO2_6.aspx



10/9/12

Rooting and modding Samsung Galaxy S2

If you just have to mess with your phone all the time and try out every option and setting, you'll probably have heard about replacing stock software with custom kernels and flashing in mods. This could expand battery life, give you new features and make your phone faster.

It can also render your latest phone investment as useful as a brick. Yeah, brick. That's what they call it when either you or some software you tried to run makes your phone shut down for good and it will never boot up again. So be warned, even though I am about to tell you how to possibly avoid it.

I DO NO TAKE RESPONSIBILITY FOR YOUR ACTIONS! YOUR PHONE IS YOUR OWN AND ANY OF THIS WILL VOID YOUR WARRANTY!

And don't try to be clever, the phone will tell your technician that you installed a custom binary. This feature is called the 'ROM counter'.


  • First of all, some phones are known to have a bad FLASH chip, and this includes most versions of the Samsung Galaxy S2, from what I can read. 
  • Personally I have the GT-I9100 which came with GingerBread 2.3.5. 
  • If you, like me, have Samsung Kies installed (if not, do that NOW) and updated the firmware, you will discover that GingerBread 2.3.5 will be updated to Ice Cream Sandwich 4.0.4.


At this point, download the following:


  • Siyah kernel - Will give you a temporary rooted phone. Get the correct version, and put it on your SD card.  (you do need an SD card)
  • ClockWorkRecoveryMod (aka CWM)


There is a particular problem that seems to come with the stock ICS 4.0.4 when you install the 'clockworkrecovery' mod. Therefore, first of all you need to root your phone to be able to actually check your phone. (with Siyah)



You also want the Google Apps extras


  1. At this point, you have to boot up into recovery mode, and wipe the phone and the cache. 
  2. Then, load this binary into the phone. 
  3. When it reboots, it will show you a yellow triangle below the Galaxy logo at bootup, and if you go to Settings->About Phone you will see that the kernel has been replaced. 
  4. If you forget to wipe the cache as well, the phone will not boot. (It is not bricked, just repeat the process.)


Then download an app called eMMC checker from the Play Store. Move CM and Google Apps over to the SDcard.


  1. Download eMMC Brickbug Check from Play Store
  2. Run check. It will probably say 'Insane chip: Yes' and then you must check the memory, for which you need to have the phone already rooted.
  3. If the memory check passes, your phone's flash chip is functioning well enough to flash the ROM, but it will still kill it of you skip to the CWM step now!


Note: Just to be clear, both the memory needs to be OK and the Siyah kernel must be installed or else you will have a dead phone before this tutorial is over.


  1. Boot phone into Recovery Mode. (Home + Vol Up + Power.
  2. Hold until logo appears, release keys.
  3. You will be presented with the recovery menu. Some phones has alternate combinations.

Lastly:


  1. Wipe and factory reset
  2. Wipe cache
  3. Install CM from SDcard
  4. Install Apps from SDcard
  5. Reboot phone


Now, when you reboot, the phone will be a completely different beast. Modded or not, the S2 and S3 are  formidable devices, featuring multi-core CPU and GPU processing, as well as standardized USB connectors, an array of special-purpose sensor chips and last, but not least, a Linux-based operating system to glue it all together. With the right add-ons installed, your phone is essentially a powerful hand-held computer that can be used for a multitude of uses. While the comparison  is not fair, I would guess an S2 outperforms 5 year old laptops.

I think this was everything. Please comment if I missed something.

Anyway, here's the result: