Phidgets

Phidgets are a physical representation of GUI widgets or elements, don’t confuse them with desktop widgets, that’s a different concept. So, if you’ve ever created a software application with a GUI (Graphical User Interface) you probably now how this works.

Basically, there’s a set of graphical elements in a certain GUI toolkit that can be used. Then you can either arrange them as you need graphically (if a particular IDE allows it) or just use as classes, thus creating a GUI. Then you can program what exactly does what, thus creating the program itself.

This way it’s much easier to create graphical user interfaces, as most often used graphical elements (buttons, scroll-boxes, check-boxes, tabs, etc.) are predefined and you can focus on high-level programming. If you want to create a software application that interacts with the physical world things usually are much more complicated.

To rectify this situation phidgets were introduced. Phidgets are different electric components, such as sensors, motor drivers, IO boards that can be connected to a PC via USB and then programmed using the Phidget API that is available for many different programming languages and environments.

Phidget API

Phidget API is what takes care of low level tasks so you could focus on high-level programming without getting into the basics of different communication protocols and other issues that would otherwise have to be dealt with. The core of this API (Application Program Interface) is a C library – phidget21 that implements the low-level communication protocols.

On top of this core library other higher-level libraries are built that allow you to use many different programming languages and environments. So, there are COM, .NET, AS3, Java, Python, Max/MSP and MSRS (no longer maintained) libraries.

This allows you to use such languages/environments as Adobe Director, AutoIt, C sharp, C/C++, Cocoa, Delphi, Flash AS3, Flex AS3, Java, LabVIEW, MATLAB, Max/MSP, MSRS 1.5 (no longer maintained), Python, REALbasic, Visual Basic .NET, Visual Basic 6.0, Visual Basic for Applications, Visual Basic Script, Visual C/C+/Borland.

So, as you can understand, Phidget API includes everything you’d need to use them successfully. You can read and change the state of different phidgets, access their specific functions, etc. Phidget Webservice makes it possible to use Phidgets over the network. So, if you have a remote machine with phidgets connected, you can access and use them from another computer too.

This is especially important if you use a single board computer, I’ll tell about it a bit later. In the mean time – read on, I’ll tell you what phidgets there are and how can you use them!

Different types of Phidgets

As you may have noticed, I like to divide things into types. Don’t know, maybe it’s some kind of obsession. In my opinion, it’s much easier to explain and understand things if everything is nice and tidy. So, there are different types in which these devices organically fall into. This classification is more or less used by the manufacturer too.

Sensors

Phidgets IR adapter
Phidgets IR adapter, courtesy of Trossen Robotics

Sensors are used to provide some input of outer factors such as humidity, touch, temperature, human input or anything else. The line of sensor devices available is quite elaborate in my opinion. Apart from already mentioned factors, there are also sensors that can measure such “exotic” things as pH levels of substances, and more.

Of course, there are also conventional sensors that are often used in robotics, such as Sharp distance sensors, accelerometers, mechanical encoders, etc. I didn’t count them all, there are other interesting sensors too, and some that can be used to create pretty sophisticated HMIs (HMI – human machine interface).

Possible connection methods differ. There are sensors that are “phidgets” themselves, thus they can be connected directly to a computer via USB. Some sensors can be connected to analog ports of Phidget IO boards. Yet some aren’t sensors themselves but interface boards instead, that let you connect different “generic” sensors to analog ports of IO boards.

These can be used to connect Sharp sensors of your choice, thermocouples, or your own analog sensors. All above mentioned sensors are analog. There are some switches that output digital (on-off) signal too.

Motor Controllers

Phidgets 8 servos controller
Phidgets 8 servos controller, courtesy of Trossen Robotics

If you want your application to interact with the physical world it’ll probably need to move something too not just receive input. This, as you know, can be achieved if motors are used. This line of devices includes motor controllers for different electric motors as well.

So, there are servo motor controllers that can output PWM signals to control hobby servos or other similar devices that accept PWM signal such as some linear actuators. There are servo controllers that allow you to control one servo. In these cases the controller is powered from the USB. There’s also a servo controller that can control up to 8 servos.

In this case an external power source is required. Other available motor controllers also usually require an external power source to power the motors. These include stepper motor controllers as well as a low current DC motor controller that can control two motors and a high current DC motor controller.

If you don’t know what’s the difference between stepper, servo and other DC motors, you can read my article on robot motors. There you can find some info on different electric motors that are often used for robotics purposes.

Others

Phidget InterfaceKit 8/8/8
InterfaceKit 8/8/8, courtesy of Trossen Robotics

Sensors to sense, motors to move, what “others”, you ask? Yes, there are other handy phidgets that could be quite useful. Remember, above I mentioned I/O boards. These have one or another number of different I/O ports. InterfaceKit 8/8/8, for example, has 8 analog inputs, 8 digital inputs and 8 digital outputs.

Analog inputs are used to measure signals from 0 to 5 Volts. Above mentioned analog sensors can be plugged into these inputs. Digital Inputs/Outputs, on the other hand, use digital signal ~0 or ~5 Volts. These can be used to record states of switches, to drive LEDs, transistors, or anything else that accepts that kind of signal.

Apart from the above mentioned I/O board, there’s also a similar board with six additional USB ports, as well as an I/O board with 16 Digital inputs and 16 digital outputs that can work with signals up to 30VDC. There’s also PhidgetSBC, but I’ll say something on it seperately.

Other phidgets include relay boards that can be used to drive different AC or DC devices, such as motors, solenoids, etc, display boards – an LCD display and a 64 LED controller that can be used to create 8X8 (or other configuration) LED screens and an RFID reader. RFID reader can be used to create different devices that use RFID authentication.

PhidgetSBC

stepper motor
Phidget Single Board Computer, courtesy of Trossen Robotics

You could view PhidgetSBC as another I/O board with slightly enhanced capabilities. However, it’s more than that. It’s actually a full-fledged single board computer. Still, the most basic usage is as an interface board that can be accessed over either a wired or a wireless network.

This can be quite handy too. Phidgets are usually limited by the length of a USB cable. In this case it’s possible to create remote appliances that are still programmed using the Phidget API and controlled from the “main” computer. If the board and other connected devices draw power from batteries, it’s possible to create wireless, mobile, remote controlled robots.

To create autonomous robots there are two options. Either the program that runs the robot is executed remotely on the “main” computer, or locally on the SBC. Local programs can be written in C/C++ or Java. However, if you want to create an autonomous robot that doesn’t need network capabilities, other options such as augmented microcontrollers could be more suitable.

If the concept of single board computers seems interesting to you, read my article on single board computers that can be used for robotics purposes.

Kits

In case you have something in mind there are a few kits where different components are bundled together so you can get started faster. For example, if you know you want to test RFID, or drive a servo, there are kits for specific purposes like that.

However, if you’re in an opposite situation – you want to tamper with them and figure out what exactly they’re capable of and how could you use them, there are some kits for you too. These are called “Starter kits”. Some are more sophisticated, some are simpler, but the idea is the same – general purpose phidgets are bundled together to get you started.

Use

So, why would you want to use them and for what purposes? As you can understand, the possibilities of this system are quite vast. There are many different sensors, many different programming options, many different devices that could be controlled.

Still, there are some general applications. First of all – idea prototyping and development. This is an easy way to test certain concepts and ideas before you start to develop you own hardware if you’re going for large-scale manufacturing.

Education and research is another field where this could be useful. Science and programming classes could be made really engaging with these devices. And of course – hobbyists. Phidgets could be used to create one of a kind home automation, HVAC and robotics appliances and devices.

They can be also very useful for people with a strong programmer’s background. In either case, the sky is the limit, as the offered range of these devices is really astonishing in my humble opinion. Interested? You can get phidgets at Trossen Robotics. (aff link – read ad disclosure)

Go back from “Phidgets” to “Build a robot”.

Go back to allonrobots.com home.