+44 (0) 1761 234 328

(0) items

£0.00

You have no items in your shopping cart.

How To & FAQs

Here we showcase Guides, FAQ's and How To's that teach and inform on how our products can be used in your projects. We are actively adding to this content and if you would like any specific guides or explanations then please contact us.

Motors

How does a DC motor work?

Phidgets explain the workings of DC motors in this video primer:

 

How does a Stepper motor work?

Phidgets explain the workings of Stepper motors in this video primer:

 

How does a Servo motor work?

Phidgets explain the workings of Servo motors in this video primer:

 

Basic Principles

Voltage, Current and Power?

AddOhms explains Voltage, Current and Power:

 

What is the difference between AC and DC?

AddOhms explains AC and DC current:

 

Analog or Digital?

AddOhms explains the difference between analog and digital:

 

Why do I need current limiting resistors?

AddOhms explains why current limiting resistors are needed:

 

Why cant I just connect LED's to a Battery?

AddOhms covers some common questions and mistakes that people make when wiring LED's:

 

Microcontrollers and Microprocessors

What is the difference between an Arduino and a Raspberry Pi?

AddOhms explains the difference between an Arduino and a Raspberry Pi and gives insight on how to choose the most suitable for your project:

 

How do I control a servo using an Arduino?

NYCCNC explains in detail how to use an Arduino to control a basic servo, this technique can be extended to a whole range of actuators and outputs:

 
 

I have a Raspberry Pi, what now?

Sparkfun give a great 3 part tutorial on the Raspberry Pi, covering everything from connecting it up, installing the Operating System and even building your first project

 
 
 

How do I set up my BrickPi?

Dexter Industries explains how to build and set up your BrickPi:

 

Robot Arms

What is the Range of Motion available on the Crustcrawler AX12 Arm?

Robot Magazine show the range of motion of the Crustcrawler AX12:

 

How To Guides

How to program a Basic Stamp 2 to drive a Serial LCD

The following example application demonstrates a DS-LCDD1, 2 x 16 character LCD Serial Module, powered by a Basic Stamp 2TM microcontroller. On power up, the Serial LCD displays two lines of text after a 1-second pause.

Basic Stamp is a Registered Trademark of Parallax Inc.

'*************************************************************************' 
'Description: DS-LCDD1,2 x 16 characters LCD Serial Module controlled by the '
'Basic Stamp 2TM microcontroller, demonstrating text displayed on both LCD '
'lines. '
'Created: 19/08/02 Revision 1.00 '
'Written By: Total Robots (Jamie Finnan) '
'TR-003 '
'Basic Stamp is a Registered Trademark of Parallax Inc. '
'*************************************************************************'
'{$STAMP BS2}
main:
gosub ClearLCD ‘Clear the LCD screen
gosub LCDData ‘Output data to the LCD
goto main
ClearLCD:

SEROUT 9,16780, [254,1] ‘Set command to clear the LCD screen
pause 1000 ‘1 second pause
Return
LCDData:

Serout 9,16780, ["Serial LCD with"] ‘First line of data to LCD
Serout 9,16780, [254,192] ‘Command for cursor to second line
Serout 9,16780, ["BS2 Application"] ‘Second line of data to LCD

Loop
goto Loop
return
'*************************************************************************'

How to use a Siteplayer™ for Serial Communication with a Parallax Basic Stamp2™ and Ultrasonic Range Finder.

This example demonstrates the ease in which serial data can be transmitted to the SitePlayer™ module.

In this example, the Parallax Basic Stamp2™ is used as the controlling processor but other microcontrollers can be used similarly. The example consists of seven separate documents that will interact with each other to create the application. Six of these can be extracted from a zip file that can be downloaded HERE(to follow). Whilst the seventh, the BS2 code is available at the bottom of this page.

SitePlayer™ Serial_Demo2.SPD is a file used by Sitelinker™ for the initial variables. Here the IP Address, Sitefile, Sitepath and Includes, amongst others, are stated.

The setting of the Sitefile and Sitepath in Serial_Demo.SPD determines the SitePlayer Binary file (SPB) and the path and file allocations for the documents in this application respectively.

If the current settings are used from Serial_Demo2.SPD, the files will be in the following allocations.

Sitefile “C:\Program Files\SitePlayer\Serial_Demo2.spb”

Sitepath “C:\Program Files\SitePlayer\TR Demo”

The file TR Demo contains the files: “SerialIn.htm”, “SerialIn.SPI” and “SitePlayer_Logo.Gif”.

The .HTM file is the HTML web page. By changing settings in here, the websites appearance can be altered.

The .GIF file is called up by the Web page and is an image of the SitePlayer logo.

The .SPI (Serial Peripheral Interface) is a pointer for any external device link events that occur. In this application, when baud rate is selected, the same web page is loaded.

The files “Serial_Demo2.SPD”, “UDPsend_def.INC” and “pcadef_Serial.INC” are, in this application, allocated in “C:\Program Files\SitePlayer”.

The .INC files are used by the .SPD file to set up UDP and file allocations within SitePlayer itself. In the file “pcadef_Serial.INC”, comin0 is used as the file to receive serial data from the BS2. Com is the serial port output, and baud is the baud rate for serial communication. These are all used within the web page.

Basic Stamp2™ The BS2™ is connected to the Devantech SRF04 Ultrasonic Range Finder as follows.

SRF04 BS2

INIT - P0

ECOH - P1

V+ - Vss

GND - GND

The serial connection between the Basic Stamp2 and SitePlayer is as follows.

SP BS2

SEROUT - PC-TX (shown on siteplayer schematic in main SitePlayer documentation)

GND - GND

The Basic Stamp2 code should be copied into the Stamp compiler and downloaded to the Basic Stamp2. It will convert the SRF04 reading into centimetres and decide whether the reading is more or less than 100cm. Less and an Alarm signal is sent to the SitePlayer. More, and an all-clear signal is sent to the SitePlayer.

A debug window is set up to allow an understanding of what readings the SRF04 obtains and when data is sent to the SitePlayer.

SiteLinker™ Sitelinker is used to download the web files to the SitePlayer. When using Sitelinker, ensure that the BS2 is powered down so no serial communication will occur while the Sitelinker is downloading to SitePlayer.

In SiteLinker, Open “Serial_Demo2.SPD”. Now select “Download” then “Make and Download”.

The Sitelinker creates an .SPB file, which is downloaded to the SitePlayer.

Select Browser and load http://192.168.1.250/Serialin.htm. Power up BS2 and the application should be up and running.

'*************************************************************************' 
'Description: This application demonstrates simple serial communication from
'the BS2 to the Siteplayer.'

'An SRF04 ultra sonic range finder inputs readings into a BS2 which decides
'whether any object is close enough for an alarm condition to be apparent. If it is, a serial out command sends data to the siteplayer which in turn sets
'an alarm warning on its website.'

'If no alarm condition is apparent, an all-clear screen is displayed.'
'Created: 15/10/02 Revision 1.00 'Written By: TR Control Solutions (Jamie Finnan)
'TRCS-001
'Siteplayer is a Registered Trademark of Netmedia'
'*************************************************************************'
'{$STAMP BS2}sendata var byte(7) 'Set up a 7 byte Array
Dist var word
INIT con 0
ECHO con 1
convfac con 29 ' use centimeters
'*************************************************************************'
main:
gosub sonar
debug dec Dist, cr
pause 200

if Dist < 100 then Alarm_State
if Dist > 100 then All_Clear
goto main
'*************************************************************************'
sonar:
pulsout INIT,5 ' 10us init pulse
output INIT ' dummy command (delay)
rctime ECHO,1,Dist ' measure echo time
Dist=Dist/convfac ' convert to inches
pause 10
return
'*************************************************************************'
Alarm_State:
sendata(0) = "A"
sendata(1) = "L"
sendata(2) = "A"
sendata(3) = "R"
sendata(4) = "M"
sendata(5) = "!"
sendata(6) = "!"debug "Send data Alarm",cr
serout 6,16468,[$80,$00,sendata(0)]
serout 6,16468,[$80,$01,sendata(1)]
serout 6,16468,[$80,$02,sendata(2)]
serout 6,16468,[$80,$03,sendata(3)]
serout 6,16468,[$80,$04,sendata(4)]
serout 6,16468,[$80,$05,sendata(5)]
serout 6,16468,[$80,$06,sendata(6)]
pause 4000
return
'*************************************************************************'
All_Clear: sendata(0) = " "
sendata(1) = "C"
sendata(2) = "L"
sendata(3) = "E"
sendata(4) = "A"
sendata(5) = "R"
sendata(6) = " "debug "Send data All Clear",cr
serout 6,16468,[$80,$00,sendata(0)]
serout 6,16468,[$80,$01,sendata(1)]
serout 6,16468,[$80,$02,sendata(2)]
serout 6,16468,[$80,$03,sendata(3)]
serout 6,16468,[$80,$04,sendata(4)]
serout 6,16468,[$80,$05,sendata(5)]
serout 6,16468,[$80,$06,sendata(6)]
pause 100
returnEnd
'*************************************************************************'
0