Guys,
The BBC wants to put together suitable projects for year 7 ( 11-12 yr olds )
They won't have heard of Hall Probes until much later, let alone be able to argue that those things are non-invasive and don't heat up. So much of this thread has been off-putting and contrary to the educational goal.
Back to the original posting of "how to measure up to 5 Amps" with the BBC microbit.
Avoid AC, as that is year 8 +.
Pick a task which should be understandable to a year 7; for example to measure the DC current through a car front sidelight or indicator bulb when connected to a 12V car battery or school DC power supply. The apparatus must be safe to use with all 12V bulbs up to 120W headlamp size. Please can a science teacher modify this as appropriate for their year 7 class.
Choose a sense resistance which won't get hot, as that would complicate things and could be unsafe.
I'd use 6 to 12 feet of ordinary mains cable, 15Amp rated. This can be scrap cut off any broken household appliance.
You also need two lengths of thin wire; awg28 single strand would do. A teacher must supply the reel.
Strip and connect the blue and brown wires to the two terminals of the device under test (possibly by screwing onto something which the teacher has made to hold 12V lamps). A scrap automotive indicator lamp housing needs spade terminals, which can be crimped which is too fiddly, so use lengths of crocodile-clip 4mm banana-plug wire instead. Tape down the wires where there is no risk of them short-circuiting if knocked.
Cut and strip brown and blue at the other end of the scrap mains wire.
Twist your first thin wire onto the blue and attach those to car battery - or the black of a school DC power supply or the black of a scrap ATX desktop computer power supply.
Connect this first thin wire to GND of your microbit by croc or solder.
Twist or croc your second thin wire to the lamp end of the blue wire.
Croc that to pin0 of your microbit.
Visually inspect your device under test and go through the following checklist:
0. Are all connections present and as the diagram in your science notebook ?
1. Does blue at supply end connect to microbit GND and power supply {BLACK or - or 0V} ?
2. Does blue at lamp end connect to microbit pin 0 and device-under-test - ?
3. Does brown at lamp end connect to device-under-test + ?
4. Are all cables and connectors placed where they won't get knocked, taped if necessary, and firmly connected?
[next, someone is going to add a method to get AD0 readings on a microbit at the right level for a year-7 to follow]
[someone from microbit needs to write here whether it is better to have a resistance such as 1k in the path to pad 0. What is the input impedance of the microbit pad0 when used as AD0 in?]
If all checks 0 to 4 were PASS then connect brown at supply end to the + terminal of the car battery or the {RED or + or +12V} of your power supply. While the supply is ON the bulb should light.
[note for teachers on using scrap ATX supplies from desktop computers]
Opening the case of any scrap old desktop, it is usually possibly to undo four screws, fiddle with the various 4-pin molex connectors and 20 or 24 pin main connector, and recover an ATX power supply which is useful for experiments at 1 to 10 Amps 12 Volts, and also 5Volts.
- advantages - cuts out if overloaded or short-circuited. big and cheap.
- disadvantages - fixed supply, often 11.6V with no adjustment
To switch it on, provide mains power and check that any switches are "ON".
On the 20 or 24 pin main connector, link GREEN to BLACK. A paperclip can be bent to do this.
With a multimeter, check that one of the red-black-black-yellow cables with a 4-pin molex shows +5, 0, 0, +12 Volts.
That is a PASS, after which you can switch it off, cut and strip a BLACK and YELLOW wire for 12V experiments.
[questions about ADC on the microbit]
Expecting 0.1 ohms in a six-foot cable, 5Amps gives about 0.5 Volts from microbit GND to microbit PIN0.
Is there a prescaler on the ADC which can be set to an appropriate range ?
How many bits is the AD raw number ?
What is the settling time and a sensible interval between records to sum in a measurement ?
What is the precision and accuracy of the AD?
[example answers for an arduino nano v3, these would be :
in setup, prescaler should be set to 1.1V range
AD is ten-bit
measurements every 0.01 seconds are about right
there is not a lot of point in summing more than four measurements for 12bit indication]
Hopefully the "measure up to 5A" task can be made less frightening than the posts above, which are definitely not at year-7 level.
So far I've written only the hardware description to present about 0 to 0.5 Volts to the microbit AD0 proportional to 0 to 5 Amps DC. I've not seen anything yet of the spec sheet or programming requirements, so can someone else do that. It needs at least some calibration, which could be as simple as writing the code with a suitable calibration constant in it. Teachers might want to introduce some mention of integer and float number types in computers, as raw AD and calibrated Amps provide clear and understandable examples of the two types.
okeyy..I never work with the acs712..i willmake some research..so with this component I have to built the circuit that will enable me to measure the AC current?