I love new toys, so you can only imagine my delight when I received one in the mail -- an EK2100 wireless evaluation kit from Synapse Wireless.
I have experimented with a few small microcontroller wireless systems in the past, but this one's a little different. The other systems I've handled come with some level of MCU code stack and are programmed fully within the MCU itself. The EK2100 is programmed on a PC using the Python language. The MCUs on the remote modules (or wireless nodes) can communicate with the outside world and/or other devices like MCUs or FPGAs via RS232, RS485, I2C, SPI, ESP, or regular general-purpose input/outputs (GPIOs), of which it has 19. OK, so the ESP (extra sensory perception) is a bit of an exaggeration -- the "extern void do_what_I’m_thinking()" command hasn't been coded up yet -- maybe in the next revision.
As shown below, the EK2100 kit comes with a wireless node that plugs into a USB port on your computer. (This is the board with the lit green LED in the upper righthand corner of this image.) The kit also includes a remote wireless node (the SN171 ProtoBoard shown in the bottom lefthand corner), a few discrete components for use with the provided tutorial, and a 2 x AA battery pack for the SN171 (shown in the upper lefthand corner). My picture does not show the kit's wall-bug power supply, also for the SN171.
The basic idea is that you write programs on your PC in Synapse's modified version of Python. You then load that code wirelessly into the remote module. You can also access the command functions directly through the IDE (which Synapse calls Portal).
To test this out, I went back to one of my earlier Papilio projects: running things in parallel. In that project, I used the Papilio Spartan 3E FPGA development board coupled with the switch/button wing (from the Gadget Factory). My implementation reads the state of a switch connected to one of the FPGA's input pins and writes the corresponding value to one of the FPGA's output pins. That output runs through a physical external wire to an input on the other side of the FPGA, which then flashes a light-emitting diode (LED) using logic inside the FPGA.
In order to test my new wireless device, I pulled the switch/LED wing off the Papilio and wired one of the Synapse SN171 module's GPIOs (GPIO 0) in its place. Here is the resulting setup.
Now it's time to see everything work with the EK2100 in the mix. As the following video shows, I bring up the Portal IDE. I select the "setPinDir(pin, isOutput)" function to direct Portal to transmit a message to the SN171 receiver to indicate that GPIO 0 will be an output. Then I use the "writePin(pin, isHigh)" function to set GPIO 0 to high. This replaces the wing switch previously plugged into the same FPGA input pin.
Including a power supply in the kit is a nice touch. It's pretty annoying to have to hunt down power for a new device. I have plenty of supplies, but they're often either in a box someplace or being used on another project. Then there's the risk of picking up a supply with the wrong voltage or polarity. Including the supply eliminates all of that. Including the battery pack is another nice touch, because it means one less cable.
Something else I didn't expect on this device is the extensive I/O and peripheral set on the SN171 module. It has the aforementioned GPIOs, including several pulse-width modulated (PWM) outputs and analog-to-digital (A2D) inputs. The bottom line is that it's got a pretty powerful MCU built into it.
Now my plan is to use this with my telepresence robot for some programming and short-range control. The next step is to connect this to my ZedBoard (which I haven't shown you yet). I'm going to use the ZedBoard as the main brain for controlling the sensors and the motors. Now I just have to learn Python.
Duane Benson 12/14/2012 2:50:34 AM User Rank Blogger
Re: Cool toys - even cooler!
As of this moment, I have Portal (the Synapse-Wireless IED), Python 2.7.3 and OpenCV 2.4.3 all installed and I have Portal configured to use my Python install. Very easy to do. Look on page 64 of the Portal Reference Manual. Next step is to get them all playing nice together.
Duane Benson 12/13/2012 4:16:15 PM User Rank Blogger
Re: Cool toys - even cooler!
I didn't look a little deeper into Python, but I looked in a different Synapse-Wireless book to get the answer I wanted.
I had been looking in the EK2100 User's Guide. It is very well written so I have no complaints, but the answer to my Python questions was in a different manual: the Snap Reference manual.
Here's what they say about in on page 15: "Portal scripts are written in full Python (you are not limited to the embedded SNAPpy subset). Python is a very powerful language, which finds use in a wide variety of application areas."
So, that answers my question quite clearly. That opens up even more possibilities.
Duane Benson 12/12/2012 2:00:46 PM User Rank Blogger
Re: Cool toys
I need to look a little deeper into their Python. What I'm wondering is if their Python can use other libraries of if their libraries can be used with other Python. The reasoning being OpenCV - an open source computer vision library for Python and a lot of other languages. I'd love to be able to combine the two libraries in the same language and see what kind of fun I could have.
Max Maxfield 12/12/2012 9:45:53 AM User Rank Blogger
Re: Cool toys
@rfindley: The Synapse stuff really is cool -- especially the ability to program your applications in Python -- I'm not an expert here (just started learning Python), but my understanding is tha the applications are composed of a group of functions -- and that any wireless node can call any function in any other wireless node. Also you can use "Print" type statements in your applications for debugging purposes.
FYI Synapse are the ones who are creating the Cap-Net wireless-mesh propeller beanie network for Design West
Duane Benson 12/11/2012 5:37:50 PM User Rank Blogger
Re: Cool toys
Rfindley - It would be fun to build a little robot using just the Synapse board and program it with Python on the PC. That might be a really good way to introduce robotics programming to young folks.
I don't know if I'll have time for that right away. My first order of business will be to get data between my PC and robot. I think that at some point, I'll have to build the small robot with it too.
Duane has decided that the time is ripe to get his ZedBoard bolted onto his robot with a Linux distribution up and running. That was the ultimate plan anyway, so why wait?
To save this item to your list of favorite All Programmable Planet content so you can find it later in your Profile page, click the "Save It" button next to the item.
If you found this interesting or useful, please use the links to the services below to share it with other readers. You will need a free account with each service to share an item via that service.