Modules for the Omnii family

Modules for the Omnii family

  • I've been thinking about developing a module for the Omnii family for a while now.  The idea started as a flashlight end cap way back when we first launched XT10, this has been much talked about since by others but as far as I'm aware, nobody actually did it.  I thought of other modules too, like a temperature sensing probe for use in cold chain to check core temperatures of boxes but I think there is something better and I'm going to actually do it this time!

    There is a great amount of activity online around the Arduino open source prototyping platform and a lot of projects based on it.  I am going to use Arduino as "middleware".  This should give me access to manuy useful open source projects that already exist and with some small changes I plan to make Omnii the output device.

    Some really good projects I've seen using Arduino that would be interesting to play with include a number that are healthcare related like the Pulse Oximeter, environmental sensors like a geiger counter and various temperature and humidity sensors.  There are so many projects out there that it just makes sense to have a go at doing this in my spare time.

    So, I'll be starting this project on IngenuityWorking and no doubt I'm going to be after some help along the way! Smile Electrical engineering is not my day job so I hope to show that creating something for our devices isn't too hard to do when you have the community... we provide all the HDK documentation publicly and I'm only going to use whats available to me through this community.  I'm not going to cheat by going to see our electrical engineers around the office!

    Ultimately I hope this crowdsourced solution opens the door to a bunch of quick customizations to the Omnii platform!

    I will be looking at my options this week but my first impressions are pointing me towards the Arduino Pro Mini as the PCB of choice.

  • Cool! I'll definitely be paying attention to your progress Lee.

    Good Luck!

  • Hi Lee

    I did a small project with the Arduino and the Neo WA3006 battery check it out on the internal Wiki.

    Rafay

  • Rafay, thats awesome - I took a look, I'm sure you'll be helpful to me later! Smile

    Tonight I took the plunge and ordered a couple of Arduino Pro Mini's running at 3.3 Volts (8MHz).  I never mentioned in my previous post why I chose the Pro Mini over other Arduino's, well its for a couple of reasons.  I chose this because Omnii XT10 provides a 3.3 volt power supply for low power interface logic limited to 100mA current (ref: HDK section 6.4.1 Expansion Port Power).  Another reason is a lot of common sensors run at 3.3 volts anyway so this could make it a little easier to start off.  Finally, the mini board is pretty small!
    Although I couldn't see anything specific to the draw of the Pro Mini on the manufacturers pages, I found a link here that makes me believe I'll be well within the limit of the option I've chosen for now (XT10 also provides other power options and you could in theory get up to a maximum of 2000mA if you needed it...).

    The downside of the Pro Mini is the lack of connectors out of the box compared to other Arduinos making it a bit harder to work with.  That meant another item on the shopping list - an FTDI cable to allow me to program it.

    Should have the order on Thursday which means there won't be much progress until then.  The first job will be to get the board communicating with the XT10, some simple logic and an LED should suffice for that.

    More later in the week!

  • This should be an interesting process - hopefully it will help us learn if there are ways we could improve the HDK in the future, at the same time as having some good geeky fun.

    It would be really cool to connect up a geiger tube to an Omnii, and then use the GPS to log and map all the hot spots around the Fukushima reactors - could help reduce the cost of the clean up if a map of where the worst contamination is, rather than scraping the surface off of the entire exclusion zone!

  • Adrian Stagg

    It would be really cool to connect up a geiger tube to an Omnii, and then use the GPS to log and map all the hot spots around the Fukushima reactors - could help reduce the cost of the clean up if a map of where the worst contamination is, rather than scraping the surface off of the entire exclusion zone!

    I'll let you demonstrate that Adrian Indifferent.

    Anticipating my order arriving tomorrow, I was doing some more reading and found this little gem related to the 3.3 volt FTDI cable I have ordered: "Originally, the cable was designed to have 3.3V VCC, however something was lost in translation between SparkFun and our supplier and we got stuck with a whole bunch of  FTDI cables that have a slight mix up in wiring. These have 5V VCC, and 3.3V I/O. The 5V Vcc output shouldn't be a problem unless this cable is being used to power a sensitive circuit such as a sensor."

    Just something I've got to watch out for I suppose once I get beyond XT10 and Arduino communication Smile.
  • Quick update - yesterday I received the parts I was waiting for.  My wife was very happy to see me arrive home and commandeer the dining room table with everything.  I promised I will not do any soldering on it!  Now, whilst I'm thinking about soldering, one of my colleagues mentioned something very important to me yesterday. 

    Psion is a lead free environment and much (probably most) solder used at home is a mix of lead and tin.  Even some new irons today come with a small amount of traditional lead solder as I found when looking for a new one.

    If I were to use my current solder and iron on this project and then bring the board into the office and make a modification, I could contaminate our working environment - I'd probably get into serious trouble too, and rightly so.  Therefore, even though I do not plan to make any changes at Psion I am going to buy a new iron and some lead free solder - that way no matter what, there is zero risk to the company even when I bring it in as a completed project (fingers crossed!Smile).  I'll also be doing my bit for the environment of course!

    The other thing I was very fortunate to get hold of on loan was an Omnii development breakout board.  You will see this in the HDK documentation and they are available from Psion.  This board does make the prototyping process easier because all of the connections are expanded out and easy to connect to - but it is not required to develop for Omnii.

    This weekend should be fun - lets see how I get on!

    Here's a couple of pictures of my ingredients:

  • Weekend progress report...  My little project has taken the back seat as job number three as currently during the day I'm a full time Psion employee and at night a painter and decorator.  I really dislike painting and decorating and therefore unfortunately for my wife I might be spending a lot more time in the office this week! Wink.
    All of that means I've not had as much time as I would have liked to spend on this, however I have made progress.
     
    Arduino
    I have successfully written some code for the Arduino that it will send over the serial connection!  I tested this using the FTDI cable and monitored it using the Arduino software serial monitor.  It doesn't do much but the Arduino has a voice (well, it says "Hello Psion Omnii XT10" once per second) Smile.
     
    Omnii XT10
    The Omnii needed to be configured with some registry keys so that it would recognise my expansion device.   As I was using the UART serial connection, there are specific options that you need to provide for the HDK demo app to work.  These settings allow Omnii to load drivers it needs to handle your new hardware...
    That HDK demo application that might become a real saviour (a great job whoever wrote it).
     
    HDK breakout board
    I set up the HDK breakout board and configured all of the jumpers required to use the UART-TTL connector (J11 if you have one).  My Arduino is a 3.3v one so the jumpers were set to pass 3.3v rather than the 5v option.
    One of the requirements for any addon that you develop for Omnii is an EEPROM that contains the manufacturer and model name/number of the expansion device.  It is used so that the Omnii knows what is connected to it and can load the appropriate drivers in the OS.  I didn't realise because I can't have been reading properly, but the breakout board actually contains one of these - woohoo!  Saved me the hassle of more sourcing and soldering Smile!
    Once you fire up the demo app and select the expansion port you are connected to, the breakout board comes to life with some LEDs depending on your jumper configuration.
     
    Putting it all together
     So having all of this working, whats next, oh yes, connecting the Arduino to the breakout board.  Easy right?  Would be, but I'm short of kit at the moment so I had to make do with some ingenuity!
    I don't have the right pin connectors to do what I'm up to, so had to think outside of the box here.
    But first, I have to plead with the electrical guys that see this: I'm sorry.  I'll do it properly later this week when I have ordered more parts, promise!
    I stripped some wire and then used a small heat shrink wrap to cover the wire.  It was just the right size that it connected tightly to the appropriate pin on the breakout board when I stick it on there.  As it was tight it made the electrical connection I needed!  I think a picture so that you can appreciate this work of art is in order.

    I connected the arduino to the special connector that I made and held my breath.  I was waiting for some smoke or an electrical burning smell the moment I opened the HDK Demo app and clicked Connect....
    The LEDs lit up on the breakout board and the little red LED on the arduino glowed.
    I clicked on the UART tab in the demo app hoping to see my little arduino saying hello.

    But no, nothing.  Just an error in the Demo app saying that it was "Unable to open the port".  What a disappointment. Crying I think I'm so close but I've clearly missed something so now its over to the community.
    Its worth noting that I've not configured it exactly how it "should" be.  I am not using these pins on the UART connection as I didn't think they were required:
    J11 Pin 4 - UART_RTS Request to send
    J11 Pin 5 - UART_CTS Clear to send
     
    I am using RX and TX (which are connected to TX and RX on the Arduino).  HDK_VDD connects to VCC on the Arduino and GND to GND on the Arduino.
     
    Any thoughts experts?

  • Hi Lee,

    Check your registry values - make sure that you have the expansion port configured as a UART by setting the correct value for LoadFlags: Note that table 4.4 which describes the Registry Values for LoadFlags describes which bit needs to be set in the LoadFlags binary Word, not the absolute value you need to set.

    I.e. UART would be 0x01 in hex

         USB would be 0x02 in hex

         USB OTG would be 0x10 in hex

    Also, make sure that the baud rate on the Arduino matches the baud rate the demo app is expecting. The baud rate is hard coded in the demo app - if you need to change it, you have all the source code you need :)

    Cheers.

    Adrian.

  • Adrian, you nailed it.  The issue was with that registry setting!  I looked at the code samples in the HDK and then looked at the table you mention and set the value based on the bit - not the decimal (hex isn't accepted in the registry editor I was using).
    I spent some time last night working through things and it was driving me crazy, however, I did find some other things that weren't right.  One was a registry setting "ConnectorId".  I had incorrectly set this to 0 which is Expansion Port 1 because I'd misinterpreted a line below it in the HDK that reads:  "If this field is not specified, the device will be recognized on all logical connectors with the same Connector Type (e.g. if the Connector Type of the device is 0, it will be recognized on all expansion ports)."
    So by changing the ConnectorId setting, on a reset I suddenly had power to the expansion board that had not been there before from the beginning.  What then clicked for me was by fixing the registry setting, suddenly the Omnii was taking note of the "PowerMode" registry setting that it was previously ignoring on power on.
    After all of this, I'd say we could possibly change the HDK documentation to make it a little easier. When referencing settings, don't just provide the hex value but include the decimal value.  I'd personally scrap the "bit" value because they aren't used and therefore just confuse because they are 1 number out!
    Tonight I've written a small .NET app that uses the SerialPort control and have been able to communicate with the Arduino.  I can provide it values and it can respond and send something back.
    Proof I hear you ask?  There's nothing like a video and this really simple demo says enough I think…. Smile

    All I need is the community help me with a sensor choice.  What shall I do with this?  Lets have a quick vote!  Let me know below what you'd like to see – here’s some examples:

    • Compass
    • GPS
    • Accelerometer
    • Gyro
    • Temperature
    • Humidity
    • Light

    Now I said that I was working on another household project right?  Well, I'd better get back to that because I've spent nearly three hours playing with this.  It’s massive progress, a huge milestone and it gets easier from here as well.  That calls for a drink!  Cheers! Beer

  •  In the spirit of your last line, I'm thinking that you should develop a combination pressure/light/temperature sensor embedded in a beer coaster that can help notify you when your glass needs to be refreshed! (automatic messaging to the bartender optional) Beer

  • Hey Lee,

    This is great. Indeed, many development efforts start with simple characterization tests and, in fact, that is why so many electronics manufacturers offer eval kits where a few components are mounted on a simple PCB with some break-out connectors.

    What is a bit surprising, though, is that all your posts have generated almost NO responses. Is everyone too busy replicating your experiment in their lab, maybe? :)

    Or, maybe, it is not easy to find your post? (but that does not seem to be the case since there have been nearly 600 views).

    Strange,… isn’t it?

    John

  • Indeed it is John and I promise I haven't clicked in here 600 times! Smile

    As much as Robs suggestion is... well... interesting, I didn't really have that type of thing in mind!  (Rob, give me 30 bucks and I'll make it for you).

    Any other suggestions?

  • Well, Lee, maybe we could use Rob's idea as a starting point (the main focus of Rob’s idea being about beer) and come up with something a bit different.

    For example, you could scan the barcode on a beer bottle to determine the brand (requires internet look-up) and then display the brand on the Omnii screen. Next, you could use a temperature sensor that is hooked up to the Arduino and read the beer temperature. Depending on the temperature value, you could display “Cold” or “Supercold” (if the beer is a Coors, or something else for a different brand). All this will require a bit (understatement?) more coding but might be a cool (get the pun?) app.

    Maybe someone else in the IW community has a better and more practical idea… :)

  • My first vote is still for a geiger tube, but I suppose we should do something which can be easily tested first (How would you know that your geiger tube design was working without endangering yourself?), so maybe we should start small, and go for a simple [boring, but easy to verify] temperature sensor.