The Cam Jam Edu Kit 2 - Learn How To Use Sensors With The Raspberry Pi

Using sensors with the Raspberry Pi can intimidate even the most seasoned Pi enthusiast due to the perceived complexity of the code and electronics involved.
With a lack of analogue inputs, it's easy to assume that using sensors with the Pi would involve a lot of work-arounds and headaches. That assumption can be true if you go it alone without any help or guidance - I've previously fiddled with MCP3008 ADCs and had mixed results.
To help us 'Average' people get our heads around sensors, the clever folks behind the CamJam EduKit have released their second kit - the 'EduKit 2 - Sensors'. It was released today at the CamJam 'Pi Wars' event.
The EduKit 2 is designed to teach you how to use sensors, and includes everything you need to get started - hardware, code examples and very clear and simple instructions.
I've worked though the kit and worksheets, so let me show you how I got on and what's included in the kit...

The CamJam EduKit 2 - Sensors


What's In The Box?
Just like the last EduKit, the EduKit 2 comes in a nice shiny metal tin - but this time it's a bit bigger to fit all of the cool hardware you get inside. I like how the EduKits come with a tin - they're very handy for storing bits and bobs, and can even be used as a home for your Pi.

The packed EduKit tin

The Edukit 2 contents (you get the tin too!)

Inside, you get:

  • A small breadboard
  • A selection of jumper wires
  • 3 resistors
  • PIR sensor
  • Buzzer
  • 2x large LEDs
  • Capacitor
  • Light sensor
  • Temperature sensor (in metal waterproof tube)


All this plus a cool tin to keep it in for £7 - happy days! If you have a Model A+ why not use the lid as a base?

The A+ Pi and small breadboard fit in the lid!

Sensor Study
I don't know about you, but I'd have no chance coding this lot without a tutorial and example code. This is exactly what is provided with the kit, and all goes back to the reason it has been made - to help teach people like us how to use sensors.
The idea is to progress through the worksheets, which start off nice and simple at a good pace, and then gradually get more advanced to build on top of your new knowledge with each following worksheet.
For example, Worksheet 5 shows you how to use the PIR sensor, whereas worksheet 6 will use that knowledge to make an alarm with LEDs and a buzzer (you learn LED and Buzzer control in the earlier sheets).
Worksheets
At the time of writing there are six worksheets available, which teach you how to use all of the sensors in the kit. There may be more added at a later date - you can sign-up to be notified of any additions.
Each worksheet teaches you how to use a different sensor, and gives you a challenge to complete at the end of each sheet.
Let's give you an idea of what the worksheets cover:
Worksheet 1 lays the foundations of the 'course' as such. it gets your Pi set up, updated and ready to learn. You'll learn how to make your Pi print "Hello World", which is a good starting point as it means you've successfully created and navigated directories, created a Python script and have a general feel for how to use your Pi.
Worksheet 2 moves on to introduce some components into your code - LEDs and a buzzer. Not just any LEDs though - these things are huge and look great once lit! You'l learn how to use Python to light these monster LEDs and sound the buzzer. Later on, you'll build on this code and include other sensors.

It's not the Police, it's Python!


Worksheet 3 puts the LEDs and buzzer to the side and teaches us about temperature sensors. This was one of my favourite sheets as it was very interactive. Once you have the code typed in and running, it's up to you what you use the sensor to measure as the probe is waterproof - try your hand, soil, bathwater and more (just remember that the Pi isn't waterproof!!).

The Dallas DS18B20 temperature sensor, sealed in the metal tube


Worksheet 4 is another standalone learning guide, this time for the Light Dependant Resistor (LDR). You'll learn all about how these work in conjunction with capacitors - the important component that help's the Pi understand the light levels without the need for analogue pins.

The LDR and Capacitor


Worksheet 5 introduces you to PIR (Passive Infrared) sensors - which sense movement. You'll probably recognise the white globe from your home alarm system or even some automatic light sensors - which work in the same way. In this worksheet you'll be making something similar that prints text when movement is detected.
My advice here is to be patient with the setup. Every PIR will act slightly differently and it took me a few minutes to get the settings right using the dials on the PIR module. Try TX to zero (full left) and SX to the middle (pointing down) and see how you go.

The PIR circuit is very simple

Worksheet 6 is the final worksheet and combines some of the sensors and code that you've used so far, to make a cool mini alarm project. Using the PIR, LEDs and buzzer - you'll make a system that lights up and buzzes when motion is detected.
There's also a challenge to only trigger the alarm when it is dark...now what could we use for that...? (Tip: It's in the tin!)

LEDs, Buzzer and the PIR work together to make an alarm

Summary
The 'EduKit 2 - Sensors' is a great sequel to the original EduKit and a very easy way to learn about sensors and the code that controls them. The kit gives you everything you need and requires no prior knowledge or any other hardware (other than a Pi of course).
The worksheets are what really 'make' this for me - it's rare to come across such comprehensive and easy to follow instructions included in a product under £10! I've learnt a lot using this sparkly tin of components and plan to make 'something' combining every single sensor in the tin - just because I can!
If you'd like you get your hands on one of these affordable kits, head over to The Pi Hut where they're available right now. More information can also be found on the CamJam website.

Continue reading here: NanoPi 2 From FriendlyARM

Was this article helpful?

0 0

Readers' Questions

  • mairi
    How to install camjam edukit temperature sensor?
    4 months ago
  • To install the CamJam EduKit temperature sensor, follow these steps:
    1. Make sure you have the necessary components: CamJam EduKit Raspberry Pi interface board, temperature sensor (DS18B20) with a 3-pin connector, male-to-female jumper wires (3), and a Raspberry Pi (with Raspbian OS installed).
    2. Power off your Raspberry Pi and disconnect it from any power source.
    3. Connect the male ends of the jumper wires to the GND, 3V3, and GPIO4 pins on the Raspberry Pi header. Ensure that the jumper wires are securely connected.
    4. Connect the female ends of the jumper wires to the corresponding pins on the CamJam EduKit interface board. The GND wire goes to GND, the 3V3 wire goes to 3V3, and the GPIO4 wire goes to IO.
    5. Connect the temperature sensor to the interface board's temperature sensor socket.
    6. Power on your Raspberry Pi.
    7. Open the terminal on your Raspberry Pi or SSH into it.
    8. Run the following command to enable the interface to read the temperature sensor:
    9. ``` sudo nano /boot/config.txt ```
    10. Find the line `#dtoverlay=w1-gpio` and remove the "#" at the beginning of the line to enable the interface.
    11. Save and exit the nano editor by pressing Ctrl+X, then Y, and Enter.
    12. Reboot the Raspberry Pi using the following command:
    13. ``` sudo reboot ```
    14. After the Raspberry Pi reboots, open the terminal again.
    15. Run the following command to load the required kernel modules:
    16. ``` sudo modprobe w1-gpio sudo modprobe w1-therm ```
    17. Navigate to the directory where the temperature data is stored:
    18. ``` cd /sys/bus/w1/devices/ ```
    19. List the available temperature devices using the following command:
    20. ``` ls ```
    21. You should see a device starting with "28-" followed by a unique serial number. Change the directory to the device using the command:
    22. ``` cd <device_serial_number> ```
    23. Display the temperature data from the sensor:
    24. ``` cat w1_slave ``` The output will provide the temperature reading in Celsius. You can extract and interpret the temperature within your Python or programming code. By following these steps, you have successfully installed the CamJam EduKit temperature sensor and can now read the temperature data using your Raspberry Pi.