Introduction: The Small Hadron Collider

So you can't afford a Large Hadron Collider of your own? No, I can't either. Anyway, where would I put it? I've got enough clutter around here already.

So I decided to build a Small Hadron Collider, and now you too can build one of your very own! You can watch it in action here:

Watch the particles zip around the track and help them on their way, if you like, by tipping it one way or another. Watch them collide and interact in different ways, and eventually decay.

But what is the significance of the different colours and brightnesses, and how many different ways can they interact and decay? And can you spot an elusive particle of Dark Matter? There's a challenge on to see who can deduce the physical laws that control the particles, but until then, the source code remains a tightly guarded secret!

For best results you'll need the big 60 pixel Neopixel Ring from Adafruit (Far Eastern WS2812 clones should work though I haven't tried), but if you're on a budget you can use any smaller size, which the firmware will detect down to 12 pixels. The 24 pixel ring is a good compromise but will only show 2 particles at a time.

If you've already built my Glowy Disco Badge then this project uses the same hardware. All you'll need to do is load the firmware, and if you like, fit a larger Neopixel ring.

Step 1: The Parts You'll Need

Picture of The Parts You'll Need

You will need the following active parts:

  • Arduino Pro Mini (5V 16MHz)
  • MPU-9150 Accelerometer and Magnetometer
  • Bidirectional 3.3/5V level converter.

Make sure they are as illustrated otherwise you will have to modify the layout. In particular, there is more than one type of level converter. The one I use is a 4 channel one (though we only need 2 channels). It has LV and Gnd as the middle two pins on one side, and HV and Gnd as the middle two on the other.

All of the above can be obtained cheaply from Far Eastern sellers.

There is a cool alternative MPU-9150 device from Drotek which includes an on-board level converter. This would make a neater finished product but at a higher total cost. You would also have to modify the layout and wiring (take SCL and SDA direct from the Arduino instead of through the level converter), and use the alternative firmware in Step 7.

For the display you will need:
  • Adafruit Neopixel Ring.

(There are similar but cheaper rings also based on the WS2812 chip or a clone, available from Far Eastern traders. These might work equally well but if you get a faulty one you might find it harder to get satisfaction from the seller.)

You will also need the following miscellaneous items:

  • One piece of 65x95mm stripboard
  • Solid and stranded connecting wire
  • 2.54mm female SIL header socket strip.

There are many different ways you could mount the ring and house the electronics. Mine is very cheap and cheerful and not particularly to be recommended. (I'd spent all my pocket money on the Adafruit Neopixel ring.) I had a piece of 1/4 inch plywood left over after cutting a hole in the back door for the cat flap, which happened to be just the right size. A piece of acrylic would be much nicer, and if you use white or frosted or simply put a sheet of paper between the ring and the acrylic in front it will nicely hide the individual WS2812 pixel chips and diffuse their light somewhat.

Step 2: Tools

Picture of Tools

You will need to be able to solder, but that's not hard - there are plenty of Instructables and other materials online to get you started, such as this brilliantly simple and entertaining tutorial from Technology Will Save Us (though the safety instructions are a bit excessive and you don't actually need an expensive soldering iron).

For tools, you will need wire cutters, wire strippers, small pliers and a stripboard track-cutting tool, though with care you can use a small craft knife or scalpel. And of course, you'll need a soldering iron.

For programming you will need an FTDI232 serial/USB adapter and you will need to install the Arduino IDE on your computer.

Step 3: Adding Power

Picture of Adding Power

There are two ways of powering your Small Hadron Collider. If you have a rechargeable lithium power bank with a USB socket as designed for recharging a smartphone, you can use that. Get hold of a cheap USB charging or sync cable and cut off the unwanted connector. You can then solder the cut end directly to the stripboard, having made sure you correctly identify the 5V and Gnd wires.

The cheapest alternative is a 3V battery box taking 2 AA batteries, plus a 3 - 5V boost converter. If you use a converter (as shown) with a USB socket you can use it with a USB lead as above. Solder the red and black wires from the battery box to the IN+ and IN- pads (respectively) on the boost converter. Wrap them around the opposite end of the boost converter for strain relief, then insert it into a piece of heat shrink sleeving for protection. Warm with a hot air gun or hair-dryer to shrink the sleeving. Or you can wrap it in PVC insulating tape.

Step 4: Construction - 1

Picture of Construction - 1

You can use the stripboard as it is, but we won't be needing it all so if you like you can cut it down to have 32 holes along the length of the copper strips and 20 holes across its width.

Using a stripboard track cutter or craft knife, cut the copper tracks at the positions marked by red dots in the diagram. To avoid mistakes you might like to mark the positions with a felt tip pen before starting to cut. (The components and the wiring to be fitted to the other side of the board in the next step are shown at 50% transparency.)

Before continuing, it's a good idea to examine the board with a magnifying glass to ensure that there are no remaining slivers of copper bridging any of the cuts, or bridging adjacent tracks.

To simplify programming, solder the SIL header socket strip to the 6 pads at one end of the Arduino Pro Micro (component side).

Cut 2 lengths of solid core wire around 3cm long, strip the insulation from one end of each, and solder them to the two pads inset from the side of the board, either side of the pad marked A3. Solder them on the under side of the board. (These pads are harder to solder to after the Arduino is fitted to the board.)

Step 5: Construction - 2

Picture of Construction - 2

Solder the Arduino Pro Mini, IMU and level shifter to the stripboard as shown in the diagram as follows.

Strip a few centimetres of insulation from some solid core connecting wire. Place the Arduino Pro Mini in the correct position on the board and thread the wire through the board and then through the Arduino at one of the positions marked by a purple dot. Solder the wire to the Arduino on one side and to the copper strip on the other, making sure the Arduino is seated flat on the board. Trim the wire on both sides.

Repeat for all the other purple dots on the Arduino, and then likewise for the IMU and the level shifter.

The two wires soldered to the Arduino in the previous step can now be trimmed to length, the ends stripped, and soldered in position as shown in the diagram.

Using the solid core wire, complete all the other connections shown in purple.

Solder the positive and negative leads from your USB plug or boost converter to the copper tracks marked Vcc and Gnd respectively.

At this point it's a good idea to double check your wiring, and that you don't have any slivers of solder bridging adjacent tracks.

Step 6: Construction - 3

Picture of Construction - 3

Connect the NeoPixel ring. You can use solid core connecting wire but stranded is probably better. I like to use just 4 strands of rainbow ribbon cable. The length will depend on how you are mounting the board and the ring.

All NeoPixel rings have just 4 connections marked Power (or Vcc), Gnd, Data-In (or IN) and Data-Out or (OUT). If using ribbon cable, split the wires at one end sufficiently to reach the NeoPixel connections. Solder the 4 wires (or 4 separate lengths of connecting wire) to the 4 NeoPixel connections.

Now solder the other ends of the wires to the stripboard as shown by the green connections in the diagram in the previous step.

The diagram shows a schematic of the completed project.

You are now ready to mount the board and the ring in whatever way you have chosen. Note that the ring and the components on the board must face in opposite directions. (On mine, they are fitted to opposite sides of the piece of plywood.) Also, the first pixel in the ring (fed directly from the D-IN connection) should be at the top (with the board the way up shown in the previous steps).

Step 7: Programming

For this you will need a FTDI232 serial/USB adapter. (If you have an Arduino Uno you should be able to programme it with that instead, but I'll have to leave you to work out how for yourself.) I assume you'll be using a Windows PC or laptop, though you could use a Mac or Linux by modifying this step.

You will also need the Arduino IDE installed on your computer, which you can download from the Arduino Download page. Check that it's installed in C:\Program Files (x86)\Arduino. If not, you will have to modify the file path at the end of this step.

Finally, you will need to know which COM port the FTDI adapter is using. If you don't know, launch Device Manager (from the Control Panel) and select Ports (COM & LPT). In my case, I get a line "USB Serial Port (COM10)" but you may get something different from COM10. Note what it is.

There are 2 versions of the firmware provided. If you're using the same or similar MPU-9150 board to the one shown in Step 1 and you followed my wiring, download the attached file SHC.hex to your Downloads folder.

Should you be using the Drotek MPU-9150 board or any other which uses address 0x69 instead of 0x68, or if you wired AD0 to 3.3V in order to allow you to add a DS1307 real time clock for other applications, then download the file SHC-0x69.hex instead. Use this file name instead of SHC.hex in the last command below.

Now launch a command prompt (If you're not sure how, check out this article.) You should get a prompt such as:

C:\Users\Philip>

(but with your login name instead of mine). Type the following commands. If your COM port isn't COM10, substitute your COM port in the first command, and if your Arduino IDE isn't installed in the same folder as mine, substitute your install folder in the second command.

set COM=COM10<br>set ARDUINO=C:\Program Files (x86)\Arduino<br>cd Downloads<br>dir

Check that the downloaded file SHC.hex appears in the file listing generated by the last of the commands above.

You are now ready to upload the code and start your Small Hadron Collider working! Make sure your FTDI adapter is plugged in to the Arduino and to your PC, copy the following command and paste it into the Command prompt. (To paste into a Command prompt, right-click on the title bar and select Edit - Paste.)

"%ARDUINO%\hardware\tools\avr/bin/avrdude" -C"%ARDUINO%\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -P%COM% -b57600 -D -Uflash:w:SHC.hex:i

You should see it writing then reading back the hex file, after which your Small Hadron Collider will spring to life! The FTDI adapter will power the board initially, but after disconnecting it, it will require its own power supply.

Should you just get rotating patterns, this means the Arduino has been unable to communicate with the IMU. Check your wiring. If you used a different MPU-9150 module it could mean that it uses address 0x69 instead of 0x68, as does the Drotek module. Try using the alternate firmware SHC-0x69.hex instead.

Step 8: Going Further

As I said earlier, this project uses the same hardware as my previous Instructable, the Glowy Disco Badge, optionally with a different size Neopixel ring. You can very easily reprogramme it with the firmware for that.

Once someone has cracked the physics of the particles I will release a set of source files, which optionally incorporate both functions.

If you want to use it with different size Neopixel rings, you can connect them to the stripboard with a 90 degree pin strip on the board and female jumper leads connected to the ring. A great feature of this project is that it automatically detects the size of ring in use by counting pulses for missing pixels on the data-out line. But you must double check you've connected it correctly before switching on otherwise there is a risk of damaging the ring.

Adafruit recommend connecting a 1000μF 16v capacitor across the power connections to the Neopixel ring (negative side to Gnd) and a resistor (220Ω should do) in series with D-In. I've never found these necessary but should you get unreliable operation, certainly try the capacitor, and additionally a 22nF capacitor between Vcc and Gnd on the board. Try the resistor as well if you like though all I can see that that would do is reduce the likelihood of damage if you connect the ring incorrectly.

Comments

sayan123900 (author)2016-07-02

yeah, i am pretty sure.(from now on i have 24 hours).its my fault actually, keeping this to be done until the last moment.Are you sure there is nothing else i can do?

sayan123900 (author)2016-07-02

actually i am doing this for a science project(with credit to you of course)but cant get the neopixel ring by the deadline(and also not available in my region).what do you suggest?

p_leriche (author)sayan1239002016-07-02

I'm afraid it has to be Neopixels, or compatible WS2812B modules. Are you quite sure you can't get them in time on eBay?

sayan123900 (author)2016-07-02

actually i am doing this for a science project(with credit to you of course)but cant get the neopixel ring by the deadline(and also not available in my region).what do you suggest?

sayan123900 (author)2016-07-01

can i do this without a neopixel ring from adafruit in some way?

p_leriche (author)sayan1239002016-07-02

If you find the Adafruit rings too expensive you can get compatible ones from the Far East for a very reasonable price, though I can't vouch for the quality. Search eBay for WS2812B Ring. You can get a 24 pixel one for under £5, which is an excellent size for something that will still impress your friends but at a budget price.

If you were thinking of a completely different type of display, then if you're into app development it should be possible to make a smartphone app that did much the same, using the smartphone's gyro to measure the tilt, but you'll have to work out the physics of the particle interactions for yourself.

D6equj5 (author)2016-06-06

Hi, has anyone answered your question yet to "release the source code"? I'm not too sure I fully understand the question - do you want the names of the pretend particles? What do you mean by "qualitative"? I know the dictionary definition but what do you mean by it...... how many times the blue led / white led flashes or clarity of the illuminations or what? You obviously have it all in your mind but you need to explain what you're imagining.

Many thanks though for an interesting Instructable.
D6

edited: Sadly I can not justify the cost outlay without the code. If you ever publish it, let me know and I'll make it and post images.

p_leriche (author)D6equj52016-06-06

I'm looking for the properties of the particles, the significance of the different colours and brightnesses and how many different ways they interact or die. The binary is there for you to download in Step 7 but not the source. You'll find it much easier to analyse if you actually build it, even if initially only with a 12 or 24 pixel ring, as the intensity of the LEDs inevitably over-expose the videos, washing out the colours.

To give you a little help, here's a preview of the Musical Hadron Collider which I'm in the process of commissioning.

https://twitter.com/pleriche/status/739581560479985664

info17 (author)2016-03-05

Hi, I tried to build it with a Arduino Nano 328 (not a Mini Pro) . The program is running, output:

Count = 720 Pixels = 30

Initializing I2C devices...

Testing device connections...

MPU6050 connection failed

Pattern 0

Pattern 1

........

LEDs are working.

But it can't find the MPU9150, but a "I2C-Scanner" Sketch can find it with the same wiring under adress 0x69.....

Can you help me? Is it possible to get the source code? Maybe I have to do some changes ..... kramer2 (at) web.de

Ralf

p_leriche (author)info172016-03-05

The MPU-9150 will appear at 0x69 if the AD0 input is at logic "1". This can be useful if you want to add a DS1307 real time clock to use the same hardware for a different purpose as this also uses 0x68. Check your wiring and that there aren't any slivers of solder shorting the AD0 input to something else. If not, simply wire AD0 to ground and re-run your i2c scanner to check that it now appears at 0x68.

And yes, it is possible to get the source code. Remember? You just have to work out the physics of the particles! No Nobel prizes, but a correct (qualitative) theory will trigger source code release.

info17 (author)p_leriche2016-03-08

But my breakboard (http://www.drotek.com/shop/en/home/153-mpu9150-gyro-accelerometer-magnetometer.html) does'nt have a AD0 Pin and it is to small to solder on it. It is always on 0x69 ;-(

p_leriche (author)info172016-03-08

The Drotek board looks neat, with on-board level converter, but yes, it has no option for changing the address. It would have been so easy for the designers to provide a solder bridge to select the address.

To reward your patience and perseverance I'll build a special version of the software for you (and anyone else in the same position). But I've got a busy week and may take a few days to get around to it, hopefully by the end of the weekend at the latest.

p_leriche (author)p_leriche2016-03-15

Oops - it slipped my mind - sorry! I'll do it Thursday latest, maybe sooner.

p_leriche (author)p_leriche2016-03-17

I've now added the alternate firmware SHC-0x69.hex to Step 7 for the Drotek MPU-9150 (and any others that use address 0x69). Let me know how it works!

RaKa2 (author)p_leriche2016-03-19

It is working now! Thank you!

Thank you!

Thank you!

Thank you!

russ_hensel (author)2016-02-09

This looks great, but I have my doubts: I do not think Hadron's come in non standard sizes. Where do you get yours, Amazon does not seem to stock them.

p_leriche (author)russ_hensel2016-02-09

In fact according to the Standard Model hadrons come in several sizes, principally the baryons and the mesons, but you'll only find baryons on Amazon as mesons don't tend to stick around for long. If you want a lot you might care to look in the Fitness section - dumbbells are particularly rich in hadrons. But avoid items in the Amazon Digital Music Store as these are composed entirely of leptons. Other sizes of so called exotic hadrons are rumoured to exit but are very hard to come by. You might try eBay - everything turns up on eBay sooner or later.

aniketkatkar (author)2016-02-09

Amazing!

About This Instructable

5,635views

70favorites

License:

Bio: You can also find me on iFixit.com and Twitter @pleriche. Volunteer with TheRestartProject.org and keen to share my knowledge and skills and do ... More »
More by p_leriche:How to Build Arduino Weighing ScalesUSB Volume Control and Caps Lock LED - simple, cheap, extensibleFibreoptic Christmas Tree Upgrade
Add instructable to: