Sunday, 30 January 2022

Making a radio controlled boat to take environmental readings at the Shannon Wetlands

So this is an activity which I though would inspire young people to get involved in taking and processing environment data.

It's goal is to making a boat that can carry environmental sensors to the centre of the Shannon Wetlands ponds.

My thinking being two fish tank water pumps could be the motors with their power controlled by a BBC micro:bit which could receive commands remotely from another micro:bit. The boat could be made of cardboard which is waterproofed by gaffer tape. The motor control board and code from the Kitronix Move mini robot could be re-used.

So it composes of 5 elements:

1) A waterproof hull (cardboard covered with black plastic gaffer tape)

2) A motor (two water pumps taped to the rear of the boat)

3) A receiver that controls the motors (a BBC micro:bit and motor board from a Kitronix Move)

4) A power source on the boat (a 5v USB power bank)

5) A remote control (another BBC micro:bit using tilt control for direction / speed / full stop)


The code had to provide individual power control to two submersed water pumps which provide propulsion for the boat. That is 100% power to both pumps is full steam ahead, 0% to both is full stop and 100% to left pump (starboard) and 0% to right pump (port) would turn the boat left, etc.

The MOVE mini code is a good starting point:


The Kitronix MOVE mini: https://kitronik.co.uk/products/5624-move-mini-buggy-kit-excl-microbit.html

The Servo:Lite motor board can drive up to 1A: https://resources.kitronik.co.uk/pdf/5623-servo-lite-datasheet.pdf

Library to control motor board: https://github.com/KitronikLtd/pxt-kitronik-servo-lite

Looking at their the servos what VCC, GND amd Cobtrol. And looking at the GIT library code this Control wire is drive by:

    export function forward(): void {

        pins.servoWritePin(AnalogPin.P1, 0);

        pins.servoWritePin(AnalogPin.P2, 180);

    }


    export function backward(): void {

        pins.servoWritePin(AnalogPin.P1, 180);

        pins.servoWritePin(AnalogPin.P2, 0);

    }


    export function left(): void {

        pins.servoWritePin(AnalogPin.P1, 0);

        pins.servoWritePin(AnalogPin.P2, 0);

    }

    export function right(): void {

        pins.servoWritePin(AnalogPin.P1, 180);

        pins.servoWritePin(AnalogPin.P2, 180);

    }

    export function stop(): void {

        pins.analogWritePin(AnalogPin.P1, 0);

        pins.analogWritePin(AnalogPin.P2, 0);

    }

    export function neutral(): void {

        pins.servoWritePin(AnalogPin.P1, 90);

        pins.servoWritePin(AnalogPin.P2, 90);

    }


So this the analogue voltage presented to P1 and P2 controls the servo motor.

https://www.ebay.co.uk/itm/284556271865


http://www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/stores/sg90_datasheet.pdf


But for the boat I just want a voltage!




Parts list:

1) 2x DC 2.5V / 6V Small Mini Water Pump Fish Tank Fountain Aquarium Micro Submersible bought from ebay.ie for £3.50 each.

2) Re-used guts of https://kitronik.co.uk/products/5652-move-mini-mk2-buggy-kit-excl-microbit

3) Cardboard and black duck tape

4) 2x BBC micro:bit

5) 2x 5v USB power banks (from Dealz for 1.50 euro each)











Measuring Electricty Usage

The simplest way is to just read your meter and log the results. (Hopefully, eventually, the new smart meters will allow people to do that electronically!)

A less time consuming way is to install a monitor.

Though you will always need to check and apply a fudge factor to the readings from the monitor so it agrees with your true meter reading.

OK. So how do we go about all this?

Well, if you look at your electricity bills you will see your usage over the billing period (typically every one or two months).

Here's the values for a 3 bed semi in Shannon Town:

Bill

Start

Reading

Type

End

Reading

Type

Usage

15/12/20

01/11/20

92782

E

30/11/20

105

E

260.56

12/01/21

01/12/20

105

E

31/12/20

213

E

107.37

10/02/21

01/01/21

213

E

31/01/21

473

E

260.66

11/03/21

01/02/21

473

E

28/02/21

705

E

231.26

12/04/21

01/03/21

705

E

31/03/21

946

E

241.35

11/05/21

01/04/21

946

E

30/04/21

1314

E

368.30

14/06/21

01/05/21

1314

E

31/05/21

1531

E

217.04

12/07/21

01/06/21

1531

E

31/06/21

1782

E

251.03

11/08/21

01/07/21

1782

E

31/07/21

1992

E

209.20

08/09/21

01/08/21

1992

E

14/08/21

2091

E

99.09

13/09/21

15/08/21

2091

E

31/08/21

2167

E

76.72

12/10/21

01/09/21

2167

E

30/09/21

2385

E

217.20

12/11/21

01/10/21

2385

E

31/10/21

2490

E

104.98

15/12/21

01/11/21

2490

E

30/11/21

2729

E

238.94

13/01/22

01/12/21

2729

E

31/12/21

2903

E

174.78


And for a 5 bed detached single story cottage in the Mayo countryside.

Bill

Start

Reading

Type

Interim

Reading

Type

End

Reading

Type

Usage

16/12/20

16/10/20

61391

E

15/12/20

62092

A

16/12/20

62150

E

714

16/02/21

16/12/20

62105

E

20/12/20

62141

C

16/02/21

62659

E

554

16/04/21

16/02/21

62659

E




16/04/21

63139

E

480

16/06/21

16/04/21

63139

E

10/05/21

63918

C

16/06/21

64337

E

1198

16/08/21

16/06/21

64337

E

18/06/21

64456

A

12/08/21

65066

C

729

16/10/21

12/08/21

65066

C




16/10/21

65830

E

764

16/12/21

16/10/21

65830

E




13/12/21

67102

A

1272


So what next? Well what about heating oil usage?


So what does all this say? Well if you average the amount of oil (one litre of kerosene is approx. 9 units) and electricity used you find this is the average daily energy usage over the year 2021:

Shannon:

Mayo:


Now with technology all of this monitor and logging can be done automatically with a physical check every month of so to ensure its accuracy.










Sunday, 23 January 2022

NodeMCU V3.4 ESP8266 ESP-12 E

Bought 10x of these on 23/1/22 for less than 70 euros but haven't done anything with them yet. They all have soldered legs for breadboard work.