Arduino Counter

This simple circuit was created to count the number of times that two buttons have been pressed alternatively.
The buttons must be pressed one after another to add +1 count, so the circuit could be used for counting the number of times a door or lid feature is opened and closed. The counting can’t continue until the full open/close cycle has been completed.
The number of button presses is displayed in the serial dialog box and also on a 16×2 LCD.

Link to the code is here: Lid_Counter_03

Data Logger for Thermocouple and Load Cell

The aim of this project was to develop the Arduino data logger to read a variety of sensors.
The first step was to develop the code from the last project and give additional functionality to the data logger.

Develop Data Logger
The following changes were made to the data logger code:
– The filename of the data file was changed to: “datalog.txt”
– The serial prompt was shortened from “file opened for writing” to “data stored”.
– A clock function was added.
– The clock recorded the start time of the test, as well as the time of each reading.
– Headings were added to the data file: “Light reading” and “time”
– Wires were connected from the arduino to the LCD: SDA to SDA, SCL to SCL, VCC and Ground

These tutorials were used:
Tutorial 1 – Video
Tutorial 1 – Code
Tutorial 2 – Video
Tutorial 2 – Code

The new data logger code is here: datalogger_shield_light_01

The arduino was setup to log data from a Thermocouple. A tutorial was used but it was not followed exactly. The circuit did not use a capacitor and the pins had to be changed from 9,10,13 to 7,8,9 to prevent interfering with the SD Card. The delay in the “loop” had to be changed from 1000 to 735 in order to get a 1 second delay between readings.

Thermocouple Tutorial Video
Thermocouple Tutorial Code

Wire setup:
So – Digital pin 8 (purple)
Cs – Digital pin 7 (blue)
Sck – Digital pin 9 (green)

Code link: datalogger_shield_thermo_01

Load Cell
The arduino was setup to log data from a load cell.
The load cell was calibrated using code from a tutorial. A stepper motor weighing 221g was placed on the load cell, to and the “calibration factor” was adjusted until the correct value was given. The “calibration factor” was changed from -7050 to +403 and the units were changed from lbs to grams.

Load Cell Tutorial

Wire setup:
SCK – Digital Pin 2 (yellow)
DT – Digital Pin 3 (orange)
VCC – 5V (red)

Code link: datalogger_shield_load_01

Data Logging Shield

This code was created to test out a data logging shield for arduino.

The arduino was connected to a photoresistor and LCD screen. The analog input of the photoresistor was monitored and recorded to an SD card at regular intervals, with the LCD screen showing the values as they were being recorded.
When the code is first run, it creates a txt file on the SD card with the filename “TEST.txt”. The data is then logged to this file.
The next step is to add clock functionality that can record the time the measurement was taken.

The code is here: datalogger_shield_code01

XY Robot

This robot was made with 3D printed parts and components from Open Builds part store.
The belts are fixed to the aluminium frame components and the robot moves relative to the belts.

The first version of the code uses four buttons to move the robot back and forth is the X and Y axis (two buttons for each axis). The code is here:

Controlling Arduino with an Android Phone

For this project I created on app on an Android phone and used it to control the outputs of an Arduino Uno.
The app was created with MIT’s App Inventor and an HC-06 module was used for bluetooth connectivity.
An LED can be turned on/off remotely using the buttons on the Android app.
The code and app programming was taken from this tutorial:
Controlling Arduino with an Android Phone Layout
Controlling Arduino with an Android Phone Photo

MeArm V0.4

I made a MeArm V0.4 using this tutorial:

I ordered most of the electronic parts from EBay and got the acrylic pieces cut by an online supplier. There’s also a kit available from Phenoptix which is probably cheaper overall.

I really like the design of the MeArm and there are some clever assembly features. The only issue I had was with some acrylic parts which had thin wall sections around the holes.Many of the screws have to be self-tapped into the acrylic which can increase the risk of cracking. I decided to use slightly shorter screws, and sometimes washers, to reduce the depth that the screws had to tap. I didn’t crack any parts, and the joints seem to be strong enough, so I would probably do this again.


Arduino: Bluetooth and Relay Circuit

In previous Ardunio projects I’ve experimented with Bluetooth modules and Relay shields.
In this project I combined the two features, creating a circuit that can control a high voltage solenoid using Bluetooth inputs from a PC.

The circuit consists of: an Arudino UNO, a Breadboard shield, an HC-06 Bluetooth module, a 5V Relay shield, a 24VDC solenoid, and a variable DC power supply.

The solenoid is connected to the variable DC power supply and Relay shield. The Relay shield is then controlled by the Arudino Uno, which gets its commands from the HC-06 Bluetooth module.

This Instructable was used to help with the code:

The HC-06 was set up with a voltage divider following this tutorial:
Note that the HC-06 needs to be disconnected when uploading the code. Also it will only be detectable as a bluetooth device once the Arduino has been disconnected from the computer and is running on external power.
Arduino, Bluetooth and Relay-001
Arduino, Bluetooth and Relay-Circuit-002

Arduino 5V Relay Shield Circuit

A simple circuit was created to test a Sunfounder, 2-Channel, 5V Arduino Relay Shield. The relay was set up to control a low powered circuit consisting of an LED, a 9V battery and a resistor.

In the next test, I plan to use the relay module with a variable DC power supply to activate one or more pinball solenoids.


An overview of the circuit:

– The VCC and GND pins of the relay module were connected to the 5V and GND pins of the Arduino.

– The input of the first relay was connected to Digital Output pin# 1 on the Arduino.

– The positive terminal of the 9V battery was connected to the COM (power) pin of the relay switch, and the NO (normally open) pin of the relay was connected back to the LED circuit.

– This tutorial provided some help.


Arudino Relay-Edit 002