birmingham.io

My adventures with the Arduino Starter Kit

Just finished building the Motorised Pinwheel:

https://vine.co/v/iQ29Q06LUjM

The tutorial explains that motors require more current than the Arduino can supply, which is why the motor is powered by a 9v battery, which is turned on via a transistor (which in turn is controlled by a button on the breadboard).

You’ll notice that I’m not actually pressing the button in the video - this is because I only have two hands, and needed one of them to hold my phone - so the fact its still spinning is explained by the extreme speed at which the motor rotates - which, the tutorial continues, is dangerous as it can generate it’s own current, going in the opposite direction, which might make things fail, so we stop this from happening via a diode.

@LimeBlast How are you getting on? Did you stop at the pin wheel?

I can’t believe how neat you make your circuits. I have bent wires all over the shop :slight_smile:

For the multi coloured lamp, I wrapped the gels around the bits left over from making the board at the start – I think that’s what the diagram was suggesting. That made it easier to block out stray light on each sensor. I had to pull out my “pro” engineering skills, though, and use sellotape.

The program given was a bit wrong. It was easy enough to debug in a dark room with a pen torch, though. I also put a small white paper bag over the LED for a diffuser, which improved the result no end.

I’m surprised how much I’m learning. More consolidation than anything new, but I’ve never thought about electronics and mixed digital and analogue control in this way. Being able to build circuits from hard components and drive them with a program clearly has endless possibilities. It’s great not having to “grow up” any more.

1 Like

So far, yes. I’ll pick it up again this weekend.

Ah, that makes sense. I was wondering what they might have been for. Was your board actually wooden? Because the book says it should be, but mine is some type of dirty brown plastic.

Yup, plastic made to look like compressed wodchips, I think.

I wonder if the arduino.cc version was originally wooden, but it got changed with the arduino.org version.

Thank god for the weekend :smiley: I’ve finally got some time to build the zoetrope:

https://vine.co/v/i2VrI9mpA5Y

I’ll be the first to admit that I have no idea what’s going on with this circuit. It features two buttons, one controls the power, and the other the direction of spin. It also has a potentiometer which controls the speed. As for exactly how it works - no idea, something to do with the H-bridge - an IC which consists of a bunch of transistors.

I got as far as the theremin today, then started adding all sort of extra controls to mess with the sound. I used to have a Nord Modular and miss messing with sounds in that way.

I’ve just finished building the Crystal Ball:

https://vine.co/v/i2YrPd5Qbx9

Now this one I understand a little better as I’ve used one of these displays with the Raspberry Pi. The potentiometer controls the contrast on the display (which I had to adjust to make it a little clearer in the video). The book suggested using a tilt switch, which would let you shake it like a magic-8-ball, but my breadboard is having some trouble holding on to some of the components (such as the potmeter), and a regular button works just as well.

http://www.yupthatexists.com/seinfeld-bass-riff-door-device/

2 Likes

I moved onto the Knock Lock last night. This uses a piezo as a microphone to listen for knocks, and once it hears three of them, moves a servo (with the idea being the servo is a locking mechanism on a box or something).

Unfortunately, it isn’t working as intended. I think I’ve got the wiring correct, and I’m sure the code is correct, but it seems to be interpreting any sound as a knock, and simply isn’t behaving itself. I think this is a case of calibrating more than anything (and it’s possible one of the resistors isn’t the correct value)…

…but this will have to wait for now as I’m away this weekend.

I’ve almost caught up with you today. Hopefully, I’ll find time to try the Knock Lock tomorrow. Remain very impressed with the kit. Great fun. Lots of opportunity to experiment.

re: Knock Lock: There’s a bug in the code. It’s missing a reset of numberOfKnocks to zero when you hit the reset/lock switch.

After figuring it out, I had a little chuckle at how I went about debugging it. Isolating the circuit and so on. It certainly adds to the debugging fun having hardware and software to deal with :slight_smile:

Onward to Touchy-Feely Lamp. Oo er!

Ah, so that would explain why it’s automatically unlocking again after the first unlock process. That should be easy to fix.

What about the knock sensitivity? Did you have any problems with that?

Exactly!

The default min is 10. Displaying the value on the serial monitor, it rarely went that high, and it’s not very sensitive, so I set it to 1 or 2. Did the job.

1 Like

So, I don’t know if @auxbuss has made the Touchy-feely lamp yet - but I sure have:

https://vine.co/v/i9lzWnLPjWU

This has been the simplest project for a while, although it did have the hidden complexity of having to manually install the Capacitive Sensing library - and it’s with this that I have to take issue:

The book pointed me at arduino.org/capacitive, but this page doesn’t exist. I was able to find the library at arduino.cc/capacitive, but this is only because I knew of the political issues with the core dev team, where as I think someone without that background knowledge would have been stuck. In fact, the whole arduino.org experience is a little lacking, and the whole thing feels like an underhanded cash grab, so I think from now on, I’m only going to get Genuino products.

Oh, and I’ve also discovered that it’s bloody hard to solder things to tinfoil.

Anyway, I plan on completing the book today, so expect at least two more posts out of me before the day is out.

Hhhmm… I’ve not had as much luck with the Tweak The Arduino Logo project. This is a fairly simple project which, via the use of a potentiometer, sends an integer between 0 and 255 via the serial port to an app called Processing. This in turn monitors the serial port and uses the integer to modify the colour of the Arduino logo shown within the Processing application window.

I’ve got a feeling that Processing has changed since the book was released, as the interface looks different from the screenshot in the book, and the code as presented doesn’t work. It was fairly simple to hack something together that did work, but it was very slow updating, and after the initial run, simply stopped working.

I think I may need to come back to this one in the future.

Here we are, final project of the book, Hacking Buttons:

https://vine.co/v/iVBmbverXDT

This one uses an Optocoupler (that is, an IC with an LED one one side, and a light sensor on the other, which makes a connection when it senses that the light is on) to press a button in the attached card reader.

The very first line of this chapter starts “Warning: You’re no longer a beginner if you’re doing this project, You’ll be opening up an electronic device and modifying it”, then goes on to explain that sometimes, rather than building something from scratch (say, something to record and playback some audio), it’s easier to control something external, which is where the Optocoupler comes into play, and has the added benefit of having total separation between the systems (because it’s light, rather than something physical, which enables the switch).

In the book’s example, they talk about wiring it up to an audio device - but I had no such thing that I was willing to pull apart, so instead I used my old co-op bank card reader (as I’m no longer with co-op). After pulling it apart, I scored a line down the middle of the button that I was replacing, and soldered a wire to each half, before putting it back together.

The script is nothing special, all it does is power pin number 2 (and 13, which in turn is connected to the little LED you can see flashing on the board) for 150 milliseconds, which hits the switch on the card reader turning it on. It then waits 2048 milliseconds before looping back to the top, causing the button press to turn off the card reader.

So that’s the end of the book - and I’m still no closer to knowing what I want to do with the dumb thing. It’s fine though, as I have a better understanding of its potential (and where it might be more suitable than a Raspberry Pi).

Next, having assigned a budget of £200 to it, I’m working on the makers zombie book, which itself has use for an Arduino in the later chapters.

I did it today. Loved it. Simple, as you say, but I really enjoyed the fact that I understood what was going on and why.

I clicked the link in the source code and downloaded from that page, so missed this frustration.

Blu-Tack is your friend :wink: Or you can just grab the wire, thus bypassing all the engineering nonsense :slight_smile:

I started in that then decided I’d rather be doing interprocess shenanigans in Elixir. So, I’ve saved it for messing with Nerves and the Pi.

@LimeBlast I think I’ve found us a start-up: http://uk.businessinsider.com/easyjet-connected-sneakers-use-google-maps-2016-6?r=US&IR=T We could do this, except little clip on vibrators (oo-er) rather than produce shoes. Folk I’m talking to think this is an awesome idea. Seems east enough to me.

Proudly sponsored by Bytemark