background image

29

1070_0_Product_Manual - October 28, 2010 8:52 AM

C programs can be compiled on the PhidgetSBC itself, via the SSH interface, or off-board using a cross compiler. 

Use of a cross compiler is not strictly documented here, but it is possible to build one from the buildroot distribution 

available on our web site. When developing C applications on the PhidgetSBC, it is recommended that you log in 

using the ‘user’ account instead of ‘root’. 
If you need to log data from a custom application, you can either log directly to the application directory with the 

size limits of the userspace in mind, or to /tmp if the data should be erased on reboot. Alternatively, you can use a 

flash drive, which are mounted automatically at /media/usb(0-9) when plugged in.
Note that custom applications should not try to get user input, as stdin is closed before the application gets run.

GCC

The PhidgetSBC contains full GCC and associated build tools, as well as make and gdb for compiling C source. Use of 

these is the same as on full linux, just keep in mind that there is no swap space and userspace is limited. Compiling 

will also be slow for complicated programs. Simple programs are ideal for this environment.
The C library used is uClibc. For most uses this should be similar to full libc, just much smaller.Also, when compiling 

a program that links with libphidget21.so, you need to add ‘-lphidget21 -ldl -lpthread -lm’ to the command line. 

Otherwise, you will get segfaults.

Phidget Dictionary

Communication between a custom application on the PhidgetSBC and the outside world can be facilitated by using 

the dictionary interface of the Phidget Webservice. The dictionary lets you set and listen for key/value pairs over 

the network, and take action accordingly. This could be used to post data or listen for commands over the network, 

while maintaining reliability and ultimate control on the PhidgetSBC itself in case of network failure.
See the Phidget Programming manual for its use in your language of choice.

SSH

The built-in SSH Server can be enabled to allow console access to the PhidgetSBC. By default, this server is disabled. 

SSH access to the PhidgetSBC is enabled in the Network: Network configuration page on the PhidgetSBC. Projects 

on the PhidgetSBC should be stored in the user home directory (/home/user). Enabling the server for the first time 

can take several minutes as the encryption keys are generated.
Once SSH is enabled, connect to the PhidgetSBC using its hostname or IP address (e.g. ‘ssh user@phidgetsbc.

local’). You should login using the restricted ‘user’ account using the initial password set for the ‘root’ account. The 

password for the user account can be changed any time either through the unrestricted root account or directly 

through the user account.  Files can be sent to the board using scp or by uploading through the web interface in 

Userspace: Userspace Browser. The SSH server does not support sftp.
Text files (source code, etc.) can be edited using vi or with the web interface.
On Windows, we recommend Putty for an SSH client. You can get this at http://www.chiark.greenend.org.

uk/~sgtatham/putty/download.html.

Customization

If you wish to customize the root filesystem, you have two options: customize locally on the board, or build a 

custom kernel and filesystem from source. If you mess up the firmware while customizing, you can always perform a 

board reset and start again.
You may also want to to add new libraries or kernel extensions, add new Unix tools, update certain aspects, delete 

others, change the boot process, etc. All of this is possible, but it is also completely unsupported by Phidgets. 
In order to customize the root file system of a running PhidgetSBC, you will need to remount the filesystem as read-

write with the command: ‘mount -o remount,rw /’. At this point you can change any files in /, just keep in mind the 

amount of free space. Once the SBC is rebooted, / will again be mounted as read-only.

Summary of Contents for 1070 - PhidgetSBC

Page 1: ...Product Manual 1070 PhidgetSBC ...

Page 2: ...Phidgets 1070 Product Manual For Board Revision 0 Phidgets Inc 2009 ...

Page 3: ...gram 9 Entering New Password 10 Updating the Firmware 12 Testing the Phidget InterfaceKit 8 8 8 Over the Webservice 14 Viewing the Webcam 14 Rebooting Resetting the PhidgetSBC 15 User s Guide 15 Layout 16 Basic Use 16 Phidget Webservice 16 Reliability 17 Finding Phidgets on the Network 17 Configuration 18 The Configuration Page 18 Main PhidgetSBC Info 18 Main About 18 Status General 19 Status Phid...

Page 4: ... a Wireless connection 27 No DHCP Server 28 Advanced User s Guide 28 Custom Applications 29 GCC 29 Phidget Dictionary 29 SSH 29 Customization 30 Custom Kernels and Filesystem 31 Technical 31 Power Over Ethernet 31 Hardware Layout 31 Software Layout 31 Date and Time 32 Wireless Networking System 32 Configuration System 32 Nand Layout 32 Boot Process 33 U Boot 33 Drivers for USB to Serial adapters 3...

Page 5: ...Libraries 36 Programming Hints 36 Networking Phidgets 36 Documentation 36 Code Samples 37 API for the InterfaceKit 8 8 8 38 Technical 38 Analog Inputs 41 Digital Inputs 44 Digital Outputs 46 Using the 4 Port USB Hub 47 Product Specifications 48 Product History 48 Support 48 Legal Information ...

Page 6: ...full shell access via a built in SSH server full GCC and development tools the GDB debugger and all of the standard command line tools expected on a modern Linux system This allows for on board development in C and full access to the system for customizing An integrated PhidgetInterfaceKit 8 8 8 allows you to connect devices to any of 8 analog inputs 8 digital inputs and 8 digital outputs It provi...

Page 7: ...tion pressure etc Phidgets offers a wide variety of sensors that can be plugged directly into the board using the cable included with the sensor Here is a partial list of sensors currently available IR Distance Sensor IR Reflective Sensor Vibration Sensor Light Sensor Force Sensor Humidity Sensor Temperature Sensor Magnetic Sensor Rotation Sensor Voltage Divider Touch Sensor Motion Sensor Mini Joy...

Page 8: ...appropriate outlet The red status indicator light located near the USB ports should be lit if the unit is receiving power The green LED located above the red LED indicates boot status The green LED will turn on and off once during boot and then turn back on when everything is running Other Phidgets can also be connected to the 1070 using a USB cable 6 Getting Started Checking the Contents You shou...

Page 9: ... back of your board Click the PhidgetSBC tab in the Phidget Control Panel Double click on the PhidgetSBC device to bring up the PhidgetSBC configuration panel in your default web browser Testing Using Windows 2000 XP Vista Downloading the Phidgets drivers Make sure that you have the current version of the Phidget library installed on your PC If you don t do the following Go to www phidgets com Dri...

Page 10: ... available You can find your SBC s firmware version by clicking on Main PhidgetSBC Info If your version is older you must update your SBC firmware Download from Phidgets inc If you have a fast ethernet connection you can download the new firmware directly into your SBC Note that the Download from Phidgets Inc will not appear if the SBC cannot connect to www phidgets com Select Download from Phidge...

Page 11: ...com Go to www phidgets com Drivers and click on the Download Icon besides PhidgetsSBC You can then store the Firmware file on a local drive Use the Upload command to upgrade the firmware on your SBC Once the firmware has been downloaded and the flash memory has been rewritten the SBC will reboot The Green light will flash once and then turn off Once it turns back on the SBC is ready to use ...

Page 12: ...BC is not connected to the internet or connected with a low speed connection you can download the file from www Phidgets com Go to www phidgets com Drivers and click on the Download Icon besides PhidgetsSBC You can then store the Firmware file on a USB memory stick Plug in the USB stick in one of the USB port on the SBC The USB Drive option will show up automatically Select the Firmware file and c...

Page 13: ...on the white box to turn on the LED Clicking again will turn the LED off The bottom row shows the status of the request while the top row displays the status of the digital output as reported by the device Test the digital input by 3 disconnecting the wire end connected to the digital input connector The tick mark in the box will go away Click on the Ratiometric Box if 4 your sensor is ratiometric...

Page 14: ...nges Click commit changes to confirm 5 activation of the webcam The webcam stream should now be 6 visible Rebooting Resetting the PhidgetSBC To simply reboot the device quickly press the black reset button found between the USB connectors and the 1 power terminals To reset the firmware press hold the button for 10 seconds until the red status LED begins to blink All data 2 will be lost and the ope...

Page 15: ...here 2 1 4 5 3 6 8 9 7 G 0 1 2 3 4 5 6 7 G G 0 1 2 3 4 5 6 7 G G 1 2 3 4 5 6 7 0 Layout Numbered in the circles on the diagram 10 100baseT Ethernet 1 Four USB Full Speed Ports 2 Indicator LEDs 3 Reboot Reset Button 4 Power input terminal 5 Power input jack 6 Eight Interface Kit Digital Inputs 7 Indexed 0 to 7 Eight Interface Kit Digital Outputs 8 Indexed 0 to 7 Eight Interface Kit Analog Inputs 9 ...

Page 16: ...g a Phidget over the network is nearly the same as opening one locally The main differences are Different open calls that include server information New calls OpenRemote and openRemoteIP naming depends on language Access to Webservice based properties Server hostname port and ID Access to server connect and disconnect events and network error events Phidgets can be opened by more then one separate...

Page 17: ...ger can also be used to find all Phidgets on any Webservice through Bonjour by specifying a NULL Server ID See your specific language s guide for more information about coding with the Phidget Manager Configuration The PhidgetSBC is configured through a built in configuration interface through an internet browser much like your wireless access point or router You can double click on the device und...

Page 18: ...ain PhidgetSBC Info This is the first page you should see after loading the configuration Interface It contains version information for the PhidgetSBC as well as the MAC address and time System Information Board Name Name of the device It should always read PhidgetSBC Board Revision Board revision number This tracks the hardware design Firmware Version The version of firmware currently being used ...

Page 19: ... data is also saved here Memory Total Total random access memory RAM in bytes Available Available RAM in bytes Status Phidgets Library Version The version of the installed Phidget21 library These libraries are included and are updated along with the firmware List of attached Phidgets A list of all detected Phidgets connected to the PhidgetSBC It includes the integrated PhidgetInterfaceKit and disp...

Page 20: ... the PhidgetSBC board to be opened over the network This is enabled by default and starts with the SBC The webservice also exposes a key value dictionary which can optionally be used for communication between applications written for the PhidgetSBC and applications running on your local computer This page lets you view and modify its settings Please see the Advanced User s Guide for more informati...

Page 21: ...rspace Browser The userspace browser gives access to download upload delete and edit for files in the home directory home user of the user user This is the ideal location for storing any arbitrary files or data and is the recommended location of your C code projects on the PhidgetSBC If you wish to remove files or folders simply click the red X beside their name in the Filesystem Browser The syste...

Page 22: ...s Application page Start Stop This button is for starting or stopping the execution of the program specified under application settings Starting a program will generate stdout and stderr logs View stdout You can view the standard console output of your program through this link View stderr In the event of an error that halts program execution its corresponding error message is printed here Filesys...

Page 23: ... port that the video stream is sent to Password Protect the webcam stream with a password This will add a simple username and password prompt whenever you view the webcam stream including on this page The username is webcam Set to nothing to disable passwords System Settings This is where general system setting are set up Time settings is where the timezone gets set up By default the PhidgetSBC sh...

Page 24: ...r password System Backup Restore This is where the system can be backed up to disk and restored You have the option to backup the configuration data only or backup everything Configuration data includes things like network setup passwords time settings etc Backing up everything will add to that any custom applications and the user and root home directories basically the entire userspace partition ...

Page 25: ... high speed connection to the Internet The other method is file upload which involves downloading the firmware from the website ahead of time If you have a low speed internet connection or the PhidgetSBC is not connected to the internet then this method will be recommended If the Erase Userspace partition option is selected all custom applications and board configuration will be lost The board wil...

Page 26: ... an IP address would be used The default name for the PhidgetSBC is phidgetsbc so phidgetsbc local would be its mDNS hostname If you have more than one PhidgetSBC on the network their host name will appear like phidgetsbc local phidgetsbc 1 local phidgetsbc 2 local etc They will also be given the server ID usually similar to the host name as phidgetsbc phidgetsbc 1 phidgetsbc 2 etc If you use Bonj...

Page 27: ...default and link local addresses should work Windows With Bonjour installed link local addresses should work Linux These routes need to be added where eth0 is your primary interface route add net 169 254 0 0 netmask 255 255 0 0 dev eth0 metric 99 route add default dev eth0 metric 99 For more information visit http developer apple com qa qa2004 qa1357 html Even with Bonjour installed you may have t...

Page 28: ...package that is easier to manage and can be executed from the command line or even by double clicking the file if you operating system environment is configured properly Under the command line you can use the jar utility from the Java SDK to package the class and java files The process starts by going to the directory where your program is located and creating a manifest file This manifest file te...

Page 29: ...control on the PhidgetSBC itself in case of network failure See the Phidget Programming manual for its use in your language of choice SSH The built in SSH Server can be enabled to allow console access to the PhidgetSBC By default this server is disabled SSH access to the PhidgetSBC is enabled in the Network Network configuration page on the PhidgetSBC Projects on the PhidgetSBC should be stored in...

Page 30: ...nto the process Buildroot downloads all of the source code it needs from open source repositories so the Buildroot distribution itself is fairly small Buildroot needs to be run on Linux Unpack the distribution and run the following commands to set everything up touch config make BOARD phidget_sbc getconfig You can build your filesystem by typing make and change configuration options using make men...

Page 31: ...ed users root and user Their home directories are located in userspace and sylinked into home user and root Configuration data is located at mnt userspace config This is where all configuration that can be set through the website is located User applications are stored in mnt userspace userapps each is their own directory Changes to the root filesystem can be made by re mounting the root filesyste...

Page 32: ...changed manually but there is no reason why they could not be It s very easy to enter invalid data that could cause the system to behave unexpectedly or not boot Nand Layout The board contains 64MB on Nand This nand is split into 7 partitions as follows 0 u boot size 256K Read Only 1 u boot_env size 16K Read Only 2 recovery_kernel size 2M Read Only 3 kernel size 2M Writable 4 recovery_fs size 4M R...

Page 33: ... it is damaged or overwritten it is difficult to fix Refer to U Boot documentation here http www denx de wiki DULG Manual for more information on using U Boot Drivers for USB to Serial adapters The SBC kernel contains driver support for the following USB to Serial Adapters Please consult the kernel documentation for details into the driver support for the USB to Serial adapters Company Product Con...

Page 34: ...ng S3C2410 Core ARM920T CPU Speed 266MHz Nand size 64MB SDRAM 64MB Boot time 30 60 Seconds Ethernet 10 100baseT USB 4 Port Full Speed Power Input 6 15VDC Power Consumption 1 2 watt base w Ethernet Per additional USB device1 2 5 watt Max Wireless USB Dongle 802 11b g 1 including the PhidgetInterfaceKit ...

Page 35: ...s All you need to know is how to program We have developed a complete set of Application Programming Interfaces API that are supported for Windows Mac OS X and Linux When it comes to languages we support VB6 VB NET C NET C C Flash 9 Flex Java LabVIEW Python Max MSP and Cocoa Architecture We have designed our libraries to give you the maximum amount of freedom We do not impose our own programming m...

Page 36: ...so makes it possible to communicate with other applications that you wrote and that are connected to the PhidgetWebService through the PhidgetDictionary object Documentation Programming Manual The Phidget Programming Manual documents the Phidgets software programming model in a language and device unspecific way providing a general overview of the Phidgets API as a whole You can find the manual at...

Page 37: ... used to convert SensorValue into the measured property int SensorRawValue int SensorIndex get Returns the full resolution of the Analog Input This is a more accurate version of SensorValue The valid range is 0 4095 Note however that the analog outputs on the Interface Kit 8 8 8 are only 10 bit values and this value represents an oversampling to 12 bit double SensorChangeTrigger int SensorIndex ge...

Page 38: ... Connector Molex 70553 0002 3 Position Right Angle PCB Connector Gold Molex 70553 0037 3 Position Right Angle PCB Connector Tin Molex 15 91 2035 3 Position Right Angle PCB Connector Surface Mount Note Most of the above components can be bought at www digikey com Electrical The maximum total current consumed by all Analog Inputs should be limited to 400mA The analog measurement is represented in th...

Page 39: ... sensors the error is quite predictable over the life of the sensor and it can be measured and calibrated out in software Non Ratiometric Configuration Voltage Reference error The 5 0VDC voltage reference is accurate to 0 5 This can be a significant source of error in some applications but can be easily measured and compensated for Connecting non Phidget devices to the Analog Inputs Here are some ...

Page 40: ...surement Specialties MSP 300 Pressure sensors ranges up to 10 000 PSI Freescale Semiconductor MPXA MPXH Gas Pressure Sensors Allegro ACS7 series Current Sensors ranges up to 200 Amps Allegro A1300 series Linear Hall Effect Sensors to detect magnetic fields Analog TMP35 TMP36 TMP37 Temperature Sensor Panasonic AMN series Motion Sensors Honeywell FS01 FS03 Small accurate Piezo resistive load cells A...

Page 41: ...tage Required to sw itch is dependent on VG USER APPLICATION VS1 Q1 INPUT GROUND Phidget Digital Input 100nF 15K 15K 5V 5V NPUT GROUND Phidget Digital Input x1 Monitoring the position ofa Relay K 1 Isolating a Digital Input w ith an Optocoupler Detail of Digital Input USER APPLICATION Relay contact causes Digital Input to report TRUE Current through LED causes Digital Input to rep Using an FSR as ...

Page 42: ...th an NPN Transistor Collector Emitter Current 270uA causes Digital Input to report TRUE Collector Emitter Current 67uA guarantees Digital Input to report FALSE Drain Source Current 270uA causes Digital Input to report TRUE Drain Source Current 67uA guarantees Digital Input to report TRUE USER APPLICATION USER APPLICATION 10K R1 VS1 1K R1 VS1 U1 OptoCoupler INPUT GROUND Phidget Digital Input INPUT...

Page 43: ...gital inputs are reported back to the PC periodically During this sampling period if a digital input was true for greater than 4 0ms the digital input is guaranteed to be reported as true in software This makes the digital input much more sensitive to reporting TRUE state and makes it useful to watch for short events Any Digital Input True events of less than 1 5ms are never reported FSR USER APPL...

Page 44: ...r voltage AC devices that can also be controlled in the same fashion Driving an LED w ith the Digital Output USER APPLICATION D1 OUTPUT GROUND Phidget Digital Output 250 5V Detail of Digital Output TRUE FALSE 5V OUTPUT GROUND Maximum current through transistor w ill depend in part on the transf er characteristics of the optocoupler Be conservative and refer to the datasheet ofthe optocoupler or DC...

Page 45: ...l AC or DC Driving an LED w ith the Digital Output USER APPLICATION USER APPLICATION USER APPLICATION Phidget Digital Output x1 VS1 VS1 Load U1 OptoCoupler Load D1 The Load can also be sw itched with the SSR on the high side Using a 3052 SSR Board Driving Output causes Can be used to co USER APPLICAT The Load can also be sw itc 3052 RED BLACK OUTPUT GROUND Phidget Digital Output OUTPUT GROUND Phid...

Page 46: ...RUE FALSE 5V OUTPUT GROUND Driving an LED w ith the Digital Output USER APPLICATION Phidget Digital Output x1 D1 OUTPUT GROUND Phidget Digital Output Using the 4 Port USB Hub Powering the PhidgetSBC An external 6 15V supply must used to power the PhidgetSBC and any attached USB devices Connecting additional USB devices to the PhidgetSBC is as easy as plugging them into the on board 4 port hub Each...

Page 47: ...istance 15K ohms Analog Input Update Rate 65 samples second Digital Output Update Rate 125 samples second Digital Input Update Rate 125 samples second Digital Input Recommended Wire Size 16 26 AWG Digital Output Recommended Wire Size 16 26 AWG Digital Input Wire Stripping 5 6mm strip USB Power Current Specification Max 500mA Quiescent Current Consumption 13mA Available External Current source 487m...

Page 48: ...00 PM Mountain Time US Canada GMT 07 00 or E mail us at support phidgets com Legal Information For licensing and warranty information please see the Phidgets End User License It is available on our website at http www phidgets com documentation Licenses Phidgets_End_User_License_Agreement pdf By using this product you are agreeing to be bound by the terms and conditions set forth by this licensing...

Reviews: