Bodgers – Soldering & Crimping

Usually in the Bodgers group we use breadboards and jumper wires to connect our components together which is fine for prototyping, but today we looked at some techniques for making more permanent connections.

Soldering is a process in which two or more metal items are joined together by melting and then flowing a filler metal into the joint—the filler metal having a relatively low melting point. The metal to be soldered is heated with a soldering iron and then solder is melted into the connection. Only the solder melts, not the parts that are being soldered. Solder is a metallic “glue” that holds the parts together and forms a connection that allows electrical current to flow.

We started by soldering some header pins on stripboard, then we looked at using a desoldering pump to remove excess solder. Then we looked at stripping insulation from wire, soldering two wires together and using heat-shrink to re-insulate the wire.

An electrical crimp is a type of solderless electrical connection. Crimping is normally performed by first inserting the terminal into the crimp tool. The wire is then inserted into the terminal with the end of the wire flush with the exit of the terminal to maximize cross-sectional contact. Finally, the handles of the crimp tool are used to compress and reshape the terminal until it is cold-welded onto the wire. We crimped both insulated and uninsulated terminals onto some wire.

 

See you all next week.

Declan, Dave and Alaidh

Bodgers – RFM69 Radio Modules

 

DSC00227

Hello again everyone.

This week we looked at the Adafruit RFM69HCW Radio Module, these modules allow us to send messages between Arduinos without using Wifi or Bluetooth.

Adafruit have a tutorial here on setting up the module. The basic steps are:

  1. Solder on the header pins.
  2. Solder antenna or wire cut to the the proper length for the module/frequency
    • as our frequency is 433 MHz  we cut the wire to 16.5 cm.
  3. Wire up modules to your Arduinos
  4. Download the RadioHead library to your Arduino IDE.
  5. Load the RadioHead69_RawDemo_TX code from this library to the Arduino you’re using to transmit.
  6. Load the RadioHead69_RawDemo_RX code from this library to the Arduino you’re using to receive.
  7. Test

Next Saturday we will be putting all of the different components from our projects together and testing out how they work.

see you all then.

Declan, Dave and Alaidh

Bodgers – Texts & Emails

This week we looked at sending texts and emails from our python scripts.

To send text messages you will need to set up an account on Twilio which is a platform that allows coders to make and receive phone calls, send and receive text messages from their programmes. You then install the Twilio python library which will allow us to send texts from our script using code like this.


# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
account_sid = 'your account_sid'
auth_token = 'your auth_token'
client = Client(account_sid, auth_token)

message = client.messages \
                .create(
                     body="Hello Bodgers",
                     from_='+440123456789',
                     to='+353123456789'
                 )

print(message.sid)

To send an email we use smtplib which is an email library that’s built into python and which works well with Gmail. We need to change our Gmail setting to allow insecure apps and then we can use the code below to send our message.


import smtplib

server = smtplib.SMTP('smtp.gmail.com', 485)
server.starttls()
server.login("my.email@email.com", "myPassword")

msg = "Hello World"
server.sendmail("my.email@email.com", "some.email@email.com", msg)
server.quit()

See you all on Saturday

Declan, Dave and Alaidh

Bodgers – GPS

 

This week we looked at GPS which stands for Global Positioning System. The idea behind GPS is based on time and the position of  a network of  satellites. The satellites have very accurate clocks and the satellite locations are known with great precision.

Each GPS satellite continuously transmits a radio signal containing the current time and data about its position. The time delay between when the satellite transmits a signal and the receiver receives it is proportional to the distance from the satellite to the receiver. A GPS receiver monitors multiple satellites and uses their locations and the time it takes for the signals to reach it to determine its location . At a minimum, four satellites must be in view of the receiver for it to get a location fix.

We used the Adafruit Ultimate GPS Breakout connected to an Arduino as our GPS receiver. It’s very easy to set up, all we did was install the Adafruit GPS library on our Arduino and this gave us a load of programmes to chose from. We used the parsing sketch which gave us Longitude, Latitude and our location in degrees which we used with google maps to show our location.

See you all again on the 23/Mar/19

Declan, Dave and Alaidh

 

Bodgers – Pi Camera & OpenCV

This week in the Bodgers group we looked at the Pi Camera Module which is a high quality image sensor add-on board for the Raspberry Pi. You can capture images  from the command line with:

 raspistill -o cam.jpg 

This will take a jpeg picture called cam which will be saved in your home folder.

You can take a picture from your Python script with:


from time import sleep
from picamera import PiCamera

camera = PiCamera()
camera.resolution = (1024, 768)
camera.start_preview()
# Camera warm-up time
sleep(2)
camera.capture('foo.jpg')

This will save a picture called foo in the folder you ran your script from.

OpenCV (Open source computer vision) is a library of programming functions mainly aimed at real-time computer vision. We tried a couple of scripts out, one from the Hackers group, thanks Kevin, that detects colours and another one that detects shapes, we will be looking at this much more in the next few sessions but next Saturday we will look at using an Arduino and a Raspberry Pi together.

See you all then.

Declan, Dave and Alaidh

Bodgers – Introduction to Arduino

Hello again everyone.

I was away this week so Dave led the group, they did a couple of Arduino projects. They  revisited the traffic lights from December but this time used the Arduino to control them and then moved on to  a temperature and humidity sensor called the DHT11.

 

Here is the wiring diagram for  the traffic lights and you can find the code here.

arduino lights

 

Here is the wiring diagram for the DHT11 and the code is also on Dropbox here.

dht

We will be doing more with the Arduino particularly for some of our projects.

See you All again on Saturday

Declan, Dave and Alaidh

Bodgers – FreeCAD and Fritzing

Hello again everyone

This week we continued working on our Astro Pi entries and we also looked at FreeCAD and Fritzing which are tools that will help us with building our projects.

fritzing_freecad

FreeCAD, available for download from here, is used for 3D modelling and allows us design very complicated things from simple 3D shapes such as cubes and cylinders. Here are a couple of quick videos to get you started.

Then we looked at Fritzing, download from here, an application for drawing very easy to understand circuits, here’s how to draw a simple circuit using it.

 

Dave will be leading next Saturday’s session and I will see you again on the ninth of Feb.

Declan, Dave and Alaidh.

Bodgers – Traffic Light with Buzzer

This week we continued working with GPIO Zero, at the end of last week’s session we had started working on a simple LED traffic light, we finished of that this week and we added a buzzer to it.

circuit2

I had hoped to work on the HC-SR04 distance sensor but there seems to be an issue with them on the Raspberry Pi at the Moment.

Here is a video that demonstrates what we covered on Saturday.

See you all next Saturday (08-Dec) for our Christmas party.

Declan, Dave and Alaidh

 

Bodgers – Introducing Gpio Zero

Hi again everyone.

This week we started looking at physical computing and the Raspberry Pi. This involves attaching various components such as sensors, motors or controllers to the GPIO pins on our Pi. This week we connected a LED and two buttons, and we used the GPIO Zero module for Python to control them. I’ve made a video, it’s a little bit long, that covers everything from Saturday’s session.

 

At the end of the session the group started working on a traffic light idea and we will combine this with HC-SR04 ultrasonic distance sensor next week to create a measuring device.

I don’t have any slides this week as we worked directly from the GPIO Zero Documentation available at https://gpiozero.readthedocs.io. This is also available on Dropbox, along with this week’s code and a sheet that contains a drawing of our circuit and drawing of the GPIO pin layout, here: https://www.dropbox.com/sh/k26mbrfmdvq9tro/AAB5jfjkIlBqLhfnUAVVUvtJa?dl=0.

See you all next Saturday.

Declan, Dave and Alaidh.

Bodgers – Making Pictures With LEDs

Hello again everyone.

We started of this week’s session by looking at the recent Soyuz rocket launch which was to send two people to the ISS. During the launch one of the booster rockets failed and the launch had to be aborted. Both crew members, astronaut Nick Hague and cosmonaut Aleksey Ovchinin, escaped without injuries.

We then continued to work on our pictures and messages for the Mission Zero Challenge. I made a video of some of the work we did, but it’s very hard to film LEDs so the quality is very poor.

If you want to find out more about the Soyuz incident and have another look at how to make pictures and messages with the Sense-hat LEDs my notes are here day 4.

Next Saturday we’ll start looking at Pygame Zero. See you all then.

Declan, Dave and Alaidh