Tag Archives: Linux

Embedded Linux APRS iGate tutorial

via Dangerous Prototypes

wp_20150804_001

A detailed tutorial on how to make your own APRS iGate (Automatic Packet Reporting System)  from Andrew Milluzzi:

With the super cheap embedded Linux platforms (Raspi, Beaglebone, etc.) and cheap TV dongles, it is really easy to make your own APRS iGate, just like the one in the photo above. This tutorial will give you the steps to get going with an APRS iGate. What is APRS you ask?
APRS stands for Automatic Packet Reporting System. It is a 1200 baud RF (mainly ham radio) packet system commonly used to record telemetry. Sometimes it is fun to log a trip or track a robot. APRS is a great tool for these sorts of problems. In the USA, APRS is commonly used on 144.39 MHz. It can be used between radios directly or can be used to log on the internet (via websites such as APRS.fi)  via an internet gateway or iGate.

Details at Milluzzi Labs.

Raspberry Pi 2 – Speech Recognition on device

via Wolf Paulus » Embedded | Wolf Paulus

This is a lengthy post and very try, but it provides detailed instructions for how to build and install SphinxBase and PocketSphinx and how to generate a pronunciation dictionary and a language model, all so that speech recognition can be run directly on the Raspberry Pi, without network access. Don’t expect it to be as fast as Google’s recognizer, tho …

Creating the RASPBIAN boot MicroSD

Starting with the current RASPBIAN (Debian Wheezy) image, the creation of a bootable MicroSD Card is a well understood and well documented process.

Uncompressing the zip (again, there is no better tool than The Unarchiver, if you are on a Mac) reveals the 2015-02-16-raspbian-wheezy.img

With the MicroSD (inside an SD-Card adapter – no less than 8GB) inserted into the Mac, I run the df -h command in Terminal, to find out how to address the card. Today, it showed up as /dev/disk4s1 56Mi 14Mi 42Mi 26% 512 0 100% /Volumes/boot, which means, I run something like this, to put the boot image onto the MicroSD:

sudo diskutil unmount /dev/disk4s1
sudo dd bs=1m if=/Users/wolf/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/rdisk4

… after a few minutes, once the 3.28 GB have been written onto the card, I execute:

sync
sudo diskutil eject /dev/rdisk4

Customizing the OS

Once booted, using the sudo raspi-config allow the customization of the OS, which means that time-zone, keyboard, and other settings are adjusted, to closely match its environment.
I usually start (PI is already connected to the internet via Ethernet Cable) with

  • updating the raspi-config
  • expanding the filesystem
  • internationalization: un-check en-GB, check en-US.UTF-8 UTF-8
  • internationalization: timezone ..
  • internationalization: keyboard: change to English US
  • setting the hostname to translator, there are too many Raspberry Pis on my home network, to leave it at the default
  • make sure SSH is enabled
  • force audio out on the 3.5mm headphone jack

Microphone

usbmic
Given the sparse analog-to-digital support provided by the Raspberry Pi, the probably best and easiest way to connect a decent Mic to the device, is using a USB microphone. I happen to have an older Logitech USB Mic, which works perfectly fine with the Pi.

After a reboot and now with the microphone connected, let’s get started ..
ssh pi@translator with the default password ‘raspberry’ gets me in from everywhere on my local network
cat /proc/asound/cards
returns

0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [AK5370 ]: USB-Audio - AK5370
AKM AK5370 at usb-bcm2708_usb-1.2, full speed

showing that the microphone is visible and its usb extension.
Next, I edit alsa-base.conf to load snd-usb-audio like so:
sudo nano /etc/modprobe.d/alsa-base.conf
Edit
options snd-usb-audio index=-2
to
options snd-usb-audio index=0
and after a sudo reboot, cat /proc/asound/cards
looks like this

0 [AK5370 ]: USB-Audio - AK5370
AKM AK5370 at usb-bcm2708_usb-1.2, full speed
1 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA

Recording – Playback – Test

Before worrying about Speech Recognition and Speech Synthesis, let’s make sure that the basic recording and audio playback works.
Again, I have an USB Microphone connected to the Pi, as well as a speaker, using the 3.5mm audio plug.

Installing build tools and required libraries


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bison
sudo apt-get install libasound2-dev
sudo apt-get install swig
sudo apt-get install python-dev
sudo apt-get install mplayer
sudo reboot

/etc/asound.conf

sudo nano etc/asound.conf and enter something like this:

pcm.usb
{
    type hw
    card AK5370
}

pcm.internal
{
    type hw
    card ALSA
}

pcm.!default
{
    type asym
    playback.pcm
    {
        type plug
        slave.pcm "internal"
    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}

ctl.!default
{
    type asym
    playback.pcm
    {
        type plug
        slave.pcm "internal"
    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}

Recording

The current recording settings can be looked at with:
amixer -c 0 sget 'Mic',0
and for me that looks something like this:

  Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
  Capture channels: Mono
  Limits: Capture 0 - 78
  Mono: Capture 68 [87%] [10.00dB] [on]

alsamixer -c 0 can be used to increase the capture levels. After an increase, it looks like this:

  ...
  Mono: Capture 68 [87%] [10.00dB] [on]

Playback

The current playback settings can be looked at with:
amixer -c 1
alsamixer -c 0 can be used to increase the volume. After an increase,
amixer -c 1
it looks like this:

  Simple mixer control 'PCM',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -685 [90%] [-6.85dB] [on]

Test Recording and Playback

With the mic switched on ..
arecord -D plughw:0,0 -f cd ./test.wav .. use Control-C to stop the recording.
aplay ./test.wav

With recording and playback working, let’s get into the really cool stuff, on-device speech recognition.

Speech Recognition Toolkit

CMU Sphinx a.k.a. PocketSphinx
Currently pocket sphinx 5 pre-alpha (2015-02-15) is the most recent version. However, there are a few prerequisites that need to be installed first ..

Installing build tools and required libraries


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bison
sudo apt-get install libasound2-dev
sudo apt-get install swig
sudo apt-get install python-dev
sudo apt-get install mplayer

Building Sphinxbase


cd ~/
wget http://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/sphinxbase-5prealpha.tar.gz
tar -zxvf ./sphinxbase-5prealpha.tar.gz
cd ./sphinxbase-5prealpha
./configure --enable-fixed
make clean all
make check
sudo make install

Building PocketSphinx


cd ~/
wget http://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/pocketsphinx-5prealpha.tar.gz
tar -zxvf pocketsphinx-5prealpha.tar.gz
cd ./pocketsphinx-5prealpha
./configure
make clean all
make check
sudo make install

Creating a Language Model

Create a text file, containing a list of words/sentences we want to be recognized

For instance ..

Okay Pi
Open Garage
Start Translator
Shutdown
What is the weather in Ramona
What is the time

Upload the text file here: http://www.speech.cs.cmu.edu/tools/lmtool-new.html
and then download the generated Pronunciation Dictionary and Language Model

For the the text file mentioned above, this is what the tool generates:

Pronunciation Dictionary

GARAGE	G ER AA ZH
IN	IH N
IS	IH Z
OKAY	OW K EY
OPEN	OW P AH N
PI	P AY
RAMONA	R AH M OW N AH
SHUTDOWN	SH AH T D AW N
START	S T AA R T
THE	DH AH
THE(2)	DH IY
TIME	T AY M
TRANSLATOR	T R AE N S L EY T ER
TRANSLATOR(2)	T R AE N Z L EY T ER
WEATHER	W EH DH ER
WHAT	W AH T
WHAT(2)	HH W AH T

Language Model

Language model created by QuickLM on Thu Mar 26 00:23:34 EDT 2015
Copyright (c) 1996-2010 Carnegie Mellon University and Alexander I. Rudnicky

The model is in standard ARPA format, designed by Doug Paul while he was at MITRE.

The code that was used to produce this language model is available in Open Source.
Please visit http://www.speech.cs.cmu.edu/tools/ for more information

The (fixed) discount mass is 0.5. The backoffs are computed using the ratio method.
This model based on a corpus of 6 sentences and 16 words

data
ngram 1=16
ngram 2=20
ngram 3=15

1-grams:
-0.9853 </s> -0.3010
-0.9853 <s> -0.2536
-1.7634 GARAGE -0.2536
-1.7634 IN -0.2935
-1.4624 IS -0.2858
-1.7634 OKAY -0.2935
-1.7634 OPEN -0.2935
-1.7634 PI -0.2536
-1.7634 RAMONA -0.2536
-1.7634 SHUTDOWN -0.2536
-1.7634 START -0.2935
-1.4624 THE -0.2858
-1.7634 TIME -0.2536
-1.7634 TRANSLATOR -0.2536
-1.7634 WEATHER -0.2935
-1.4624 WHAT -0.2858

2-grams:
-1.0792 <s> OKAY 0.0000
-1.0792 <s> OPEN 0.0000
-1.0792 <s> SHUTDOWN 0.0000
-1.0792 <s> START 0.0000
-0.7782 <s> WHAT 0.0000
-0.3010 GARAGE </s> -0.3010
-0.3010 IN RAMONA 0.0000
-0.3010 IS THE 0.0000
-0.3010 OKAY PI 0.0000
-0.3010 OPEN GARAGE 0.0000
-0.3010 PI </s> -0.3010
-0.3010 RAMONA </s> -0.3010
-0.3010 SHUTDOWN </s> -0.3010
-0.3010 START TRANSLATOR 0.0000
-0.6021 THE TIME 0.0000
-0.6021 THE WEATHER 0.0000
-0.3010 TIME </s> -0.3010
-0.3010 TRANSLATOR </s> -0.3010
-0.3010 WEATHER IN 0.0000
-0.3010 WHAT IS 0.0000

3-grams:
-0.3010 <s> OKAY PI
-0.3010 <s> OPEN GARAGE
-0.3010 <s> SHUTDOWN </s>
-0.3010 <s> START TRANSLATOR
-0.3010 <s> WHAT IS
-0.3010 IN RAMONA </s>
-0.6021 IS THE TIME
-0.6021 IS THE WEATHER
-0.3010 OKAY PI </s>
-0.3010 OPEN GARAGE </s>
-0.3010 START TRANSLATOR </s>
-0.3010 THE TIME </s>
-0.3010 THE WEATHER IN
-0.3010 WEATHER IN RAMONA
-0.3010 WHAT IS THE

end

Looking carefully, the Sphinx knowledge base generator provides links to the just generated files, which make sit super convenient to pull them down to the Pi. For me it generated a base set with the name 3199:

wget http://www.speech.cs.cmu.edu/tools/product/1427343814_14328/3199.dic
wget http://www.speech.cs.cmu.edu/tools/product/1427343814_14328/3199.lm

Running Speech-recognition locally on the Raspberry Pi

Finally everything is in place, SphinxBase and PocketSphinx have been building installed, a pronunciation dictionary and a language model has been created and locally stored.
During the build process, acoustic model files for the english language, were deployed here: /usr/local/share/pocketsphinx/model/en-us/en-us

.. time to try out the the recognizer:

cd ~/
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


pocketsphinx_continuous -hmm /usr/local/share/pocketsphinx/model/en-us/en-us -lm 3199.lm -dict 3199.dic -samprate 16000/8000/48000 -inmic yes

Output

READY….
Listening…

INFO: ps_lattice.c(1380): Bestpath score: -7682
INFO: ps_lattice.c(1384): Normalizer P(O) = alpha(:285:334) = -403763
INFO: ps_lattice.c(1441): Joint P(O,S) = -426231 P(S|O) = -22468
INFO: ngram_search.c(874): bestpath 0.01 CPU 0.003 xRT
INFO: ngram_search.c(877): bestpath 0.01 wall 0.002 xRT
OPEN GARAGE
READY….
Listening…

Open Source Hardware Camp 2014

via OSHUG

Open Source Hardware Camp will take place in the Pennine town of Hebden Bridge. For the second year running it is being hosted as part of the technology festival, Wuthering Bytes. However, this year OSHCamp will have the Waterfront Hall to itself on the Saturday and Sunday, with a separate Festival Day taking place on the Friday and with talks on a broader selection of technical topics.

Details of the OSHUG talks and workshops can be found below and the Wuthering Bytes website will be updated in due course with details of the complete programme of events.

Note that socials are planned for both the Friday and Saturday evenings, with the former being hosted at the Town Hall and where there will be a bar, food available and music and a live performance, and the latter will be hosted at a local hostelry that serves food.

Hebden Bridge is approximately 1 hour by rail from Leeds and Manchester. Budget accommodation is available at the Hebden Bridge Hostel, with private rooms available and discounts for group bookings. Details of other local accommodation can be found at www.hebdenbridge.co.uk.

Any questions should be directed to the Discussion List.

Saturday :: Talks

Linux bootloaders and kernel configuration

Linux is popular in embedded devices, but most use it once the kernel has booted and don't consider how it was started. This talk explores just what happens when you first start an embedded device that is running Linux, and will look at common bootloaders, such as U-Boot, along with kernel boot options. Finally, we will look at useful kernel configuration options for embedded devices.

Melanie Rhianna Lewis started a life long love of electronics as a child when her Dad helped her make a "crystal" radio with an ear piece, a coil of wire, a diode and a radiator! At the same time the home computer revolution started and she would lust after the "build your own computers" advertised in the electronics magazines of the time. She never got one but did end up the proud owner of a BBC Micro. Melanie learnt everything she could about the machine and including assembler, operating systems, drivers, interrupt, and, thanks to the circuit diagram in the Advanced User Guide, digital electronics. After the BBC Micro came the Acorn Archimedes and so started a long relationship with ARM processors. In the 90s Melanie became interested in Linux and then developed one of the first ARM Linux distributions running on an Acorn RISC PC. The hobby became a job and Melanie currently works for an embedded device consultancy near Bradford where a lot of her work is still with ARM processors. Recently Melanie became a sporty person and now spends a lot of her time hitting girls. She will probably bore you with tales of roller derby!

Open source archaeological geophysics - is it achievable?

The advance of technology into Archaeology has allowed geophysical surveys to "peer into the ground" and direct the diggers to the most likely "targets". However, as anyone whose watched Time Team will know, using Resistivity and Magnetometry doesn't always guarantee results. Such equipment is not usually within the financial reach of most hobbyists. However, the recent explosion of the Arduino, Pi and other cheap electronics has meant making such surveying equipment may be possible.

A small research project involving an informal collaboration between members of the Derbyshire Archaeological Society (DAS) & Derby Makers is exploring whether a high accuracy GPS unit, Magnetometer and a resistivity probe can be made and yield worthwhile results within a budget of £1,000. DAS has kindly funded this research and we are about 50% of the way through the GPS project. This talk will introduce the project and take a look at progress to date.

Tony Brookes was firstly an engineer and then worked in IT for a while (!) Now working part-time, hobbies easily fill the time available. Drawn to archaeological and historical research by way of Time Team, he now tries to apply open source software (Scribus, Inkscape, Qgis) and hardware (Arduino, et al) to investigating parish history and other interesting topics.

An open source aquaponics control system

Aquaponics is a closed system of food production that farms fish alongside vegetables, and this talk will look at the development of an open source aquaponics control system for the Incredible AquaGarden project in Todmorden, highlighting certain features of the design and exploring some of the difficulties encountered and how these have been addressed.

A control and monitoring system with an event-driven 'flowchart' interface will be presented, where data about aspects such as pH, temperature and light level etc. are collected and logged in order to monitor the environment. The system responds dynamically to control the level of water in the plant growing bed, to maximise the yield. Some design decisions and technical aspects of the system will be demonstrated and discussed, together with the open source model for sustaining the project.

Finally, we will look at the operational Node-RED installation in Todmorden, showing how the system is collecting readings and controlling the water level, and we'll talk about how MQTT has been used to loosely couple the code running on the Arduino with Node-RED on a Raspberry Pi.

Gareth Coleman is a inventive hardware hacker who's talent lies in connecting diverse devices. Dr Naomi Rosenberg is a freelance software developer with a background in formal logic who works on a wide variety of platforms. They both get a especially enthusiastic about open hardware, free software and empowering humans.

From Idea to Finished Product: A Tale of DFM and CEM

With numerous easily accessible embedded platforms around and concepts such as rapid prototyping and crowdfunding now being useful things as opposed to just buzzwords, designing the Next Big Thing without leaving your study is becoming a common story for makers and tinkerers.

While it is true that going from an idea to a finished product has never been easier thanks to the abundance of design resources and affordable manufacturing services, designing for volume manufacturing requires a different mindset that usually does not apply to casual weekend hacks. From component choice to packaging and logistics, there are several elements that needs to be taken into consideration, as they may cause significant headaches otherwise.

This talk will provide an overview of electronics manufacturing process, covering details such as managing design data, handling dependencies, component and process choices, testing and certification and several other aspects of DFM: Design for Manufacturability.

Omer Kilic is an Embedded Systems hacker who likes tinkering, a lot. He also likes tiny computers, things that just work and good beer.

Driving milling machines with Linux

Driving a milling machine with Linux is fairly easy and LinuxCNC (previously known as “EMC”) even provides a real-time distribution install disk. However, driving the machine is only half the story and gcode generation is at least as important.

This talk will share experiences using a mill and a router with Linux, looking at PCB manufacture, engraving, 3D milling, casting, tool paths, materials, tools and parametric design.

Matt Venn has run hundreds of creative science workshops for thousands of children and adults around the world. For the last year, he has been working with teachers in preparation for the computer science curriculum changes; creating and leading courses, workshops and projects.

When he's not inventing new ways of getting people excited about science, Matt plays music, invents puzzle boxes, practices martial arts and maintains bikes.

Oxford Flood Network - easier to Apologise Than to Ask Permission

Oxford Flood Network is a citizen sensing project which monitors water levels around the city, in streams, rivers and even under floorboards, sending water levels back to the Internet using low-powered wireless.

The network explores the possibilities of a smart city that is created by its citizens, rather than a more typical top-down deployment. Sensor networks are generally used to collect data about us for reasons and agendas chosen by others, but we can build sensor networks too; crowd-sourced data can be gathered for your agenda — providing evidence for your issues.

In this talk we will hear how Oxford Flood Network has developed an open source model for hardware and software, and the challenges of sticking mysterious boxes under bridges.

Ben Ward is founder of Love Hz, promoting the use of white space spectrum for open innovation in the Internet of Things. A survivor of the dotcom bubble, subsea bandwidth glut and the UK broadband wars, he's still surprisingly optimistic about the future.

An introduction to writing applications for the Parallella board

Parallella is a credit card-sized computer with a many-core accelerator that allows it to achieve high floating-point performance while consuming only a few watts. In this talk we will take a look at the Epiphany architecture and how to use the eSDK to write highly parallel applications for it, using hardware and software features to benchmark code and optimise performance.

Simon Cook leads Embecosm's work on LLVM and is author of the standard guide to the LLVM assembler. He is also an expert on low-energy compilation and is lead engineer on the MAGEEC project. Simon holds a double first class honors degree in Computer Science and Electronics from Bristol University.

Radio Then and Pararchive: decentralised, pervasive, and open story telling

Radio Then is a citywide cultural history experience, telling stories about Manchester’s jazz and popular music heritage using a small, Arduino-powered radio. Participants explore the city and tune in to archival broadcasts related to places, people, and events of note. In actual fact, the ‘radio’ contains GPS and audio breakouts to track its location and cue audio tracks depending on its coordinates.

The project is being created to showcase findings from Pararchive, an AHRC project being conducted by the University of Leeds, in partnership with the BBC, National Media Museum, Science Museum Group, and Manchester Digital Laboratory, among others. Pararchive represents an opportunity for members of the public to engage with archives, decentralising the material from archive holders, and offering alternative and personal perspectives on events.

James Medd is an artist, musician, and maker based in Manchester. He teaches all things digital in the north west of the UK, and creates whimsical, entertaining, and accessible interactive artworks. He currently leads Arduino Manchester, a community group for Arduino users in Manchester, and will be developing more interactive audio experiences at Watershed’s Pervasive Media Studio later this year, as a winner of their graduate and new talent competition.

Commercialising your ideas

Whether you're taking the time to build something fun, or have a solution to a problem you have faced, you are 'in your own right' an inventor.

One of the biggest challenges inventors face isn't making their product work, it's generating a living to continue inventing. Having spent over a decade in both sales and business development I have witnessed people use various methods to overcome this hurdle. I hope to share with you some of my experiences to provide you with some ideas you can take away and use when looking to turn a hobby or bright idea into a financial success. Our topic of conversation will take us from having a light bulb moment, to securing orders and reaping the rewards.

William Stone is the Head of Channel Strategy for hardware manufacturer, Ciseco. He is responsible for various commercial areas of the business including the very familiar responsibility of growing Ciseco's rapidly expanding chain of partners and distributors. Now with 36 recognized distributors worldwide, Ciseco has a growing presence and reputation in electronics manufacturing and Internet of Things (IoT).

OpenTRV: energy technology that saves householders money

The OpenTRV project aims to provide software, hardware designs and excellent interoperability to allow UK and EU householders to as much as halve their heating bills and carbon footprint with simple to fit hardware costing around £100 per house. Everything is freely available under liberal licensing — even our 3D printed enclosures — to enable adoption and cost savings.

Damon Hart-Davis gets excited about electronics, parallelism, robotics, distributed systems and resource efficiency, and solar PV and halving space-heating carbon footprint with cheap microcontrollers (OpenTRV) are two of his current passions. Damon has been working on “mission-critical” systems in banking for most of the last 20 years and before that founded one of the first UK Internet Service Providers.

Interfacing with SPI and I2C

SPI and I2C are industry standard methods of interfacing IO devices to micro-controllers and CPUs using just a few connections. SPI requires four wires and I2C just two.

This talk introduces SPI and I2C. It describes how they work and how you use them. It will look at common IO devices that connect via SPI or I2C. Finally it will look at controlling SPI and I2C devices from two example controllers, the Arduino and the Raspberry PI, in languages such as C and Python.

Speaker: Melanie Rhianna Lewis.

Introduction to Baserock

Baserock is a new set of open source tools for creating "appliance" operating system images. The aim is to close the gap between source code repositories and the code running on a device. This talk will go over Baserock's philosophy, what it provides and how you can try it out today.

Sam Thursfield likes it when technology is surprising in a good way but does not like it when it is surprising in a bad way. He spends a lot of time trying to reduce the amount of code that is required to do things. He has been known to play the trombone in and around Manchester.

Concurrency in the real world with xCORE and XC

There are many cases where a simple microcontroller won't cut it and the FPGA design route may be too drawn out and costly, particularly if your background is in software.

With the XMOS multi-core microcontroller architecture and toolset it's now possible to tackle complex hardware problems using familiar software and algorithms, avoiding the need to work with Verilog or VHDL. The XMOS XS1 microcontrollers provide tens of nano second resolution and deterministic, predictable, real-time operation in software. The XMOS toolset enables designs to be simulated and analysed, and signals to be monitored and scoped all within the IDE.

The XC extensions to C provide simple interfaces and tasks to write concurrent programs, taking care of nasty race conditions and parallel usage errors. xCORE open source libraries help break down complex domain-specific tasks, allowing you to focus on developing applications. While XMOS Links enable microcontrollers and boards to be chained together in a divide and conquer manner, allowing you to orchestrate your own hardware solutions.

This talk will introduce the XMOS technology and explore a selection of real world applications.

Alan Wood has been working with concurrent and distributed programming for over a decade. His recent work includes smart grid, control, and motion systems based on XMOS' concurrent technology. He is a long term advocate and moderator (aka Folknology) for xCORE and other SHW communities, such as TVRRUG, as well as a founder of hackspace, SHH.

Compered by:

Paul Tanner is a consultant, developer and maker in wood, metal, plastic, electronics and software. His day job is IT-based business improvement for SMEs. By night he turns energy nut, creating tools to optimise energy use. Paul graduated in electronics and was responsible for hardware and software product development and customer services in several product and service start-ups, switching to consulting in 2000.

Sunday :: Workshops

Some workshops will provide tools, boards and components etc. However, subject to demand this may involve an element of sharing and please feel free to bring along equipment and components, but note that you must be able to take full responsibility for your own personal safety and that of others in respect to these. Common sense must be exercised!

Let's build a flood network for Hebden Bridge!

Split into two teams, one will attempt to install flood sensors on the beautiful Hebden Water just outside the venue, while the other links these these to the Internet using readily available technology.

Proven hardware designs will be used to show you how can send water levels back to the Internet using low-powered wireless links, and sustainable approaches to citizen sensing will be explored.

Run by: Ben Ward.

Workshop notes: you may want to bring wellies if you plan to join the sensor installation team! Also feel free to bring sensors and boards that you think may be useful.

Building applications that sense and respond to the real world

Following on from their talk, Naomi and Gareth will be joined by Paulo Marini, the Tormorden project's resident aquaponicist. Together they will facilitate a hack session to help you build applications that respond to the real world.

Run by: Gareth Coleman and Dr Naomi Rosenberg.

Workshop notes: Bring your own hardware to work on, such as Raspberry Pi and Arduino etc. if you can, and they'll try to find ways to get your projects connected.

Do you want to build a robot? #meArm assembly workshop

How about starting with an Arm? With just a screwdriver and enthusiasm you can build an Open Source Robot Arm. If you bring an Arduino or Pi with you, you're free to stay on with your meArm and tinker with the code too.

The meArm is a project to get low cost robot arms into the hands of as many people as possible. Started in February this year it's made fast progress through open development. Already "home brew" (those not from the laser forges of phenoptix in Nottingham) versions have been spotted in the UK, Switzerland, the USA and Mexico!

Ben Gray is a proponent of Open Hardware and founder of phenoptix, a maker business based in Beeston, Nottinghamshire. Ben graduated from the University of Exeter with a chemistry degree and a fledgling phenoptix before moving to Nottingham to complete a PhD in theoretical physical chemistry. Through the open hardware movement he has been able explore the wonderful world of electronics and take phenoptix from a pocket money project to the full time job it is today.

Workshop notes: Bring along a laptop and, if you like, an Arduino or Raspberry Pi.

Introduction to Bus Pirate

The Bus Pirate is a universal open source hardware device that can be used to communicate using various buses, such as SPI, I2C, UART and JTAG, with various devices. The Bus Pirate is, per the designers, intended to "Eliminate a ton of early prototyping effort with new or unknown chips."

This tutorial will introduce the Bus Pirate. Describe how to configure it and install the software required to use it. It will then look at some basic interfacing to devices via SPI and I2C. It will work through how you can 'sniff' buses. Finally it will look at use the Bus Pirate as a simple frequency measurement and generator device.

Run by: Melanie Rhianna Lewis.

Workshop notes: bring along a laptop (Bus Pirate is supported under Windows, Linux and OSX) and, if you can, some hardware to debug. There will be a limited number of Bus Pirates available, but if you have one please bring it along.

Building your first Parallella application

This workshop follows on from the previous day's talk and participants will build a simple project which targets the Parallella board and uses all 16 cores of the Epiphany floating-point accelerator.

Run by: Simon Cook.

Workshop notes: Please bring along a laptop and, if you have one, a Parallella board (a limited number of boards will be available for use by those who do not own one).

The real world works concurrently and so can you

This workshop will take you through the basics of embedded concurrent programming using an XMOS multi-core startKIT. We will cover basic parallel processing extensions to C (XC) using tasks, interfaces, timers and ports. We will also get some insight into our running code using xSCOPE, a real-time debugging system built in to the XMOS tools. In addition we will use software modules to drop in rich functionality from the open source xCORE libraries.

Run by: Alan Wood.

Workshop notes: bring along a laptop and any devices you would like to interface.

Design a PCB Shrimp and have it fabricated

The Shrimp is a super low cost Arduino clone. It makes an excellent teaching resource, and is usually delivered as a 'breaded shrimp' - using a breadboard. For hackers, it's a great way to knock up a quick, cheap microcontroller circuit.

In this workshop we'll make a PCB version of the shrimp — a more robust and Arduino shield compatible version — and you will be guided through the process of drawing the schematic, laying out the PCB and optionally placing an order with OSHPark for your very own PCB shrimp.

Participants will be working in pairs. Boards will cost about £6 each. Kits of components can conveniently be ordered from shrimping.it for £4.

Run by: Matt Venn.

Workshop notes: bring along a laptop.

OpenTRV build and getting started

Kits will be available to solder and boards and cables to buy, along with valves that will be used to demonstrate how you can use Arduino-based technology to halve your heating bill.

Run by: Damon Hart-Davis.

Workshop notes: Please bring your own soldering iron, solder and AA batteries if you would like to build a kit to take away, and be aware that SMD soldering experience and a steady hand will be required to solder the TMP112 temperature sensor.

NOTE:

  • There are separate tickets for Friday, Saturday and Sunday.
  • A light lunch and refreshments will be provided each day.
  • Please aim to arrive between 09:00 and 09:15 on the Saturday as the event will start at 09:20 prompt.
  • Tiny WiFi Adapter for Raspberry Pi

    via Wolf Paulus » Embedded

    [Updated on Feb. 2. 2013 for (2012-12-16-wheezy-raspbian) Kernel Version 3.2.27+]

    The extremely small EW-7811Un USB wireless adapter looks like the perfect WiFi adapter for the Raspberry Pi. Not only is it tiny and relatively inexpensive, it also seems capable enough to be a great companion device for the Raspi. While elinux still shows that some users report timeouts trying to initialize the module, I cannot verify this with 2012-12-16-wheezy-raspbian.

    WiFi is not really necessary for the Raspberry Pi. It already comes with an ethernet port, provides RS-232 (aka serial-) connectivity, and has two USB ports. However, in case you wanted to add WiFi to the Raspi, this little adapter seems to be as good as any. Here is why:

    The Edimax EW-7811Un

    • complies with wireless IEEE802.11b/g/n standards
    • adjust transmission output by distance and CPU offload, to reduce power consumption when wireless is idle
    • is currently the smallest wireless adapter
    • currently cost between US$ 9 and US$ 15

    more than enough reasons to cut the cord and add WiFi connectivity to the Raspberry Pi.

    After performing the usual initial configuration in raspi-config, using WiFi Config (a GUI tool sitting at the desktop when starting LXDE with startx) is by far the easiest way to get the Edimax EW-7811Un configured.

    But let’s quickly run through the steps of creating that bootable SDCard before dealing with the actual WiFi issues:

    Creating that bootable SDCard

    1. Download the image file from http://www.raspberrypi.org/downloads
    2. Unzip the file to get to the image file.
    3. df -h to determine which drive is used for the sdcard, e.g. integrated SDCard Reader turned out to be disk2 for me.
    4. sudo diskutil unmount /dev/disk2s1
    5. sudo dd bs=1m if=/Users/wolf/Downloads/2012-12-16-wheezy-raspbian.img of=/dev/rdisk2
    6. sync
    7. sudo diskutil eject /dev/rdisk2

    On a class 10 SD Card, the whole process shouldn’t take much longer than 70 seconds maybe. Insert the SDCard into the Raspi, power up, boot, and use the on screen menu:

    In case you need to do this over a network, the Raspberry Pi’s default hostname is raspberrypi. I.e.
    ssh pi@raspberrypi .. the pasword is raspberry

    sudo raspi-config
    to:

    • Expand root_fs
    • Change password
    • Change locale to EN_US.UTF-8 UTF-8 (un-select english UK and select select in long list)
    • Set Time zone (America / Los_Angeles)
    • Change memory split to 128:128
    • Enable ssh

    Finally reboot: sudo shutdown -r now
    Running the raspi-config again to execute update feature, reboot and login.
    Now finding more updates and upgrades like so:

    sudo apt-get update
    sudo apt-get upgrade

    Changing the PI’s hostname

    Edit the host name in these two locations:

    • sudo nano /etc/hostname
    • sudo nano /etc/hosts

    Adding WiFi support / EW-7811Un

    With previous wheezy builds, I had to install the realtek firmware, blacklist the already installed 8192cu driver and install a new one. Not this time. ifconfig shows the wlan0 interface and iwlist wlan0 scan can be used to scan for available Wifi access-points, without any firmware installation or driver updates.

    /etc/wpa_supplicant/wpa_supplicant.conf

    All what’s needed to do to connect the Raspberry Pi to a Wifi Network, is to add a network configuration to /etc/wpa_supplicant/wpa_supplicant.conf.

    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

    The network configuration depends very much on your network, SSID, Password Security etc. However, here is what I have added, to make the EW-7811Un connect to my WiFi network:


    network={
    ssid="MY_SSID"
    psk="******"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    auth_alg=OPEN
    }

    With the correct WiFi network configuration added to the wpa_supplicant.conf file, the ethernet cable can be removed and the Raspberry Pi will automatically switch over to WiFi.
    This behavior is pre-configured in /etc/network/interfaces, which looks something like this:

    auto lo

    iface lo inet loopback
    iface eth0 inet dhcp

    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp


    Raspberry Pi – WiFi (Edimax EW-7811Un)

    Backup the SD Card

    Once done with setting up Raspian, I usually create an backup image that later can be copied onto the same or a different SD Card (of equal size).

    Backup

    Insert the perfect SDCard into the Card Reader and find out how to address it. Again, for me that usually is disk2s1.

    sudo diskutil unmount /dev/disk2s1
    sudo dd bs=1m if=/dev/rdisk2 of=~/RASP_3_2_27.img
    sync
    sudo diskutil eject /dev/rdisk2

    Depending on the size of the SDCard, this will create a huge file (like 16GB) an may take a while (like 7min).

    Restore or Copy

    Insert am empty SDCard into the Card Reader and find out how to address it. Once again, for me that usually is disk2s1.

    sudo diskutil unmount /dev/disk2s1
    sudo dd bs=1m if=~/RASP_3_2_27.img of=/dev/rdisk2
    sync
    sudo diskutil eject /dev/rdisk2

    Practical System-on-Chip (Program your own open source FPGA SoC)

    via OSHUG

    At the ninth OSHUG meeting we were given an introduction to FPGA development, and to the OpenCores community and the OpenRISC 1000 open source processor family. At the seventeenth OSHUG meeting we will be given a comprehensive introduction to the practicalities of programming your own open source FPGA system-on-chip.

    How to Program Your Own Open Source FPGA System-on-Chip

    It is possible to buy a FPGA prototyping board like the Terasic DE0-nano, capable of running a complete 32-bit System-on-Chip for around £50. Even larger boards with the memory capacity to bring up a full Linux system on the design cost a few hundred pounds.

    In this talk Julius Baxter and Jeremy Bennett will present the OpenRISC architecture and OpenRISC Reference Platform SoC (ORPSoC), and show how to take this open source design and get it running on an FPGA board.

    This is a practical evening, aimed at users who have never done any chip design. Using a Xilinx ML501 prototyping board, Julius Baxter will demonstrate all the steps from obtaining the initial hardware design through to bringing up the board and booting a full Linux system.

    The following topics will be covered:

    • an overview of OpenCores and the OpenRISC project
    • an introduction to the Verilog Hardware Design Language
    • how to synthesize the design into a FPGA bitstream
    • what needs modifying to run on different boards
    • how to get software running
    • porting a simple (newlib) library to the board
    • demonstration of Linux booting

    Note that this will be an interactive session, and participants are encouraged to bring along their own FPGA dev boards and laptops and to join in, should they wish. If you have a board that is not listed as having a preconfigured ORPSoC build, or you have any other questions concerning the practicalities of this, you should direct your question to the OSHUG discussion list.

    Julius Baxter has been involved with the OpenRISC project for 4 years, and during that time he's worked on everything from processor Verilog RTL to the Linux kernel port. After finishing undergraduate studies in his native Australia, he then studied a System-on-Chip design Master's at KTH in Stockholm, Sweden, while working at ORSoC AB - the owners and operators of OpenCores.org. Now living and working Cambridge, Julius maintains a role as an active developer and maintainer on the OpenRISC project, largely dealing with RTL, toolchain and architecture work.

    Dr Jeremy Bennett is Chief Executive of Embecosm which provides open source services, tools and models to facilitate embedded software development with complex systems-on-chip. He has been involved with OpenCores for the past decade, and is responsible for much of the software tool chain. Contact him at jeremy.bennett@embecosm.com.

    Note: Please aim to arrive for 18:00 - 18:20 as the event will start at 18:30 prompt.

    Sponsored by:

    Practical System-on-Chip (Program your own open source FPGA SoC)

    via OSHUG

    At the ninth OSHUG meeting we were given an introduction to FPGA development, and to the OpenCores community and the OpenRISC 1000 open source processor family. At the seventeenth OSHUG meeting we will be given a comprehensive introduction to the practicalities of programming your own open source FPGA system-on-chip.

    How to Program Your Own Open Source FPGA System-on-Chip

    It is possible to buy a FPGA prototyping board like the Terasic DE0-nano, capable of running a complete 32-bit System-on-Chip for around £50. Even larger boards with the memory capacity to bring up a full Linux system on the design cost a few hundred pounds.

    In this talk Julius Baxter and Jeremy Bennett will present the OpenRISC architecture and OpenRISC Reference Platform SoC (ORPSoC), and show how to take this open source design and get it running on an FPGA board.

    This is a practical evening, aimed at users who have never done any chip design. Using a Xilinx ML501 prototyping board, Julius Baxter will demonstrate all the steps from obtaining the initial hardware design through to bringing up the board and booting a full Linux system.

    The following topics will be covered:

    • an overview of OpenCores and the OpenRISC project
    • an introduction to the Verilog Hardware Design Language
    • how to synthesize the design into a FPGA bitstream
    • what needs modifying to run on different boards
    • how to get software running
    • porting a simple (newlib) library to the board
    • demonstration of Linux booting

    Note that this will be an interactive session, and participants are encouraged to bring along their own FPGA dev boards and laptops and to join in, should they wish. If you have a board that is not listed as having a preconfigured ORPSoC build, or you have any other questions concerning the practicalities of this, you should direct your question to the OSHUG discussion list.

    Julius Baxter has been involved with the OpenRISC project for 4 years, and during that time he's worked on everything from processor Verilog RTL to the Linux kernel port. After finishing undergraduate studies in his native Australia, he then studied a System-on-Chip design Master's at KTH in Stockholm, Sweden, while working at ORSoC AB - the owners and operators of OpenCores.org. Now living and working Cambridge, Julius maintains a role as an active developer and maintainer on the OpenRISC project, largely dealing with RTL, toolchain and architecture work.

    Dr Jeremy Bennett is Chief Executive of Embecosm which provides open source services, tools and models to facilitate embedded software development with complex systems-on-chip. He has been involved with OpenCores for the past decade, and is responsible for much of the software tool chain. Contact him at jeremy.bennett@embecosm.com.

    Note: Please aim to arrive for 18:00 - 18:20 as the event will start at 18:30 prompt.

    Sponsored by: