Saturday, February 8, 2014

OpenMV Update: MicroPython, More I/O, uSD and Lots of Other Things!

Time for another update, sorry this took me so long, I've been very busy working on OpenMV, the good news is I have lots of new features implemented! There's a new (smaller :D) hardware revision with more I/O (USART/I2C and SPI) and a uSD socket, MicroPython support, an IDE for the camera, and for those of you who have been wondering, I'm working with Michael Shimniok from Bot-Thoughts on doing a Kickstarter campaign for OpenMV, soon, hopefully, you will be able to get one for a very reasonable price :) so stay tuned!

Okay, so on the software side, you've probably heard of the MicroPython project, if not make sure to check it out, basically MicroPython is very efficient, lightweight Python VM for microcontrollers, the plan was to script the camera with Lua/eLua but MP has some really neat features already implemented, so long story short, I've decided to script the camera with MP... after lots of work, I managed to get MP running on OpenMV, and wrote some MP bindings to export the subsystems of OpenMV to Python, eventually it will be completely controlled with Python.

So how this works so far, basically, on reset OpenMV runs a default Python script with the old serial camera interface (receive commands from the serial port, process and return result) but it also shows up as a small USB storage device where you can copy your own Python script(s), reset and it runs that instead of the default script.. In addition to that, you can also "talk" to the camera directly using a Python shell over the com port while watching the framebuffer in realtime :)

I've also combined all those nice features into a single "IDE" for convenience, written with Python, PyGTK and PyUSB. The IDE has a Python shell, a framebuffer viewer, and it can run scripts or save them to flash:


Moving on to the hardware, the new revision is 1.0x1.30 inches, it has a tiny uSD socket (which will be available to Python user code) USART, SPI and I2C broken out on the main 2.54mm header and a separate 2mm SWD debugging header.. There's also a switch, which will be used for boot or reset.
Here are some pics of the 3rd (2nd?) revision:



Compared to the old one:



That's it for now, please let me know if you have any comments :) thanks!

18 comments:

  1. That is awesome and tiny! I want one... What's the little square chip on the bottom left corner?

    ReplyDelete
    Replies
    1. Thanks :) the chip is the regulator, 200mA triple LDO (3.3V/2.5V/1.8V) ADP322

      Delete
  2. I want one too!

    How the heck did you solder that thing!?

    ReplyDelete
    Replies
    1. OpenMVs for everyone soon :D.. I soldered the first one manually, it took a lot of time and heat, the last one I used a stencil for the bottom layer, oven, and then syringe/hotair for the top layer, my current setup can't handle two sided PCBs :)

      Delete
  3. Is there any code base commonality between OpenMV and OpenCV? I understand OpenCV requires a full blown linux platform, so it'd be nice if some of it's features could be extracted!

    Also is it possible to leverage what you've done onto the Pixy? Or is the Pixy platform too much of a closed sandbox?

    ReplyDelete
    Replies
    1. no, but the Python API is adopted from SimpleCV's API, it's possible to run the image code on Pixy, but I don't think MP is ported to Pixy.

      Delete
  4. Do you have any thoughts on the other microcontroller based python implementations?

    Ex. Pymite/p14p/python-on-a-chip, or the successor owl?
    https://www.usenix.org/conference/atc12/technical-sessions/presentation/barr

    ReplyDelete
    Replies
    1. no, I haven't tried any of them.

      Delete
  5. This is fantastic!

    Do you have the hardware or software accessible somewhere, github? I understand that you'd like to do a kickstarter (and I'd gladly support it) but it would be nice if those of us who are particularly motivated could print our own boards.

    Thanks!
    jay

    ReplyDelete
    Replies
    1. Thanks! yes, everything hosted on github, the last tested revision is REV3:
      https://github.com/iabdalkader/openmv

      Delete
  6. Very nice project, I wonder that can you give me a tip how to set-up the Micro-Python for OpenMV ?

    ReplyDelete
    Replies
    1. Do you have any specific questions ?

      Delete
  7. Hi

    This is a great project. Congratulatins.

    I was particularly impressed with the inclusion of micropython. Some quick questions aboit micropython integratiom on the board:
    - can you currently access and control the uart and spi through the onboard python?
    - is there access to load and parse more python code frommfiles on the microsd? (for example running an onboard bootstrap script that loads larger or dofferent python programs stored on uSD)

    Thanks,

    ReplyDelete
    Replies
    1. Hi,
      yes, you have access to UART, SPI, I2C, GPIO from MicroPython and you can load scripts from the uSD or internal flash, there's no need for a boot script anymore.

      Delete
  8. Fantastic Project!

    I'd love to see this as a product that I could buy!

    ReplyDelete
  9. Hi,
    i redesign last version to 2 layers pcb - can send to you or publish Cadsoft Eagle files.
    Thanks for your job!

    ReplyDelete
    Replies
    1. interesting! yes please send me the files or links, I would like to have a look :)

      Delete
    2. Not a problem. Download at the end of post
      http://akb77.com/g/stm32/openmv-2l/

      Delete