A Model Lighthouse

Designed and built at the Sheffield Hackspace using an arduino and bits and pieces of things that you might find lying around in your own home…

Here’s the setup:

An arduino (pro mini) for controlling the SG-90 servo motor
An ESP8266 for wifi access and neopixel control
A piece of gutter and downpipe for the main body
A plastic dome sourced from a solar powered garden lamp
An Aldi’s peanut butter jam jar lid (crucial)
Other bits and bobs scrounged from various unwanted poundland items

If you think this is cool wait until you see the boats!

Compiling and uploading Arduino sketches from within Notepad++

Notepad++ is my favourite editor for Arduino sketches, but it lacks the facility to compile and upload sketches directly to the Arduino boards. The usual procedure would be to save the sketch in Notepad++, switch to the Arduino IDE then compile/upload.

However, there is a plug-in for Notepad++ which enables you to run external commands – this post describes how to set it up for the Arduino IDE.

Install the plugin

First ensure you have the latest version of Notepad++ (currently version 7.6.6) and select the menu item under ‘Plugins Admin…’.

Then select the ‘NppExec’ plugin and click install.

Set up the commands to execute

After it installs, you’ll be able to select ‘Execute…’ from the new sub-menu (or simply press ‘f6’), which will display the ‘Execute…’ dialog box.

The empty ‘Execute…’ dialog box will display.

Enter the following text into the command(s) window, ensuring the path points to your ‘arduino_debug.exe’.

set arduino_path = "C:\Program Files (x86)\Arduino\arduino_debug"
npp_save
inputbox "Enter the COM port of your Arduino (e.g., COM1):"
cmd /c $(arduino_path) --port $(input) --upload $(full_current_path)
Commands are remembered in the Execute window

Pressing ‘OK’ will allow you to enter the COM port (this is shown in the Arduino IDE ‘Tools’ menu).

Select a COM port

Press ‘OK’ and the process of compiliation and uploading will begin.

A pane opens in Notepad++ and displays the Arduino compilaition progress

To VERIFY without uploading, the commands in the Execute window will be simpler with only 3 lines –

set arduino_path = "E:\Arduino\arduino-1.8.9-PORTABLE\arduino_debug.exe"
npp_save
cmd /c $(arduino_path) --verify $(full_current_path) --verbose-build

STORING COMMANDS

You can store the commands in the Execute window by using the Save… button. I named my stored command scripts ‘Upload’ and ‘Verify’. Stored commands will then be available in the drop-down box.

Your stored command scripts are selected here

SUMMARY OF HOW TO USE IT

  • Press f6
  • If you have stored commands, select one from the dropdown box
  • Click OK

TIPS

  • Keep the Arduino IDE open with your sketch (not required, but helpful).
  • Ensure the Board type, COM port, etc. are correctly set in the Arduino IDE.
  • In Arduino IDE select external editor (File -> Preferences -> Settings Use External editor
  • Ensure the serial port monitor is not open.

Simply Crochet Robot

CSFZeZfXIAACp0b
[Post by SHHM member Sarah Cullen]

I enjoy mixing traditional crafts with tech. A while ago I decided to teach myself crochet, mostly using YouTube and a couple of crochet books. I found a pattern for a crochet robot toy and decided that instead of just crocheting buttons and a light, I’d use sewable electronics instead.

The crochet pattern came from Issue 16 of Simply Crochet.

I used a CR32 coin cell battery holder, battery, sewable steel thread and a large red LED for the light on the robot’s head.
To sew the light on, I pushed the legs of the LED through the top of the crocheted head and then used round nose pliers to coil each leg out to the side, flat against the crochet. On the inside of the head, I stitched from the negative terminal of the battery holder, lightly through half of the thickness of the crochet (so the thread didn’t show on the outside of the robot) to the negative leg of the LED. When sewing through the coil of the leg of the LED, I sewed knots as I went, as the steel thread has a bit of spring to it, and so wants to open up, but this can break the connections in your circuit. I did the same thing, with a separate piece of steel thread, for the positive side of the LED and battery.

The buttons on the front of the robot are a bit more involved. They needed 2 battery’s worth of power and a LilyTiny circuit board to create the flashing. The batteries are connected to the LilyTiny and then the LilyTiny is connected to the LEDs. Although the LilyTiny is designed for 4 LEDs, I connected more, in parallel, as I had more than 4 buttons that needed illuminating. The default patterns programmed into the LilyTiny were fine, so I didn’t need to reprogramme it.

The end result is here:

More LED crochet
I followed that project up with some a monkey & ninja from the Creepy But Cute crochet book and a pirate pattern from the author’s website. Rather than sewing their expressions on, I gave them sewable LED eyes. These were added behind the felt patches that are their faces. The battery holder is under each creature, which has meant I’ve needed to add a ring of chain stitch to the base, to hide the holder and stabilise each creature.

More recently, I made the robot from the Creepy But Cute book. Gee made a small circuit with cyclon style red LEDs that I used for its eyes. As these aren’t sewable LEDs and they’re tiny, it needed the crochet cutting so that they’d show through the felt face. The felt face stops the crochet from unravelling, so no problems there. At some point I may remake this but use a Adafruit Gemma / Flora to control sewable LEDs for the cyclon effect but I’ll need to find the time first!
The complete set is here:

They get taken to Make Faires with Pimoroni and recently featured in Makezine’s photos of the Berlin Faire.

All sewable electronics parts for the various projects came from Adafruit / Sparkfun / Kitronik via Pimoroni.

Inertial Logger Prototype

Prototype Inertial Logger

Prototype Inertial Logger

The prototype hardware for my inertial logging project is built. Lovely you say, looks nice, fits in a small tin, and just like everyone else, you immediately follow it with “What does it do ??”.

This project follows on from a bunch of discussions in the SHHMakers mailing list. Basically the idea is that you can record or log a track that the tin has followed using only sensing of the movement of the tin. The movement of the tin is the inertia bit. Everything has inertia and sensors that can measure that can also infer how much and by how far something has moved. Inertial guidance works on the same principles and is used for quad-copter pilot electronics etc. This is the point at which, like everyone else, you interject “I just use my phones GPS”. But what about those instances where there is no GPS signal. Try Caving, UrbEx, SCUBA Diving, or just simply finding your car in a multi-story, when you have forgotten where you parked it. Maybe you want to know where the tube system really is under the map of a city rather than the schematic map most underground systems give you. These examples are where inertial navigation and logging have a part to play.

“OK” you say “I understand now. how do you do it ?”. If you put on a blindfold and someone manoeuvres you along a track you can, if you concentrate remember it, this is the logging bit. Each time you are turned this way or that you can feel being turned, this is what a gyroscope measures, rate of turning. If you are moved quickly or slowly you can feel that too, this is what an accelerometer measures, rate of acceleration. If you are in a lift as well as feeling the acceleration, you can feel the pressure on your eardrums change as you go up or down, this is what a pressure sensor measures. You can feel if you are outside or inside by temperature changes, this is what a thermometer measures. People who are blind are more sensitive to these things than the sighted, purely as they use these clues to navigate in a world they cannot see. They also count steps. I don’t think this project will be sensitive enough to count steps but maybe it will. It certainly can measure the passage of time against acceleration/rotation and therefore infer distance.

Zoom in to see the contents of the tin

Zoom in to see the contents of the tin

“So what’s in the tin?”. You are bored with explanations now and want to know about the techy bit. If we zoom in to the tin, we can see a 10 DOF inertial navigation board (GY-87) top left. Under that on the left is a micro SD card. In the middle is a Teensy 3.1 micro-controller. At the right top there is an Adafruit Power Boost 5oo Charger. To the bottom right is the coin cell battery backup for the Teensy’s RTC (real time clock). Underneath the board is a 2.5Ah LiPo. The power boost, LiPo and teensy were bought in from our local supplier Pimoroni. The 10 DOF (degrees of freedom, or number of things it measures) board came directly from china via AliExpress. The power supplying arrangements are a compromise that niggles somewhat. Whilst the LiPo has plenty of power, all the other components actually run at 3v3. the conversion from 5v to 3v3 is done locally on the boards using linear regulators so we are wasting nearly as much power again as they draw. Unfortunately linear regulators dump the surplus energy as heat, far from ideal in a closed tin. Particularly where we want to be able to measure the temperature as part of your logging. Altogether though an adequate first pass for prototyping and testing purposes. There is a bit of a learning curve to be climbed and this is a reliable way to do it. The 10 DOF board has 3 axes of Magnetometer, Accelerometer and Gyroscope on-board as well as an air pressure sensor for us as an altimeter, giving the 10 things or DOF it can measure.

“If you were doing this again what would you do different ?” you ask. Well bearing in mind that I acquired the parts for this a bit back and they have been gathering dust the purchasing decisions would be different. I would be replacing the hand wired SD card holder and Teensy with a Pi Zero. But have to add an RTC. Also I would get rid of the linear regulator on the 10 DOF board and power it form the Zero’s 3v3. Just to move the self heating away from the air pressure sensor which relies on an internal temperature measurement for air density compensation. I would probably add a press button on the outside of the case so that way-points or events could be marked in the track log. Useful for overcoming cumulative errors. One last thing, inertial navigation chips and managers are a field of rapidly advancing technology, many of our smart phones already have them inside. The inertial sensor chips themselves are becoming ever more integrated placing it all on one chip together along with local processing to make them ever more accurate. So something to watch out for and periodically check the current state of play.

The firmware for this prototype is available from my git hub repository https://github.com/AndyKirby/Firmware/tree/master/InertialLogger please note it is a work in progress rather than a finished item.

DigiStump DigiSpark Arduino and Debian 8 64bit

UPDATE 2016-02-02: There is an updated version of the script below which also works with the DigiSpark Pro. See below.

In the space recently we’ve been playing with the super low cost Digistump Digispark 16.5MHz boards and the Arduino 1.6.5 environment.

Unfortunately there are some issues with these working out of the box with 64-bit versions of Linux (we use Debian 8 64-bit) as one of the attached binaries is compiled for 32bit only. However, after some major head scratching, I have managed to get them to work reliably.

To get them to work. You need to install the Digispark hardware library as normal and then follow the steps below.

Installing the DigiSpark library

Add the following line to the Additional Boards Manager URLs in File –> Preferences. If you have previously added boards to this list, you will have to separate them with a ; or use the button to edit it in list form. If you need an in-depth guide, there’s one in the links at the bottom from everyone’s favourite Adafruit.
http://digistump.com/package_digistump_index.json

Fixing the missing bits

Once you’ve done that, you will need to download the following script (I’d of included it as a downloadable file, but someone disabled it on our server)…

#!/bin/bash

# Adds necessary libraries and UDEV rule for using the Digistump DigiSpark boards in Arduino 1.6.5 on Debian 8 64-bit
# Written by James Muirhead. 2015-10-12

# This works on the 16.5MHz original Digispark. Has not been tested on other varients.

# Checks if you are root, as this is required.
if [ $(whoami) == “root” ]
then
# Updates apt then installs 2 necessary libraries and their dependencies
apt-get update
apt-get -y install libusb-dev lib32stdc++6

# Adds UDEV rule which adds the DigiSpark device to the dialout group, same as required by Arduino IDE.
echo ‘SUBSYSTEM==”usb”, ATTR{idVendor}==”16d0″, ATTR{idProduct}==”0753″, MODE=”0660″, GROUP=”dialout”‘ > /etc/udev/rules.d/99digispark.rules

# Restarts UDEV to enable the above.
service udev restart


echo "DONE!!!"31
else
echo "You need to be root to run this script, use su / root to try again."
fi

Right, once you’ve got the above copied into a file called e.g. digispark.sh you will need to make it executable. To do this, you will need to log in as root (type su at the command line and type your root password). Then type the following to make the file executable.

chmod a+x digispark.sh

Ok, once the file is executable, stay root and run the following…
./digispark.sh
This may (or more likely will) take some time, so leave it till it’s done what needs to be done.

Once finished, close and re-open the Arduino IDE.

DONE!!!

Once this is all done, you should be able to upload a sketch to your DigiSpark without problems.

Links

Update 2016-02-02

I’ve written a new version of the script above which also works for the Digispark Pro. Follow the same instructions as above, but use the script below instead. It is longer, but does a few more things.

And, just because I’m feeling nice, I’ve put it on GitHub to make life easier.
DOWNLOAD NOW

#!/bin/bash

# Digispark installer.
# Written by James Muirhead.
# 2015-10-12
# https://www.sheffieldhackspace.org.uk

# CHANGE LOG
# 2015-10-16 – Only installs 32-bit extensions if 64 bit OS detected.
# 2015-11-04 – Now creates UDEV rule for DigiSpark & DgiSpark Pro.

if [ $(whoami) == “root” ]
then
apt-get update

# Installs required library.
apt-get -y install libusb-dev

# Checks for 64-bit environment and installs required 64-bit extensions.
uname -a | grep x86_64
if [ $? == 0 ]
then
apt-get -y install lib32stdc++6
fi

# Creates UDEV rule for DigiSpark
echo “# Rule to allow use of the basic DigiSpark (ATtiny85) board in the Arduino IDE 1.6.3+” > /etc/udev/rules.d/99digispark.rules
echo “# Written by James Muirhead (@PhantomFreak), 2015-10-12.” >> /etc/udev/rules.d/99digispark.rules
echo “# https://www.sheffieldhackspace.org.uk” >> /etc/udev/rules.d/99digispark.rules
echo “” >> /etc/udev/rules.d/99digispark.rules
echo ‘SUBSYSTEM==”usb”, ATTR{idVendor}==”16d0″, ATTR{idProduct}==”0753″, MODE=”0660″, GROUP=”dialout”‘ >> /etc/udev/rules.d/99digispark.rules
# Creates UDEV rule for DigiSpark Pro.
echo “# Rule to allow the use of DigiSpark Pro (ATtiny167) board in the Arduino IDE 1.6.3+” > /etc/udev/rules.d/99digispark-pro.rules
echo “# Written by James Muirhead (@PhantomFreak), 2015-11-04.” >> /etc/udev/rules.d/99digispark-pro.rules
echo “# https://www.sheffieldhackspace.org.uk” >> /etc/udev/rules.d/99digispark-pro.rules
echo “” >> /etc/udev/rules.d/99digispark.rules
echo ‘SUBSYSTEM==”usb”, ATTR{idVendor}==”16d0″, ATTR{idProduct}==”0753″, MODE=”16d0″, GROUP=”dialout”‘ >> /etc/udev/rules.d/99digispark-pro.rules

# Restarts UDEV
service udev restart


echo "All done, please close all open Arduino IDE windows & reopen before attemptting to upload code."
exit 0
else
echo "You are not root, please use sudo or su to continue."
exit 1
fi

ATtiny 85/45/13 Programming Shield

Author: James Muirhead

ATTiny Programmer photo

This is a modified version of the programmer described on the High Low Tech Group’s page. I have however added a few customisations…

  • Reset buttons for both the ATtiny and the host Arduino,
  • Headers in paralel with the IC,
  • Rails for 5V, 3.3V & ground,
  • A mini breadboard.

This shield simplifies the development of ATtiny (13/25/45/85) projects giving you direct access to the ATtiny as if it were an Arduino Uno with the added convenience of an attached Breadboad with rails.

Continue reading

February the 15th build day

20140220-184837.jpg

This time, at the Sheffield Hardware Hackers and Makers build day, we had everything from Arduino to 3D Printers (obviously 🙂 ) and everything in between.

But first, we where reunited with our Pursa Mendel. One of the group members had taken it away to get it up and running. We can’t thank him enough for doing so! When we first started building the Mendel we always kept in mind the idea as using it as a educational tool as it was being built. But we just needed that final big push to get it running.

Below is the machine in a state almost ready to print. The X, Y and Z end stops – micro switches, needed to be re aligned because they had been knocked out of line during transit.

We where able to get the X and Y end stops re alined, but we would haft to sort the rest out on the next build evening.

– More to follow…

20140220-190604.jpg

The Mendel 90 fixing

Within the build day we where able to get hold of some micro drill bits and other things and stuff…
After successfully removing an amount of burnt plastic from the extruder. We did this by heating up the extruder up to temperature and digging out the burnt plastic.

The first image shows the “things and stuff” bought and the second one shows the print quality after the extruder has been un blocked (how it should look).

20140220-191907.jpg

20140220-191935.jpg

Arduino Robots

We also had a group member bring in an Arduino robot an AAR-04. It was programmed from the Arduino IDLE. There are two motors that drive the device back and forwards and a ball bearing at the front that keeps it in line. There are also some sensors at the front of the board, just by the ball bearing, these allow the robot to stop before it hit a surface.

You can take a look at the video below of the robot working…

December the 14th Build Day

On december the 14th we had our monthly build day at Access Space. We had a large array of 3D printers and electronic projects
being worked on, some of the things that went on throughout the day include...
- 3D Printing parts to improve the hack space
- Laser Cutting
- Tinkering with electronics

3D Printing parts to improve the hack space

We have been hosting our meet-ups at Access Space for around 9 months now. From the start Access Space has very kindly given us a space in there Refab Lab for us to store and use our 3D Printers. We where asked to put forward suggestions for in ways witch we
could improve the hack space. We discussed with Access Space about making it an easier space to work in. We decided to create and print some coat hooks. We drew up some 3D coat hooks in Open SCAD, a free open source 3D CAD programme.

3D Printed coat hook being drawn up in Open SCAD

Once the object had been Compiled and Rendered it was exported as a STL file, it could then be sliced and printed. altogether we
printed four of the coat hooks, in total we had three printers on the Job. Including the small foldable, portable printer that
has been made by one of the group members (we will try any get picture).

3D coat hook being printed

This above is this is the finished product. The coat hooks where mounted on to a pice of wood witch was screwed on to a shelving
unit.

Laser Cutting

One of the 3D printers that was brought along to the build day was a SUMPOD Delta, this printers X,Y and Z axis sit on three
threaded rods. Some pieces where designed using Ink Scape (a 2D open source CAD programme) and laser cut. The pieces where to
mount the stepper motors on to the printer.

SUMPOD Delta 3D Printer

Among all of this we also had some people with Arduino's creating projects, including light synthesisers.  

We would also like to thank Access Space for providing us with a work space and access to tools and machinery in there Refab Lab.
The next meet up will be held at Access Space on the on January the 27th.

You can keep in contact with us by following us on Twitter @SHHMakers or on our forum at: https://groups.google.com/forum/#!forum/sheffield-hardware-hackers

Sheffield Maker Day

On May the 9th of the November the Sheffield Hardware Hackers and Makers participated in the Maker Day at Sheffield Hallam University. In this event we had three 3D printers, one of which was the SHHM’s Mendel 90. We also had a large collection of small projects that members had made (including a Geiger counter). As well as one or two Raspberry Pi’s. On top of this we had some Arduino projects witch featured some RGB LEDs.

20131110-165618.jpg

The three 3D printers that we had on display in the picture above where (from left to right): A Reprap Huxley, a Reprap Prusa Mendel and a Mendel 90. The Mendel 90 was being driven by a Raspberry Pi. The Pi had Print Run installed on it, the open source software for driving 3D printers with. This allowed us to have full control over the printer just as you would if you where using a computer. The slicer settings still needed setting up on the Pi, but you can still take a look at the time laps below.

3D Print on Mendel 90

The printer was printing a small Android fridge magnet test piece.
This 3D printer being driven by the Raspberry Pi, called a “Mendel 90” was built at a event called “Festival Of The Mind” this took place over two days on a weekend where 5 of these printers where built.

The selection of projects that members had brought along to the maker day included: A Geiger counter, Arduino controlled egg incubator and Arduino controlled ambient lighting. All of these kits had been made from scratch by group members.
We also had another Raspberry Pi set up with Scratch on for people to play on and learn.

20131116-084416.jpg

The next group meet up will take place on the 25th of November at Access space. New members are always welcome! For more Information on meet up’s and the group you can visit our Forum
Or alternately you can follow us on Twitter @SHHMakers