Python PIC useful when attached to a computer

[Richard] sent in a link to the Python controlled microcontroller he’s been working on. Unlike the previous portable Python boards we’ve seen, [Richard] thinks his pyMCU isn’t best used autonomously. This board is meant to be used only when connected to a computer and to serve as a bridge between the digital world of computers and our analog world.

We’ve seen boards running lightweight Python interpreters, but we’re fairly intrigued by the idea of this board only being useful when plugged into a computer. The on-board PIC 16F chip has enough digital, analog and PWM pins to just about any task imaginable, and there’s also a 16-pin LCD display header if you’d like some output with your microcontrollers.

[Richard] says he’s been working with PICs for longer than the Arduino is around, but depending on the level of interest he’ll consider developing an Arduino version of the pyMCU. All we know is that the pyMCU would be awesome to teach electronics and programming to the younglings, and we could certainly find a few more uses for the board when they’re done with it.

Comments

  1. macegr says:

    Richard should consider using an 18F series PIC with USB. Not only are they better chips overall, but you can throw away the expensive FTDI chip and end up with a single chip USB solution. Microchip has CDC firmware available you can use as-is.

    • AC says:

      I know this is a super old story at this point, but I missed it the first time.
      Anyway, if you are only going to use the PIC built in USB for CDC (virtual serial port), and you have the board space, it would be much easier to just keep using the FTDI chip. The CDC code takes up about 1/3 of the memory space of the whole chip right off the bat. Now if you have plans of mass storage, or HID or something, then ya, go with the built in USB. Else be careful that you’ll still have enough memory after the CDC code. It’s not as easy to interface with as the UART either.

  2. GameboyRMH says:

    Sounds similar to Phidgets or Pololu’s USB servo controllers.

  3. DanJ says:

    I think this is a clever idea. A transparent multi-purpose hardware port for software running on a PC. Another HAD post that will make me spend money…

    I do agree with macegr’s point. The FTDI chip seems to be less&less necessary. FTDI should drop the price of this chip dramatically. It is stupidly pricey.

  4. Welsh Mullet says:

    Raspberry pi usb sensors anyone?

  5. Willrandship says:

    So, this = USB GPIO converter with a python interface? I can see tons of uses for that, esp. since it should be a tad cheaper than a duino, so it’s great for large-scale implementations. ($10 vs $30 is a big difference for, say, a classroom)

    • Daid says:

      Stick an AVR on a board with V-USB and I can get you an USB-IO expander for less then $10.

      You would need:
      -ATTiny2313
      -USB connector
      -100nF cap
      -3x resistors
      -2x 3.3v zeners
      -12Mhz crystal
      -Small PCB to put it on
      Total price, around $5

      Gives you 13 IO pins I think. Upgrade the ATTiny2313 to something larger for more pins.

    • ScottInNH says:

      $10? I click the link in the HAD excerpt, and the pyMCU store has it for $24.

      While I feel Python’s a great learning language on PCs (and it would be “great” if the Arduino IDE supported it), I have to point out you’d be losing a lot in terms of “ecosystem” if you went with anything other than an Arduino platform.

      As for cost, the ModernDevice.com RBBB Arduino _kits_ are $11 each in QTY of 10. You can have another class or volunteers assemble them. Pre-assembled though, the RBBB is still $22 to $25 each QTY 1 (there’s no listed price for QTY 10, but I bet they’d give you a break on quantity.. Paul’s a good guy like that)

    • Richard says:

      I’d be willing to work out an educational deal, contact me on the pymcu website and we can discuss a price break. I’m a big supporter of education, that was part of the reason for developing pyMCU in the first place. I’m in the last week of teaching a 5 week class at work in which I wanted to teach an introduction to the microcontroller and programming, the guidelines were that I could only use what was already installed on the teaching lab computers and most of the students had little to no programming experience. I thought about Arduino at first but that would require installing additional software (plus the really old version of linux they had did not have the right libs for the ide to work) also I thought c++ might be a little much to teach to beginners on top of the electronics stuff. I had taught a python class a few month earlier so I thought if I could tie into that it would make for a good building block on top of that class. So far the class has been going so well we are going to extend it another 2 weeks to have fun doing some more projects.

  6. Chris Allick says:

    Wow! I will absolutely be writing tutorials for this device. Just ordered one. Cannot wait to write some HTML5 websocket examples and show kids how to do realtime web applications reading for the hardware.

  7. markS says:

    Connecting this up to a rasberry pi seems like a most excellent idea…

  8. mlr says:

    I think this is just a Python front end on your PC, and some software flashed onto the µC that takes commands from the front end to do typical µC stuff. It does not look like this is Python on your µC. So if he published his protocol, you could talk to it from any language. Kind of cool.

    • Richard says:

      That is correct, you run python on your pc and use it to control the pyMCU hardware module. It is not python on the MCU. I haven’t published the protocol yet but the pyMCU python module that you install to use it is the full .py source code so if you are familiar enough with python you can go through the code and get the various serial commands out from the functions and make it work in any other language. I’ll try spending some time over the next few weeks putting together a proper documentation of the serial protocol.

  9. robotblog says:

    Interesting, it’d compliment the Raspberry Pi well, once they’re finally available :)

  10. HackJack says:

    Just use an arduino :)

  11. Bogdan says:

    With good design something like this can take place of the old parallel port that was easy to control and had many uses.
    I wish this would get more advanced and somehow merge with the bus pirate. I could use something like the bus pirate that had more pins and other functions.

    • Fabian says:

      A time ago i was reading a pic18 datasheet, and it says that was posible to control the PSP of the PIC directly through USB(no the same way as you can write a firmware and control the pins) like a LPT port

  12. abs says:

    Please add a version with 12bits adc.

    This things are very useful for lab use. I think that for “slow” speeds this kind of things are far more useful than any pci board controlled by labview.

    • smoker dave says:

      Please add?

      Come on man. This is just a PIC and an FTDI chip. You can make this yourself in one morning using less than £5 worth parts…

      • abs says:

        Protocol… the cleaver part of this design is the python library. Of course that I could program a pic or avr to do the same and after that I could program a python interface library… the programing part takes a bit longer than a morning.

        For simple things I have already used one arduino, just like that, a small program that takes commands and a some python functions to do the interface, this is a easier route.

        This is far more simple to use.

    • smoker dave says:

      I state again, this entire project can be made in one morning. Even including all “protocol”.

  13. Chris Allick says:

    The contact page is not working :(

    Also, What I like about this is that it does not care about running python on the chip or not, but you program the chip with python. This is really my dream. I’d love to have kids open up a text editor or terminal and start typing python and then flash the arduino or maple or whatever.

  14. Gopi says:

    I was looking for a cheaper solution to the LEGO WeDo USB Hub: http://www.legoeducation.us/eng/product/lego_usb_hub/1655

    This would be perfect…Wish the cost comes down a bit more considering Raspberry Pi is $25 :(

    • Richard says:

      Yea I would like to be able to make the price lower, raspberry pi is a non-profit a lot of the effort has been donated time and resources and they are either making about $1-$2 dollars profit off the board maybe more since they can get it made in huge quantity, unfortunately I’m just one guy building something I think is useful and others have found useful, it’s a lot of work to put everything together, update ,support and debug it, create documentation, fulfill orders and so on. Even Arduino Uno’s are around $25-$30 depending on where you buy it. If you feel the work I put into this product is not worth it you are more than welcome to come up with your own solution, I’ll even help you out if you have any technical questions, I encourage everyone to learn and try building new things. For those that just want an off the self solution I’m doing what I can to help out in that area and not go broke in the process.

      • Gopi says:

        @Richard: You did a good job on this. btw..i did order one yesterday. Thanks for shipping it to me. You should do a mass production to cut costs. This little puppy has lots of uses..esp if it can work on its own with battery power :)

        btw..I was not trying to underestimate the hardwork you put into this. Am sure it involves more than i can handle :)

      • Richard says:

        Sorry that wasn’t all meant for you, I was kind of ranting in response to some of the earlier comments talking about making the whole thing for £5 and do it all in one morning, that’s a little ridiculous.

  15. cgimark says:

    @Richard
    Don’t let the naysayers get to you. I think you have a wonderful idea here. Have you tinkered any with using it with other pic variants ? They just released the pic32 chips in DIP format and those have USB support as well if needed as well as a lot of the same ports and some new ones.

    I myself am trying to get a project going and people that have not done it before don’t realize the problems you have being one person trying to bring something to the community.

  16. cgimark says:

    @smoker dave

    If you are so good at programming pics then lets see your python enabled chip , you have 5 hours to post it, you did say one morning.

  17. cgimark says:

    The thing people are missing about using a chips native USB is you need driver support in the OS. USB drivers are a pain to implement for some OS, winx64 being a big one. You end up relying on the developer to keep the drivers updated or relying on CDC drivers and using another vendors ID . FTDI chips do have one thing going for them and that is driver support to most OS and updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,416 other followers