MQ3 (or MQ303a) Alcohol Sensor Arduino Guide

Here's the finicky bastard

This little device is wonderful, for parties at least. Accuracy wise, it’s not much more than a toy (without some opamps for signal amplification and filtering) but I digress. Just plugged right straight into an Arduino will be plenty of fun, assuming you read the datasheet.


To wire this properly, check out this diagram, which will get further explanation after the break.
Read More…

Adafruit /Sparkfun Waterproof RGB LED Strip (60/m)

CYAN

This this is beyond amazing. Only in real life can you appreciate it’s vibrancy and power to invoke emotion. It shall fulfill you. That money spent on electronics, that time burned grepping Ohm’s and Kirchoff’s laws; time well spent. Once you gaze upon the 16.7 MILLION colors available, as this relic leisurely strolls through them at whatever speed your Arduino/various MCU desires.

View at Sparkfun
View at Adafruit

Color Gallery and ‘How to set it up’ section after…
Read More…

Preparing for FREE DAY

Winning!

It’s that time of the year again, to rape Sparkfun’s servers trying to get free shit. Instead of the situation last year, where you earned your loot by answering multiple choice questions (I got 4 ATtinys! FO’ FREE) it’s all chance. Will you or won’t you win a $100 gift card? Only the universe knows.

BUT YOU CAN GET FREE SHIT

There are many ways to get free components, microcontrollers, top-of-the-line ICs, and so on and so forth. Read on, dear brother, read on.
Read More…

Programming a breadboard Arduino with Sparkfun’s FTDI Adapter

lilypad FTDI Serial Usb Connections

I required a programmer to program bare AVRs (ATtiny85s and ATtiny84s,) so, In my infinite spendthriftyness, I bought this FTDI breakout from Sparkfun. What is this? Well, I assumed it was an AVR programmer. I was incorrect. It can reprogram AVRs, however it cannot burn bootloaders or change fuse settings as is (the version from ladyada can, and with precious little modifications.) Being the same price, I made the wrong choice.

Anywho, here’s how you get it to work. I also ordered (fortunately) a ATmega328p from Sparkfun with the Optiboot Bootloader. So, essentially, it’s like they yanked the chip out of a new Arduino Uno. Not bad for $5.50. So we take this, plink it down on a breadboard like shown below, then get to wiring it up.

Don't worry, this will all be explained after the break.

One hell of a ratsnest. Don't worry, this will all be explained after the break.


Read More…

IR remote control reverse engineering

If you’re anything like me, or the vast majority of Americans, you are surrounded by IR devices at home, at work, and pretty much everywhere you go. A great number of these devices (round 90%, its kind of the standard) use the 38 kHz SonyIR protocol, but knowing just that doesn’t help much. Especially if you lack a proper oscilloscope, like me. Plus, hell, your remote might be in that mysterious 10 percent. In order to figure out the actual encoding, you need to be able to plot the signals while you fiddle with the remote, and then make a chart relating the independent variable (the fiddling) to the depedent variable, the bursts of 0s and 1s that inevitably ensue.

IR pulses for various button presses on someone else's oscilloscope :-\ man browser up

Trandi has done precisely that, in his reverse engineering a remote controller from a toy chinook to operate his land based Rover and has devised an excellent technique for visualizing the data transmissions from the remote with just an attiny and a IR photodetector IC from radio$hack. Now if you, like me, find your local radio$hack overpriced and understocked, over on the arduino forums its been discovered the same resolution can be had with a plain IR phototransistor and optionally a cheap opamp like the lm741 (or also I hypothesize with a TL082 dual biFET (perhaps wired as a fourth order Butterworth high-pass?) and a IRled. Likely it’d work best reverse biased, reducing the slow response time typical of using an led as a photodiode, at the expense of increased noise. What’s the point? Never had one. And that just burns you up inside!) provided you modify your timings a bit.

A remote much like this one was harmed. Severely.
Read More…

Part 1: Three-Band Tone Control

Digging through datasheets will always, ALWAYS give you great ideas. Looking in the datasheet for the TL082 dual JFET opamp (oddly available even at my podunk radioshack) found me this little gem.

Tone Control Schematic

Three Band Tone Control Schematic

Nice and simple, eh? Awesome, I know right? But for what use? Obviously for audio, but modern audio doesn’t require this, unless your building amplifiers…or radio transmitters…more after the break…

Read More…

Arduino on the attiny in 15 minutes

It’s actually fairly easy, you must do precisely this. First, you will need to download the one of the files listed below, depending on which model attiny you’d like to use (I’d suggest installing them all, so it will be easy to change between microprocessors as the situation warrants.) For the example case, I will be using the attiny85, so, I will refer to the attiny45_85.zip file.

First, make sure the Arduino program is *not* currently running, if so, shut it down. Open your arduino folder (arduino_022, or whatever you’ve named it) and create a folder inside your sketchbook folder called hardware (if it does not already exist.) Extract the zip file, and copy the folder within to your newly created hardware folder. The arduino IDE is now prepared to program your attiny. If you have a stand alone ISP, skip down to the ‘my first ardutiny program’ below. Otherwise, you need to configure your arduino (or compatable) to program your bare attiny.

Fortunately, the arduino IDE comes with a sketch built in to handle this task. Connect your arduino, start up the IDE, and select the ‘Arduino ISP’ sketch from the examples menu. Upload the sketch to the arduino, and now were ready to wire this bad boy up.

image

The picture above shows my setup. Basically, you need to connect the attiny to power and ground, connect three of its pins (5, 6, and 7) to three of your arduino’s pins (11, 12, and 13) respectively. Connect the attiny pin 1 to the arduino’s pin 10; this will allow your attiny to be automatically reset as you program the microcontroller. *If you’re using a teensy or other ‘arduino-compatable’ your pins will be different. If you can’t work it out, feel free to contact me in the comments.*

ardutiny programming
Now, were ready to program. Select ‘attiny85 (w/ Arduino as ISP)’, open up the blink sketch from the examples, and hit program (likely some errors will pop up, ignore these, and carry on). Take a LED, and connect it as shown above, and watch it light up!

This allows the attiny to support the best arduino functions such as digitalWrite(), digitalRead(), analogRead(), analogWrite() this is our PWM! More on this in tomorrow’s article. It also is hip with the time based functionality, such as millis() and pulseIn() another very useful function to be covered this week!

Give your thanks to these folks, if they’re still listening, MIT HLT Lab, and Alessandro Saporretti. Questions, comments and hopefully plenty of b**ching in the comments below, por favor.

files
attiny84
attiny45/85.zip
the avr motherlode

Discount Radio Gear (for Amateur Bands)

image

So if you’re like me, and about to take (and pass!) your Technician level exam and get your call sign, you probably need a radio. Assuming you don’t have mad cash to blow, you need one cheap. My previous posts might suggest I recommend building your first radio — that’s a negative. It is, much, much easier, cheaper, and just generally safer to buy a used radio. There’s of course, the net standard eBay, and even a few used transceivers on amazon, but the real gem in used radio is UniversalRadio’s used section. They have handheld transceivers (a great first rig for the vhf/uhf bands) as low as $30, if you catch it right, alongside mobile rigs and HF shack units for under $200. Plus, they’ve got the cheapest new antennas I’ve seen yet. Or, you know, you could splurge, and drop six hundo on this killer new Yaesu Quad-band HT. To each his own.

Homebrew Amateur Radio Superguide

image

So this book has been apparently been riding the internets for a few years, but it’s new to me, and a very interesting read. It is at least if you have interest in radio tech, like myself. It starts out with a quite comprehensive overview of radio history (which in itself explains many concepts of the art) and eventually gets into the juicy, technical details — this man knows his stuff. The pdf is called Crystal Sets to Side band, by Frank Harris, K0IYE. You can find it here. I recommend downloading the whole book, and sharing it with any hams you think might be interested, as this is on of the best books on the subject I’ve found, as it wasn’t easily extracted from the noise on the internet.

Amateur Radio Liscensing Superguide

image

Many thanks to Dan Romanchik, KB6NU, for this amazing series of guides for amateur radio liscensing.  Now that they removed the mandatory morse code (or CW test) requirement, ham radio is much more accessable. Even so, unless you are already extremely familar with RF technology, it will still require some form of preparation. While you can find the question pools online (technician, general), it is much more appropriate to have an actual study guide so that you can understand why these questions are important enough to be asked, as well as know their answers. He has guides for the Technician and General class licenses, both in free PDF and printed hardcopy through amazon. Find them all here.

Follow

Get every new post delivered to your Inbox.