The USB DrDAQ, complete with Buffer and 2200 series scope, represents a miniature, but fully functional electronic lab which allows very fast development of design ideas, as will be shown in the development and simulation of a Wheelchair Speedometer/Recorder. The same equipment and principles can be easily employed in a host of applications using a Hall Effect Motion Sensor.

We wish to measure & record speed of a wheelchair from 0.3 km/h to 12 km/h using a DrDAQ USB Data Acquisition module and a Hall Effect Magnetic Sensor such as Hamlin model 51100.

Five magnets are fitted around the rim of the wheel and the Sensor emits a pulse every time a magnet goes past. The wheel diameter is 420,97 mm, therefore circumference is 1.323 mm. At 4 RPM and at 144 RPM (wheel revolutions per minute) we have a linear speed in m/sec and in km/h as follows:

Speed = (4*1.323/1000)/60 = 0,0882 m/sec.............................Speed = 144*1.323/1000)/60 = 3,0859 m/sec

or

Speed = (0,882*3.600)/1000 = 0,317 km/h...............................Speed = (3,0859*3.600)/1000 = 11,427 km/h

Using the above expressions it is possible to calculate any speed Vs. RPM.

To calculate Frequency and Period, we must remember that we have 5 magnets, therefore, at 4 RPM and 144 RPM:

Frequency = 4*5/60 = 0,333 Hz....................................Frequency = 144*5/60 = 12,00 Hz

and

Period = 1000/0,333 = 3 seconds (3.000 mS).....................Period = 1000/12 = 0,0833 seconds (83,3 mS)

The Hall sensor has an inner element 7 mm long. Considering a capture length of 5 mm, the capture time (which is the length of the pulse emitted by the sensor) is given by the Ratio Sensor/ Circumference as follows:

RATIO = 5/1.323 = 0,00378 and the pulse duration at 4 and at 144 RPM can be calculated as follows:

On Pulse = 3*0,00378*1000 = 11,342 mS...........................On Pulse = 0,0833*0,00378*1000 = 0,3151 mS

The output of the Hall Sensor is a train of pulses whose time in between (Period) becomes shorter and shorter as wheel rotational speed INCREASES. If we charge a capacitor (with a constant voltage) through a resistor (RC time constant) with these pulses, the higher the speed, the higher the voltage: in fact the voltage (which we call METERING VOLTAGE) is linearly proportional to the rotational speed and hence to the linear speed . Therefore measuring the voltage we measure the frequency and hence the speed. To do this the CHARGE PULSE DURATION MUST BE CONSTANT, only the TIME AMONG PULSES MUST CHANGE.

From what calculated above, going from 0,317 km/h to 11,427 km/h the On Pulse duration UNFORTUNATELY CHANGES from 11,34 to 0,315 mS, therefore we will use the Hall Sensor pulse train to drive a monostable producing a FIXED OUTPUT PULSE OF CONSTANT DURATION. We shall set up the monostable to produce a constant pulse duration approximately 4 times longer than the longest sensor pulse. Since the longest On Pulse is 11,342 mS, we shall use a monostable producing a constant pulse of 50 mS.

2. THE EXCEL SPREADSHEET AND SYSTEM SIMULATION

All above described calculations for any speed are made by the enclosed EXCEL spreadsheet file “Speedometer calc.”. The speedometer system can be simulated by using Picoscope’s 2200 Function Generator as source, feeding an RC cell calculated as shown. The maximum Hall Sensor pulse length occurs at 4 RPM and has a value of 11,342 mS: to avoid excessive ripple at low speed, the RC cell must have a time constant more than four times higher, e.g. 50 mS, which can be implemented with an Rintegrator = 100 KOhm resistor and a Cintegrator = 2 uF tantalum capacitor.

The 2200 Function Generator can be set for any frequency between 0,3 and 14 Hz: it is set as non-symmetrical squarewave, with AMPLITUDE (important!) between 0 and 1 V. Since we have not yet built the monostable, ON time of the squarewave changes with frequency: hence we must manually adjust ON time, every time we change frequency. ON percentage for each frequency is given in column E of the Excel file, while in column F we see the voltage across Cintegrator (blue colour).

The reference diagram is posted, showing the DrDAQ plus the universal buffer. With reference to the simulation diagram, the DrDAQ buffer

**must be used in order not to load down the RC cell**. Also note that a 10:1 probe is necessary to buffer the 2200 scope input, because the 1 MOhm input impedance of the scope is too low and loads the RC cell.DrDAQ Picolog channels must be set up as follows, according to the Excel file calculations.

**External 1**

Title: Frequency

Channel: External 1

Scale: No sensor V

Meas: Signal c.c.

Options

Use parameter formatting: Hz

Min. Value: 0.0

Max. Value: 14.0

Scale

Reference: table

0.033 – 0.0167

0.35 – 7.0

0.70—14.0

**External 2**

Title: Rotational Speed

Channel: External 2

Scale: No sensor V

Meas: Signal c.c.

Options

Use parameter formatting: RPM

Min. Value: 0.0

Max. Value: 180.0

Scale

Reference: table

0.0167 – 4.0

0.35 – 84.0

0.70—170.0

**External 3**

Title: Wheelchair speed

Channel: External 3

Scale: No sensor V

Meas: Signal c.c.

Options

Use parameter formatting: km/h

Min. Value: 0.0

Max. Value: 15.0

Scale

Reference: table

0.0167 – 0.317

0.35 – 6.665

0.70— 13.331

Connect the parts according to the schematic. Do not turn on Picolog yet. Turn Picoscope on and set up Function Generator for ARBITRARY WAVEFORM. Adjust voltage swing from 0 V to 1 V and check Voltages on DVM after setting up any frequency with the associated Simulation Percentages, as shown in the Speedometer calc. file (bue colour). For instance with frequency = 1 Hz and Pulse % = 5%, the DVM will show 50 mV and so on.

Once the voltages are verified, turn on Picolog and the three channels will show and record Frequency, RPM and Speed as shown in the screen photos.

A future instalment will describe the Sensor / DrDAQ interface for speed measurement and recording.