Presentation is loading. Please wait.

Presentation is loading. Please wait.

2 - Pointer Speedometer Display 2 - Pointer Speedometer Display The speedometer on a car is traditionally a circular dial using around 270° of the arc.

Similar presentations


Presentation on theme: "2 - Pointer Speedometer Display 2 - Pointer Speedometer Display The speedometer on a car is traditionally a circular dial using around 270° of the arc."— Presentation transcript:

1 2 - Pointer Speedometer Display 2 - Pointer Speedometer Display The speedometer on a car is traditionally a circular dial using around 270° of the arc to indicate the speed. It looks like this is because it used to be a mechanical device. A magnet on the end of a rotating cable, driven from the gearbox, acted on the pointer, causing it to turn around a dial against the restoring force of a spring. In Bloodhound the speed is measured digitally because the car’s software needs to ‘know’ the speed as a digital number, in order to control the car’s systems. This information could be displayed to the driver as a digital number but a better, more ergonomic way might be to reproduce a traditional analogue speedometer. This would allow the driver to gauge the speed of the car from a quick glance. The pictures above illustrate the pointer display created in this module, in exaggerated form, against the background of a Bloodhound cockpit; the two displays indicate the car driving at two different speeds. P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/

2 Rotating wheelDrives a generator Magnitude of voltage read and interpreted by the PicoBoard and Scratch software. Slider on a PicoBoard Resultant display Voltage output In a car, one way of making the speed transducer is to couple a DC generator to a wheel. This takes advantage of the fact that the voltage output from a DC generator is proportional to the rotational speed of its shaft. Clearly it is not practical to replicate this arrangement here, so the slider on a PicoBoard is used instead. The circuit on the PicoBoard is arranged so that movement of the slider varies the voltage level delivered to the interface circuitry. This is analogous to the wheel/generator scenario and can be used as an input to the speedometer display software. Real World Test Simulation The Speed Sensing System 2 P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/

3 The program is based around two very simple Scratch functions. (slider) sensor value allows Scratch to read the position of the slider. It returns the value as a decimal percentage, i.e. a number between 0.00 and 100.00. We will interpret this as a percentage of the maximum speed. This function is located in the ‘sensing’ tab. Point in direction (90) causes Scratch to rotate the sprite by the indicated number of degrees. The more the sprite is rotated, the greater the speed shown on the speedometer. This function is located in the ‘motion’ tab. Before starting to write the code, it is necessary to draw a circular Sprite with a line from one edge to the middle, as shown in the image to the right. This will be rotated to indicate the speed. To open the Paint Editor, and start drawing your sprite, click on the ‘Paint new sprite’ button: 3 As in the above real life illustration, it is conventional for a speedometer to have around 270° of rotation and for ‘0’ to start at about 8 o’clock on the dial. The speedometer will need to be calibrated. We need to know what voltage (or in our simulated system what % movement of the slider) corresponds to maximum speed. The design speed of Bloodhound is 1050mph so the speedometer should read up to at least 1100mph. Considerations The background used is a simulation of Bloodhound’s cockpit taken from the Internet. P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/

4 The Program (You will need to use to make ‘Voltage’ and ‘Pointer angle’.) Enhancement 1 Change the size of the dial so that it becomes larger as the speed increases. Try using Low speedHigh speed Resulting display: Enhancements To Try 4 Note: The centre of a sprite can be set in the Paint Editor with ‘set costume center’. If the sprite you’ve created doesn’t rotate correctly you may need to use this command. Set the costume centre. P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/ Read the voltage. Rotate the sprite as required. Scale up the reading to increase the pointer movement. Add an offset so that the zero position is about 230° on the display.

5 Enhancement 2 Similar to the above, but change the colour with the speed. Try using Low speedHigh speed Enhancement 3 Breaking the sound barrier is obviously a critical speed for Bloodhound. Indicate this by changing the display. Create a new costume by copying the old one and changing its colour. Use the following ‘Looks’, ‘Control’ and ‘Operators’ functions. You need to know that the speed of sound at sea level is approximately 770mph. Therefore, when the speed is more than 77%, display the high speed costume. Low speedHigh speed Medium speed Example displays: Resulting display: Displaying multiple sensor readings Sometimes it is necessary to read information from two sensors and interpret what is happening by relating the two readings. This is common in aircraft instruments, for example in this altitude indicator which shows the pilot the angle of the wings and whether the aircraft nose is pointing above or below the horizon. This could have been achieved with two separate displays, but it makes sense to reduce the pilot’s mental workload by combining the readings onto a single, easily interpreted display. Bloodhound requires two engines (a jet engine and a rocket motor) to create sufficient power to exceed 1000mph. It may therefore be useful to combine speed and engine power information into a single display. The following is a simple example. 5 P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/

6 Enhancement 4 - Dual Display Connect the PicoBoard input A to a potentiometer as shown. This will create the input for the second display. Create an additional sprite to process the input from the second sensor. The easiest way to do this is to right click on the first sprite and select ‘duplicate’. This makes a full copy of the first sprite including any code and costumes (images). Modify the sprite’s image to just show a green arrow, which will eventually be displayed over the top of the first sprite. Use the ‘set costume center’ button so the arrow will pivot correctly. Start with the original code, without any enhancements. Modify the code for Sprite 2, making the following changes: Create a new variable ‘Input A’ to store the sensor value from ‘Resistance A’. Use this wherever ‘Input’ was used previously. Annoyingly, you will find that Sprite 2 is not positioned in the centre of the screen. Reposition it using this block: The green and red arrows should now respond independently, producing the display shown to the right. The second PicoBoard input Create the second sprite Modify the sprite’s image The resultant sprite Example of the finished display 6 P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/ Can you think of any further enhancements you could include to improve the display further?

7 Sources of Help General Scratch helphttp://scratch.mit.edu/help/ The Scratch website includes many examples of Scratch programs and tutorials. PicoBoard setuphttp://www.picocricket.com/picoboardsetupUSB.html References 7 Acknowledgements PicoBoard imagehttp://www.hobbytronics.co.uk/picoboard-scratch Voltmeter imagehttp://www.futurlec.com.au/Panel_Meters.jsp Generator imagehttp://www.mind.ilstu.edu/curriculum/medical_robotics/motors.php Sparkfun ProtoSnaphttps://www.sparkfun.com/products/10311 P roduced at Warwick University by Margaret Low (m.j.low@warwick.ac.uk), Simon Leigh (S.J.Leigh@warwick.ac.uk),m.j.low@warwick.ac.ukS.J.Leigh@warwick.ac.uk Bob Hodge Funded by Bloodhound SSC http://www.bloodhoundssc.com/ To download Scratch version 1.4 http://scratch.mit.edu/scratch_1.4 Software


Download ppt "2 - Pointer Speedometer Display 2 - Pointer Speedometer Display The speedometer on a car is traditionally a circular dial using around 270° of the arc."

Similar presentations


Ads by Google