It's been a LONG time since my last post so my first port of call was recovering my last post which I stupidly hadn't pushed to rmeote before my hard drive died. Then I had to play with some plugins.

Here's some of the music I like to listen to when coding to get my blood pumping and get in 'the zone':

Or if I'm in a Prodigy mood (which is often) then somethng like:

If I want something a bit more vocal and hip hop style then a Prodigy remix like this is all good.:

The CJMCU 8128 breakout board includes a great trio of environment sensors that pretty much cover all the bases when it comes to sensing your local environment and has a few overlaps especially with temperature. I've only seen it avialable so far at Baggood.com.

In the picture below you can see each of the three sensors labelled:

# What's on Board

These relatively cheap sensors include 3 main modules - with links to their data sheets:

Its worth mentioning the temperature values returned by each of these sensors are all different and sometimes by a few degrees so you could either use all 3 and pick an average of the 3 or pick the one which has the smallest reported variance according to its datasheet. Which at the time of writing would be the HDC1080.

Having said that I'd still recommend checking the temperature's reporting against other sensors you may have and deciding for yourself.

# Hooking up to a Raspberry Pi 3

You only need to hook up the 5 of the 8 pins provided for all 3 sensors to work on a Raspberry Pi connected using the i2C bus with pins VCC and GND being self-explanatory. Although VCC should go to 3.3V supply pin on the Raspberry Pi. The SDA and SCL pins shoyuld go to the corresponding SDA/SCL i2c GPIO pins. The last pin to notice is the WAK pin which according to the documentation should go to a free Ground pin.
CCS811 datasheet[PDF]. The WAK(E) pin is used to wake a sleeping sensor from a hibernated low-power state. To make the module sleep you would put logic high to pin WAK and to wake the module you'd put logic low or Ground to that pin. As the whole breakout board uses only a tiny amount of power anyway and this post is about being connected to a Raspberry Pi I've chosen to hook up the WAK pin to GND to keep it permanently awake.

If you were using this on an ESP32 or ESP8266 where you wanted to take advantage of low power states then its worth looking further into this by checking the datasheets for each sensor.

See below for a photo of one connected and working with my home setup.

# Prerequisites

# Required Libraries

I've created a repo with an example that uses all three of the onboard sensors based off submodules of existing libraries that are out there for each. Adafruit have Python libraries for the CCS811 and BME280. With SDL having an example Python script for the HDC chip.

You can reach the repo with an example that combines all 3 of the submodules here.

There are other libraries you an use as the above uses Python mainly but especially in the case of the BME280

That library is what I am using with my own IoT setup at home with the small change of including and using Artik Python libraries to send my data to Samsung Artik for displaying the data in a dashboard format.

# Ensuring the Breakout is Connected Correctly

You can run the i2cdetect command with the following arguments:

i2cdetect -y 1

You should get the following output:

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- 5a -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --

This stage is important as the default address for the BME/P 280 is 0x77 but in the CJMCU board it is as you can see above 0x76. Thankfully the Adafruit library comes with the ability to set the address on instantiation of the sensor class. See below...

sensor = BME280(

Great video from one of the devs responsible for Firefox's Dev Tools which
I now much prefer using over Chromes Dev Tools.

Check out the video below for info on the future of Dev Tools and a call to arms
for extension developers to speak up about what they'd like to API-wise to
hook into Firefox Dev Tools.

Some of the links to thing mentioned in the video are:


Here's a not entirely comprehensive list of the MQ gas sensors often seen being used in Arduino smoke alarm or breathalyser projects. Like mine for example. I also have 2 of these set up as analog sensors on my Enviro pHat connected PiZero. One being an MQ135 and the other MQ-2. Not sure why I need to keep an eye on gas leaks in the living room but you never know! MQ-135 may make a bit more sense though to be honest it keeps a pretty still 0.41 value for the past several days. I may replace it with the optical Sharp GP2Y1010AU0F dust sensor as a general air quality indicator.

  • MQ-2 - Methane, Butane, LPG, smoke
  • MQ-3 - Alcohol, Ethanol, smoke
  • MQ-4 - Methane, CNG Gas
  • MQ-5 - Natural gas, LPG
  • MQ-6 - LPG, butane gas
  • MQ-7 - Carbon Monoxide
  • MQ-8 - Hydrogen Gas
  • MQ-9 - Carbon Monoxide, flammable gasses
  • MQ131 - Ozone
  • MQ135 - Air Quality (CO, Ammonia, Benzene, Alcohol, smoke)
  • MQ136 - Hydrogen Sulfide gas
  • MQ137 - Ammonia
  • MQ138 - Benzene, Toluene, Alcohol, Acetone, Propane, Formaldehyde gas, Hydrogen
  • MQ214 - Methane, Natural gas
  • MQ216 - Natural gas, Coal gas

While you're here you may find the following tutorial on how to read MQ sensor values using a Raspberry Pi and how to convert its analog data output to a digital output for the Pi.

This project has been a long tiume inclubating as a draft as I kept making adjustments and changes. Eventually I thoughjt I neeed to publish this thing as its been under draft for 5 months now. So the APC was finished in December but the box and blog was finished today.

# What I Ended Up With

A Rakit Atari Punk Console kit with Depth & Pitch control packaged into an old JVC earphones box with a PP3 battery holder superglued to the back. With an all important sticker!

Rakit Atari Punk Console in Project Box

# How I Found What I Wanted (DIY Noise Makers)

I decided to get into DIY electronic kits after seeing the huge number available on BangGood.com. Before I came to Rakits I'd made DIY clocks with temperature and light sensors, multiple failed radios (they're my weakness), power supplies, speaker kits, etc.

But it didn't take long for my industrial music loving brain to come up with the following important formula:

DIY Electronics + Like Noise = DIY Noise Making

So then I went hunting for noise making devices I could hook up to my speakers or just make noise with. I remember an interview with someone from Throbbing Gristle where they openly admitted knowing not a single thing about making music but they enjoyed making noise. Having owned an electric guitar for about 6years and still not being able to get past 3 chords I sympathised and wanted to make noise too but with someth9ing I'd built myself.

# Coming Across Rakit

I came across my first Rakit first via eBay. Their eBay store has the full collection but they have their own site with tons of options and a great informative blog that's well worth checking out.

My first Rakit was the Atari Punk Console which did exactly what I wanted - make noise! I also got a sequencer - that was a mistake! Too soon! It ended up with the LED's on the wrong side, all messed up and I gave up part way and resigned myself to a new one form their site!

Don't be overconfident and take the advice on their sites shop for each item as to how difficult they are - also be worth checking out the Assembly Guides which are there too.

# Building a Box for my First Rakit

Having done a lot of kits that came with their own box I felt my first rakit needed one but only something simple and preferably recycled form the multitude of bits and pieces of cruft I have lying around.

# An Old JVC earphones box

At first I thought I could fit the battery and circuit into the box and be donbe with it but I lacked a few things such as....

JVC Earphone Boxas a Project Box
  • a drill.
  • drill bits for small holes and big holes.
  • a ruler
  • everything to make a proper project box work!!

So I bought my above list of atefacts online while constructing my APC. I set about creating padding for the base where the Rakit would sit

Insulated Padding Bottom Stuck With Double-Sided Tape

At first I was planning on using the battery clip cable that came with the kit but after finding out that my supergluing it to the PCB and melting the insulation (see pic) to it that I needed to find a replacement and reover the situation. I'd recently bought a job lot of about 25 PP3 battery holders so I superglued one to the back after drilling holes for the terminals to slide into that would come up behind the PCB inside the case. See pictures below...

Notice how the battery wire near the PCB looks melted and merged? Choosing holder over clip

You don't have to have an electric drill for any of this work to be honest. I did end up using an electric hand drill for the POT holes but I could have used the hand drill you see in the picture which costs tuppence ha'penny from Amazon or your local hardware shop for about £600 + VAT (and they wonder why local shops go out of business 😕 ).

Drilling holes for battery holder terminals

Although there were screw holes for the battery holder (4 in total as you can see) why waste the time and screws when a simple bit of superglue would work just as well.

Gluing the battery holder

I created the grey padding in this photo using the cut up chunks of an old gas soldering iron taped together using insulation tape then with double-sided sticky tape placed on the bottom to keep it stuck in place. Sorry - were you expecting me to say I 3D-printed something? Sorry - I'm pretty low tech when it comes to building things like this. Be prepared for more when I post about other hacked electronics projects.

Insulated Padding Bottom Stuck With Double-Sided Tape

# How Did It Turn Out?

Not amazing but OK as a first attempt at putting a DIY electronics kit in a recycled project box. It gave me a MUCH greater respect for peope who build hardware boxes for electronics and taught me a great deal of what needs to be done to improve on my next adventure.

I thought a simple ruler, a few drill bits, and a craft blade would be enough. Little did I know the sheer complexeties and questions it throws up along the way - especially when not planned. Such as me having to put the POTs on the PCB into the holes before closing the box. Then finding it didn't align the output hole with the box hole. Also noticing that the POTS didn't align horizontally (see below).

Notice how the finished projects POTS don't align?

Using superglue the wrong way and finding it melts wire insulation. A lot was learnt (see below). I've since bought another APC and will likely break out every single resistor not just the usual POTS as I noticed that changing the resistances in paralell gave different sounds. So I think there's more options there. A whole array of POTS in a long line with options to chain them into a Mega Deluxe Atari Console. I also got the Deluxe APC to do the same with. This time I've got better boxes and I'll use what I've learnt here on the new fully broken out versions.

# Its Important To Keep a Clean Work Area

Always keep a clean work area

Notice I'm currently working on the drum kit. This project has given me a whole new insight into how complicated it must be to CAD and produce a case. To me the drum case seemed relatively simple until I had to produce my own project box!

But no seriously you should always keep a clean work area to make sure projects components don't get mixed up and solder standing or under a desk so you don't drop hot solder on yourself.

# What I Learnt

  • Plan and plan some more.
  • Measure once, nmeasure twice, cut/drill, measure thrice.
  • Be prepared to make mistakes.
  • Superglue makes wire insulation melt and potentially merge and short circuit wires.
  • Quick component testers are sometimes faster than a multimetre at giving you a resistor or capacitor value.
  • Making noise is awesome.
  • The continuity tester on my multimetre is great.
  • I'm not very good at making project boxes look good.
  • I have a renewed respect for the people at Rakits and for their designs and the work that goes into them. It ain't easy!
  • I like stickers!!
  • Don't solder over your crossed legs.
  • I'm a sucker for sweets!
  • It's possible to fiddle with the the boards components in paralell to make noises in different ways. Such as sticking POT terminals over a resistor and you get weird extra/other noises. As mentioned this will be the core of my next project with an APC.