Sniff is a "Scratch-like" programming language that's designed to help Scratchers move gently from Scratch to more conventional languages. They can start writing programs, without having to learn a new language because Sniff is based on Scratch. They learn a little more about variables, compiling, syntax errors (!), and they can have fun controlling real hardware while they're doing it.

Friday, 7 August 2015

An Arduino Shopping List

Over the years I've collected a lot of Arduino bits. If there's a shield or component out there, then I've probably got one. I justify this as "I need it so I can support it in Sniff", but I've found that some hardware "sticks" while some just goes in one of the many little wooden drawers I have. Some of the Sniff "devices" code get used and tested over and over as I build them into new projects, while others sort of get forgotten.

One of the things I've definitly learnt is that cheap is cheerful! When I run a workshop I like to be able to hand out equipment without worrying if it gets damaged (or better yet, build it into the costings and let people take it home). On the other hand my Arduino Tre doesn't get stuff plugged into it - I don't particularly want to accidentally short out pins on a £150 board.

At various times I've tried to summarise what I've learnt and design the ultimate "arduino kit", but its tricky - there's always some great component that you could get that for just a few more pounds. So instead, I'm going to just make a list of things I think are cool starting with some basics, moving onto some components I think everyone should have, and then a few optional, but still recommended parts. You can get everything except the last few parts only spending around £30 if you shop hard enough.

I've also learnt most of the places to look for cheap equipment - Ebay is first stop. Don't worry about buying direct from china. It takes a few weeks to arrive, so plan ahead, but the prices are great and the odd thing that doesn't work out will cost less than the amount you save by buying direct. Once you're a bit braver check out Ali Express - If you've not heard of them, that's because you're not in Asia. They're bigger than Amazon and Ebay put together, their sellers want your custom, and will price to get it. You don't need to worry about sending cash through AliPay - its a big, seriously legit operation.

Arduino Uno [copy/clone] £5

The Uno is the Arduino. Other boards are more powerful, faster, bigger, smaller, but you need an Uno. I've got about 25 kicking round here right now. Some are going to Scratch2015AMS next week, some are for a robot workshop later in the year, some are just my testing boards. I've bought real boards, I've promoted the Arduino brand pretty heavily. I'm comfortable buying clone boards for very little money. Support the Arduino group - they do good things. Buy some stuff, contribute to the project, but I don't feel bad for buying Uno's from whoever can make them cheapest - this is open source at its best!

Sensor Shield £3

These are THE BEST way to plug together projects - I rarely use breadboard. They're going to make your life easier. They come in different versions, but you probably want the version 4. This is a really common version that works great with the Uno. I've recently got a V8 and that's nice too, but harder to find cheaply. Most of the other versions are not as well laid out.

3Pin Female Dupont Cables, from 20p each (buy lots!)

On the breakout board, each arduino pin gets turned into a group of three. Each group carries 0v, 5V and Signal. This is the standard connector used for Servo's, but we can connect many of things to it. It really helps to know they're called "dupont" connectors.

(female) Jumper cables (£3 for lots!)

Most jumper cables are designed for breadboard, so are male-male. You want some of those, but you also want male-female, and female-female. Cheap to buy in bulk - painful and frustrating when you run out.

Green Nail Varnish £1

In addition to making a bold fashion statement, we have one problem to resolve before we have the perfect component hookup system. We need to remember never to plug the cables in the wrong way around! A stripe of green nail varnish down the side of the plug, and a dab on the side of the socket indicates which side is 0v/Ground/Earth and you'll always know which way around to plug them in! Seriously this is the best advice you're going to get all week. It will save you from a lifetime of pickup components and trying to remember which wire is earth!

So far we've spend about £15, and all we've got is some cables but they're basics that will set you up for future projects. Now its time to buy some parts:

DHT11 £1

This is the classic Arduino component. Cheap, and fun. It has four pins but only three are used. Cut a 3pin dupont cable in half and wire up appropriately (I guess you might need to buy a soldering iron - or ask a friend to help you).  Now you can plug it straight into the breakout shield, and start measuring temperature and humidity. The DHT22 is a more accurate version for about £3.

i2c 1602 LCD Display £4

Shop around - these 2rows 16 column displays are great, but the 20x4 versions of the same thing are about the same price. Bigger is better in this case. You want the i2c version because its going to plug straight into the sensor shield (don't try and wire up an LCD screen directly - you'll just use lots of wires and not save enough for it to be worth it). If you've got the v4 shield then set the jumpers to i2c, and just connect them using a...

4pin dupont cable(s) £2

You'll only need a few of these, but now you can display measure temperature, and display it on the screen.

Data Logging shield £3

These are an easy way of hooking up an SD card to you can record data and a DS1307 real time clock, so you can record what time you record the data. If you've got the v4 sensor shield you can plug them both in at the same time (doesn't works so well with the V8...).

LEDS and Resistors £3

You'll be able to get a bag of LEDs and resistors for about £1. We need whatever LED's you like the look of, some 1K resistors and some 10K. Cut a jumper cable in half, and solder a 1K resistor in series with the LED. Now you've got an LED you can just plug into the sensor shield. The resistor is baked into the cable so you can't break anything. 1K is slightly bigger than it needs to be but that just makes it a bit safer (and the LED is a little less bright). In addition to being an LED you can flash, you can also use this for dignostics - either by writing code to signal using the LED or simply putting it on an output to see that the output is changing - cheaper, and easier than a multi-meter (though they're good too!)

Light Dependant Resistors (£1)

Another "get a bag full for £1" component is the LDR. Wire a 1K resistor from power to signal, and the LDR from signal to ground (or the other way round - both ware fine), and you can measure light levels. That's useful, but with a bit of creativity you can use it as an optical switch, or motion detector.

Waterproof DS18b20 £1

It's another thermometer, but its WATERPROOF, and on the end if a cable. Handy for all sorts of experiements. Wire them up to a dupont connector (and hack a pull up resistor into the cable) and they just plug straight in to the sensor sheild whenever you need one.

HC-SR04 £1

Ultrasonic distance sensor - Another Arduino classic. These are pretty hit and miss. Maybe I had a bad batch, but when they work they're like magic. They use four pins (0v,5c, trigger, echo) so they don't quite fit our 3pin hook up model. For simple coding you'll need to hook them up with jumper cables. However its actually possible to just connect trigger and echo together, so they WILL work with 3 pins. Sniff doesn't support bi-directional pins (its not something thats needed for the sort of stuff we do), but after you've coded it yourself using separate trigger/echo there's a hcsr04 "device" which lets you just use 1 data pin, so cut a 4pin cable, and splice to a 3pin one for simple hook up.

So far we've spent about £30 but we've got a pretty cool bag of bits. Where you go next is up to you, but I'd seriosly consider:

I2C 128x64 oled display (£5)

These come in various versions, but the i2c variant is the easiest to hook up. With bit of planning i2c is easy to plug and play, but I'll post that a different day... This is one of the reasons we bought 10K resistors (10K pull-ups to 3.3v work great!).

Ethernet Shield (£5)

Connect your gadget to the internet! Not as cool as WIFI but much cheaper, and it includes a microSD slot.

Motor Shield (£2)

There are "better" motor driver options, but being able to drive 4 high power motor in a simple and cheap shield is a big win. Again - shop around for these and plan ahead. They're less than £2 direct from china, but there are plenty of people ordering them from the same place you could and relisting them on EBAY for £10. Just remember to allow up to 4 weeks for shipping. There are UK and US sellers doing great work developing cool products and resources - support them, rather than the ones drop shipping from chain with a  400% mark up!

MQ series gas sensor (£4)

Detect various gases. Ignore the digital output and hook is power and Analog out to a 3pin connector.

NeoPixel Strips (£15 per meter)

Not cheap but seriously cool. For about £15 you can get a 1m strip with 30 tricolour LEDs on. If you're on a budget, chop them into smaller strips and split the cost with a friend. 6 LEDs would cost you £3 that way, and that's enough to start playing with. Again these connect to a 3pin DuPont, and plus straight in.

With all that in your bag you're ready to tackle loads of fun projects. I'm sure I've missed something... Leave a comment and tell me about a great and cheap component that you can't live without.

No comments:

Post a Comment