Raspberry Pi-monitored chemical reactor ?

In Hello World issue 7, Steven Weir introduces a Raspberry Pi into the classroom to monitor a classic science experiment.

A Raspberry Pi can be used to monitor the reaction between hydrochloric acid and sodium thiosulphate to complement a popular GCSE Chemistry practical.

The rate of reaction between hydrochloric acid and sodium thiosulphate is typically studied as part of GCSE Chemistry. The experiment involves measuring the time required for the reaction mixture to turn cloudy, due to the formation of sulphur as a precipitate. Students can then change the temperature or concentration of the reactants to study their effect on the rate of reaction. The time for the reaction mixture to turn cloudy is normally facilitated by recording the time a hand-drawn cross takes to become obscured when placed underneath a glass vessel holding the reaction mixture. This timing is prone to variability due to operator judgement of when the cross first becomes obscured. This variability can legitimately be discussed as part of the lesson. However, the element of operator judgement can be avoided using a Raspberry Pi-monitored chemical reactor.

The chemical reactor

Attached to a glass jar of approximate 80ml volume (the size is not critical) are two drinking straws, of which one houses a white LED (light-emitting diode) and the other a LDR (light-dependent resistor). The jar is covered in black tape to minimise intrusion of ambient light. The reactor is shown in Figure 1, along with details of other electrical components and connection instructions to a Raspberry Pi.

Figure 1
A: Reactor covered in black tape
B: Drinking straw attached to the reactor, with a further straw inserted housing a white LED
C: Drinking straw attached to the reactor, with a further straw inserted housing a LDR
D: 220Ω resistor to connect to the LED and GPIO 23
E: Wire to connect to ground
F: Wire to connect to 3.3v supply
G: 1µF capacitor to connect to ground
H: Crocodile clip to connect to GPIO 27 (NB: the other end of the wire is situated in between the capacitor and the LDR)

Results

The Python code shown in Figure 2 should be run prior to addition of chemicals to the reactor. Instructions appear on the screen to prompt chemical additions and to start data collection.

Figure 2: Python code for the chemical reactor

Figure 3 shows the results from the experiment when 25ml 0.1M hydrochloric acid is reacted with 25ml 0.15M sodium thiosulphate at 20°C. The reaction is complete at the time the light transmission first reads 0, (i.e. complete obscuration of the light by the precipitate formation) — in this example, that time is 45.4s. For more advanced students, tangents can be drawn at various points on the curve, and gradients calculated to determine the maximum rate of reaction from various reaction conditions.

Figure 3: Graph showing the change in light transmission with time

Download Hello World for free

Download your free copy of Hello World issue 7 today from the Hello World website, where you’ll also find all previous issues. And if you’re an educator in the UK, you’ll have the chance sign up to receive free hard copies to your door!

3 comments

Avatar

Nice, I might re-use some of that code for a similar purpose, I want to use it for burn-testing torch batteries for scuba diving. All I need is for the light sensor to notice when the torch has gone out and tell me how long it lasted.

Avatar

Excellent application.
You could modify the aparatus slightly to make a colorimiter, just replace the led with the color you want to test absorbance with (blue led for red or yellow stuff, red led for blue stuff, etc.)
In addition, if you take the negative log of transmittance you get absorbance which changes proportionally with concentration. This is more useful if you want to actually calculate rates (as you mentioned for your advanced students).

Avatar

Very cool. Building the reactor would also be a useful learning experience. The Pi and other electronics could be packaged into a kit and students would then have to scrounge around to find the other components like straws.

Leave a Comment

Comments are closed