pi-topCEED

Heart Rate Monitor

Keep to the beat! – Heart Rate Monitor Tutorial

Last tutorial in our LED trilogy! If you haven’t – then check out our Light It Up!-LED Tutorial and CEED Universe Compass Tutorial.

Components needed: 

  1. ADS1115 x 1
  2. LDR x  1
  3. LED x 1
  4. 510 kΩ Resistor x 1
  5. 5 Ω  Resistor  x 1
  6. Wires x 11
  7. pi-topPROTO board x 1

Background: This project was created with hearts in mind. It demonstrates and reveals a technique to measure the heart rate by sensing the change in blood volume in a finger artery while your heart is pumping! Compared to our last two tutorials, it is a bit more complex; however, it is perfect for an inter-curricular class or a fun family project for the weekend.  


Step 1: In this tutorial you will learn to make a heart-rate-monitor with an LED circuit on the pi-topPROTO board.

Step 2: The diagram below illustrates how the components should be soldered onto the pi-topPROTO board:

heart_rate_monitor_schem

 

9

 

Step 3: To build this circuit on the pi-topPROTO board, solder the LED to the board.

2.png

Step 4: Next solder in the resistor and complete the circuit using a wire.

3

Step 5: Now solder in the LDR (Light Dependent Resistor), its accompanying resistor and complete the circuit using another wire.

4.png

Step 6: The next step is to solder in the analogue to digital signal converter (ads1115) into the pi-topPROTO board.

5.png

 

Step 7: Connect the ads1115 to the 5V power supply.

7.png

 

 

Step 8: Connect I2C connections (SCL and SDA) on the ads1115 to pin 5 and pin 3 on the board respectively.

8.png

 

Step 9: Connect the ADDR pin to the GND pin on the ads1115 so as to define the I2C address on the ads1115 as 0x48.

9.png

 

Step 10: The next step is to move onto the python code! This can be done on your pi-topCEED. After you have booted your pi-topCEED up: click on the Main Menu, accessories and then open up a terminal window as seen in the screenshot below.

2016-06-02-132709_1366x768_scrot

 

Step 11: Type in “sudo idle &” into the terminal to open up idle 2 which will allow you to create a run python scripts on the Raspberry Pi!

2016-06-02-132941_1366x768_scrot

 

Step 12: Once the python shell environment has opened up, click File and then New to open up a new text editor. This text editor is where you will type your code, save and run the project! Once you run the project on the text editor the results will be displayed on the python shell environment that was previously mentioned.

2016-06-01-113610_1366x768_scrot

 

Step 13: The next step is to now copy the code below in the python text editor:

import matplotlib.pyplot as plt

import matplotlib.animation as animation

import time

import Adafruit_ADS1x15

import pylab

import numpy as np




from scipy.interpolate import interp1d

from scipy.signal import butter, lfilter, filtfilt




# from scipy.interpolate import spline

#get plot and draw axes

fig = plt.figure()

ax1 = fig.add_subplot(1,1,1)

moving_y = []

xaxisthings = []




startTime = time.time()




secondsShown = 5

secondsCalc = 5

plotHz = 20                        

totalWidth = plotHz*secondsShown

Oversample = 5




allY = [0]*plotHz*secondsShown

allX = [0]*plotHz*secondsShown

       

#function to set the next y value

def new_y_value():

   time.sleep(1/(plotHz * Oversample))

   return Adafruit_ADS1x15.ADS1115().read_adc(0, gain=16)

              

def animate(i):

   #add a new y value, and remove the first

   totaly = 0

   totalx = 0

   count = 0

   for j in range(secondsCalc * plotHz * Oversample)

       totaly +=new_y_value()

       totalx +=time.time()-startTime

       count+=1

       if count == Oversample:

           allY.append(totaly/Oversample)

           allX.append(totalx/Oversample)

           count = 0

           totalx = 0

           totaly = 0




   while len(allY) > (secondsShown*plotHz):

       allY.pop(0)

       allX.pop(0)

   

   ax1.clear()




   ax1.plot(allX,allY)

ani = animation.FuncAnimation(fig, animate, interval=1)

plt.show()

2016-06-01-113833_1366x768_scrot.png


 

Step 14: After creating your code, click on “File” and then “Save as” to save the code that you have written so that you can come back to it and run the code whenever you want!

Step 15: After saving your code, put you finger in between the LED and the LDR and press F5 to run your code and see your heartbeat displayed across the screen as seen in the image below!

Heart Rate Monitor.png
1

Light It Up! – LED Tutorial

Today we are ecstatic to announce that we have started shipping out our pi-topCEED. To get you started we’ve prepared a trilogy of projects. Let’s start the plug & play!

Components needed: 

  1. LED x 1
  2. 100Ω Resistor x 1
  3. Wire x 1
  4. pi-topPROTO board x 1

Background: LEDs are a particular type of diode that convert electrical energy into light. In fact, LED stands for “Light Emitting Diode”. They are all around us in daily life: in our phones, our cars and even our homes. It is highly likely that when something electrical lights up – there’s an LED behind it. For more on LEDs check out this link here.
Step 1: In this tutorial you will learn to make your first LED circuit on the pi-topPROTO board, that can be found by following the link here.
Step 2: This image below shows you diagram of the LED circuit and an empty pi-topPROTO board onto which the projects can be built!

 

led circuit_schem  1

 

Step 3:

  • Below is an image of how the circuit should be connected, with an LED, 100Ω resistor and a wire to complete the circuit.
  • The resistor is connected to ground and the negative terminal of the LED; a wire is connected to the 3V3 power source and the positive terminal of the LED. The longer of the two LED terminals is the positive terminal.
1

 

Step 4: Once the circuit has been soldered in place (please follow the link here  or watch it belwo, to take you to our video showing you how to solder onto a pi-topPROTO board,) all you have to do is slide the pi-topPROTO board into the HUB!

We would warn you to be very careful with soldering and take the necessary precautions! 🙂
If you are interested in learning more about LEDS please follow the link here. Or, continue with the next Tutorial: CEEDUniverse Compass Tutorial.

All (8) - Kopie

Extra pi-topCEED acrylic slice colour vote results!

Hi all,

Thank you to all our Indiegogo backers who participated in the latest pi-topCEED extra acrylic slice colour vote! We’ve now got the outcome for you and the results are…

 

ASColour.PNG

As you can see in the screenshot of the Pie Chart above it was a very close call. However, the prevailing winner is: dark blue!

                                         All (3).jpgAll (6) - Kopie

 

There we go – the second official pi-topCEED acrylic slice colour voted in by you.

Again, we can’t thank you enough for all your amazing support in our quest to bring affordable hardware and accessible computing to the world.

pi-top_bw_abstract2_1024

Hello world: pi-top starts blogging

Hello world,

Welcome to our new blog. We are pi-top. We want to see a world of makers creating real hardware product. Our aim is to make affordable technology that anyone can use to learn, play and create!

“Ryan and I started all this in my living room in London. We had days when we had to choose between buying more 3D printing filament or buying something other than pasta and tomato sauce to eat (we chose the filament every single time). Now we have a great office in London and a team of twelve people. Without our backers and community, our lives would be so different and much less fulfilling, and for that we are forever grateful.” – Jesse, pi-top CEO

On the 8th of December, 2014, pi-top closed its first Indiegogo campaign with 217% of the initial funding goal. If you haven’t heard, the pi-top is a Raspberry Pi powered DIY laptop. Since the successful campaign, we have improved the design, software and hardware of the pi-top to ship worldwide to 47 countries!

eSzBe4V

 

We are very proud of what we’ve achieved with our backers help. From our CTO Ryan Dunwoody’s five month stay in Shenzhen to get pi-top off the production line and into everyone’s homes, to our pride in the improvements we’ve made over the last year. (Image left: Ryan with the first production pi-top in China)

 

 

“When people give you their trust to produce something new, you must give everything else up.” – Jesse, pi-top CEO

The rewards are immeasurable – as you can observe via the images (below) sent to us by our backers through our Twitter.

e9CJt7j zQThml8

Now, as we move into our second year, we hope we will be able to continue improving, continue making, and continue bringing pi-top and our newest product, pi-topCEED, to as many people as possible.

LFPM5eB

(Image: left green pi-top and right grey pi-topCEED)

We will be using this blogs for Our Story – to make updates on our recent progress, some Food for Thought – covering industry topics (STEM, Education, Entrepreneurship, etc.), and Building – where we’ll be writing about some cool projects for pi-top and pi-topCEED. We hope you enjoy!

Upwards and onwards,

Your pi-top Team