Add the 'electricity' lesson to the science exp course (#645)

This commit is contained in:
Galen Nickel 2018-02-14 18:11:09 -08:00 committed by Peli de Halleux
parent 6d38db5741
commit 7b8ea3780c
9 changed files with 252 additions and 2 deletions

View File

@ -135,7 +135,10 @@
* [Overview](/courses/ucp-science/data-collection/overview)
* [Setup and procedure](/courses/ucp-science/data-collection/setup-procedure)
* [Resources](/courses/ucp-science/data-collection/resources)
* [Electricity](/courses/ucp-science/electricity)
* [Overview](/courses/ucp-science/electricity/overview)
* [Setup and procedure](/courses/ucp-science/electricity/setup-procedure)
* [Resources](/courses/ucp-science/electricity/resources)
## #reference

View File

@ -20,7 +20,7 @@ The lesson series includes:
* Soil Moisture Tester
* Body Electrical & Waves
* Magnetic Forces
* Electricity - Battery Tester
* [Electricity - Battery Tester](/courses/ucp-science/electricity)
The [micro:bit Science Experiments](https://sites.google.com/view/utahcodingproject/csta/microbit-science-experiments) lesson series is generously provided by the [Utah Coding Project](https://sites.google.com/view/utahcodingproject/home) and is developed by [Carl Lyman](mailto:utahcoding@outlook.com).

View File

@ -0,0 +1,15 @@
# Electricity -- Battery tester
This lesson observes the force of electricity. The charge in several batteries is measured by the micro:bit to see how much electric force is present in each one. The results are recorded to analyze the condition of each battery. As an application of the experiment, batteries in poor condition (mostly discharged) can be noted and properly disposed of.
## Contents
* [Overview](/courses/ucp-science/electricity/overview)
* [Setup and procedure](/courses/ucp-science/electricity/setup-procedure)
* [Resources](/courses/ucp-science/electricity/resources)
<br/>
| | | |
|-|-|-|
| Adapted from "[Electricity - Battery Tester](https://drive.google.com/open?id=15Xry9jFsIzHHG7RpaIomLodl9pBjTiKDvtjkd227b7Y)" by [C Lyman](http://utahcoding.org) | | [![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/) |

View File

@ -0,0 +1,40 @@
# Overview
## Science Concept
### Electrical Force
The force of attraction or repulsion between charged particles is called electric force. The
strength of the electric force depends on several factors. It depends on how many electrons or protons there are. It also depends on the distance between the charged particles. How do you think the force will change if you increase or decrease the distance? ([ck12.org - Electric Charge and Electric Force](https://www.ck12.org/book/CK-12-Physical-Science-Concepts-For-Middle-School/section/5.61/)). One of the applied projects will be to create a way to test different batteries to see if they are still any good using a micro:bit.
![micro:bit battery tester](/static/courses/ucp-science/electricity/battery-tester.jpg)
## Project Goal
Give students real world experience with coding, collecting data, analyzing data, and reporting results using [MakeCodes](https://makecode.com) block programming and a [micro:bit](http://microbit.org) with its sensors.
## Prior Knowledge
Students need to have a basic knowledge of how to code using block style programming (micro:bit using the Windows 10 MakeCode app) and download a program to a micro:bit.
## Student Outcomes
Students will:
* Create experiments to collect data using micro:bits and the pins to measure electrical voltage.
* Setup different experiments to observe the electricity, voltage, and other electrical effects.
* Code the micro:bits to collect data.
* Analyze the data collected.
## Materials Needed
* 1 micro:bit with the battery pack connected
* A longer USB micro:bit cable
* Copper wire or alligator clips
* Spreadsheet for data analysis
* Old batteries for testing
<br/>
| | | |
|-|-|-|
| Adapted from "[Electricity - Battery Tester](https://drive.google.com/open?id=15Xry9jFsIzHHG7RpaIomLodl9pBjTiKDvtjkd227b7Y)" by [C Lyman](http://utahcoding.org) | | [![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/) |

View File

@ -0,0 +1,65 @@
# Resources
## Utah Science with Engineering Education (SEEd)
* [Utah Science Website](https://schools.utah.gov/curr/science)
* [Utah Grades 6-8 SEEd Standards](https://schools.utah.gov/file/265a0b53-b6a7-48fb-b253-b6a5f38ffe19)
* [Sixth grade OER Science text](https://eq.uen.org/emedia/items/dae58176-b839-4b26-87e4-09ca5ed98875/1/Grade6RS.pdf)
* [Seventh grade OER Science text](https://eq.uen.org/emedia/items/afd89ff1-054c-4ac5-a712-67f4c6029644/1/Grade7RS.pdf)
* [Eighth grade OER Science text](https://eq.uen.org/emedia/items/e5219302-32b9-4c2f-ad65-38f303da6654/1/Grade8RS.pdf)
## NGSS - Utah SEEd
Strand 7.1: Forces are Interactions between Matter
* Standard 7.1.3
>Construct a model using observational evidence to describe the nature of fields existing between objects that exert forces on each other even though the objects are not in contact. Emphasize the cause and effect relationship between properties of objects (such as magnets or electrically-charged objects) and the forces they exert.
* Standard 7.1.4
>Collect and analyze data to determine the factors that affect the strength of electric and magnetic forces. Examples could include electromagnets, electric motors, or generators. Examples of data could include the effect of the number of turns of wire on the strength of an electromagnet, or of increasing the number or strength of magnets on the speed of an electric motor.
## CSTA Standards
Computer Science Teachers Association (CSTA) Standards 2017.
http://www.csteachers.org/page/standards.
### Level 2 (Grades 6-8)
#### Computing Systems
* 02 — Design projects that combine hardware and so􀁸ware components to collect and exchange data.
* 03 — Systematically identify and fix problems with computing devices and their components.
#### Networks & the Internet
* 04 — Model the role of protocols in transmitting data across networks and the Internet.
#### Data & Analysis
* 07 — Represent data using multiple encoding schemes.
* 08 — Collect data using computational tools and transform the data to make it more useful and reliable.
* 09 — Refine computational models based on the data they have generated.
#### Algorithms & Programming
* 11 — Create clearly named variables that represent different data types and perform operations on their values.
* 12 — Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.
* 13 — Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.
* 17 — Systematically test and refine programs using a range of test cases.
* 19 — Document programs in order to make them easier to follow, test, and debug.
## micro:bit
* [Microbit.org](http://microbit.org)
* [MakeCode.com](https://makecode.com)
* [Utah Coding Project](http://utahcoding.org)
* [Blog entry on Windows 10 MakeCode app](https://sites.google.com/view/utahcodingproject/blog/2018-jan-makecode-app)
<br/>
| | | |
|-|-|-|
| Adapted from "[Electricity - Battery Tester](https://drive.google.com/open?id=15Xry9jFsIzHHG7RpaIomLodl9pBjTiKDvtjkd227b7Y)" by [C Lyman](http://utahcoding.org) | | [![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/) |

View File

@ -0,0 +1,127 @@
# Setup and procedure
## Setup
**1.** Plan and design the experiments.<br/>
**2.** Connect the wires to the micro:bit with connections at pin **0** and the ground pin. The pin **0** will connect to the positive ( + ) end of the battery. The **GND** will connect to the negative ( - ) end of the battery.<br/>
**3.** Sample data from batteries with a voltmeter. This gives a way to “calibrate” the micro:bits program.
![Connect a the test battery to the micro:bit](/static/courses/ucp-science/electricity/battery-tester-connect.jpg)
### ~hint
When the voltage is read using the 3V pin and the ground readings are around 1020. The analog voltage reading is converted to digital reading with 3 volts approaching the 1023 upper limit. A 1.5 volt reading should return a reading around 512 on the micro:bit when it is converted from analog to digital. If no wires are connected it can give a reading of about 250.
### ~
You can tabulate your readings like this:
>| voltage (voltmeter) | | micro:bit reading (0-1023) |
|-|-|-|
| 0 | | 276 |
| 0 | | 286 |
| 1.27 | | 441 |
| 1.47 | | 509 |
| 1.00 | | 391 |
| 1.45 | | 506 |
**4.** Plan and design data collection documents.<br/>
**5.** Program the micro:bit.<br/>
**6.** When the battery is connected to the micro:bit. buttton **A** will give a reading. Button **B** will give a reading in millivolts converted from the digital reading on pin **0**.<br/>
**7.** Experiment with different batteries. Use good batteries and some older batteries.<br/>
**8.** Report on the findings and observations in the experiments.
## Code
This project will use a micro:bit to read the voltage of an old battery to see if it is a good battery or needs to be thrown away.
### MakeCode Programming Environment
1. Open the MakeCode micro:bit editor in a browser at: @homeurl@.
2. Or download and use the [Windows 10 MakeCode](https://www.microsoft.com/store/apps/9PJC7SV48LCX) app.
### on Start event
1. Name the project, “Battery Tester”.
2. The ``||basic:on start||`` event will display the title and purpose of the micro:bit in all caps, `"BATTERY TESTER"`. The text is put in the ``||basic:show string||`` block (The title is put in the ``||basic:on start||`` event so when the micro:bit is started up it will show what it is programmed to do. It is done in all CAPS because it is easier to read as it is displayed in the LED display).
3. Add comments to the ``||basic:on start||`` event: Name the project, creator, and date created.
![Add comments to the on start block](/static/courses/ucp-science/electricity/add-comments.gif)
```blocks
// Battery tester
// C Lyman
// Nov 2017
basic.showString("BATTERY TESTER");
```
### on Button “A” Pressed event
1. The “on button “A” pressed event will be used to read the voltage between the GND and pin0 and display it on micro:bit LED display.
2. The micro:bit will then pause for 2 seconds.
```blocks
input.onButtonPressed(Button.A, () => {
basic.showNumber(pins.analogReadPin(AnalogPin.P0))
basic.pause(2000)
})
```
### on Button “B” Pressed event
1. The code for on button **B** pressed is designed to return a converted value for the batterys voltage in millivolts (1.5 volt = 1500 millivolts).
2. The beginning of the first statement a variable “voltage” is created and given a value of the reading from the analog reading of pin **0**. The number is then multiplied by 1000 and divided by 340.
3. If 3 volts gives a reading of about 1023 then 1 volt should read around 340. (340 = 1024 / 3). Using this ratio and multiplying the number by 1000 should convert the number to millivolts (micro:bits only do integer math so the voltage is multiplied by 1000 before doing the division by 340).
```block
// Convert analog reading to millivolts
input.onButtonPressed(Button.B, () => {
let voltage = pins.analogReadPin(AnalogPin.P0)
voltage = voltage * 1000 / 340
basic.showNumber(voltage)
})
```
#### Go to the code
4. Switching to JavaScript instead of working in the block environment makes it easier to do the math. Once the math is done in JavaScript it can be switched back to blocks.
5. The last line displays the value converted millivolts on the LED display.
```typescript
// Convert analog reading to millivolts
input.onButtonPressed(Button.B, () => {
let voltage = pins.analogReadPin(AnalogPin.P0)
voltage = voltage * 1000 / 340
basic.showNumber(voltage)
})
```
Shared "Battery Tester" program: https://makecode.microbit.org/_LMwfCCgmVfiP
## Extensions
### Add battery status
Set up the experiment to use an ``A+B`` button press to check some conditions to display the status of the battery. The algorithm is shown below:
```
if (condition 1)
action “good”
else if (condition 2)
action “weak”
else
action “poor”
```
### Moving a magnet through copper wires
Set up an experiment using a loop of copper wires and see if the micro:bit can detect electricity being generated by moving the magnet in the loop.
## Data Collection
Log each battery tested to make decision on which of the batteries are good and which ones need to be disposed of.
<br/>
| | | |
|-|-|-|
| Adapted from "[Electricity - Battery Tester](https://drive.google.com/open?id=15Xry9jFsIzHHG7RpaIomLodl9pBjTiKDvtjkd227b7Y)" by [C Lyman](http://utahcoding.org) | | [![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/) |

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB