It also pointed me at the following pretty cool Youtube! vid by the folks at Nerdkits:
My experimentation thus far has been mostly confined to using the CapSense library for the Arduino. This library is pretty simple to use, but it has a number of quirks that make it somewhat cumbersome for the uses that I had for it. I’m currently working on a “better” (for my purposes) version. Stay tuned.
I was driving around various Silicon Valley electronics and surplus stores (like HSC and Anchor Electronics) and decided to stop in at Microcenter. I remembered that they supposedly were beginning to stock items from Sparkfun and the Maker Shed. And, indeed they do! I found a Serial LCD module from Sparkfun that I thought might be fun to have, so I got one:
A couple of quick caveats though:
The module has absolutely no documentation in the box. A quick bit of searching revealed the datasheet for the device, and that was helpful (although not the clearest that I’ve seen). If you are familiar with HD44780 devices, you’ll have no problems.
The pigtail they ship with it connects to the JST connector, and uses stranded wire. Not the best thing to plug into breadboards and the like. I soldered some female headers onto the unpopulated connector, and that worked out better.
It doesn’t appear that you can load custom characters over the serial interface like you can with the traditional interface. Bummer.
Still, it was dead easy. If you want a simple module to do some simple display tasks with only three wires, it works just fine.
You might be experiencing slow response to my website this morning. I think it is merely the perils of using inexpensive shared hosting, but I’ve filed a support ticket and hope that it will get resolved shortly. I appreciate your attention, and hope you will persevere in reading, even if the site seems a bit slow.
I can’t complain too much: my website costs me about two lattes a month to run, which means that I don’t need to annoy anyone with advertising and the like to provide it for you. But that being said, I would like my website to run smoothly and quickly for my users. Anybody have any good, cheap and reliable hosting that would be appropriate for running a website that sees 500 or so visitors a day? What’s this I hear about cumulous computing?
Lee mentioned that the there was a way to change the analog reference used on the analog inputs to the Atmel AVR to an internally generated 1.1V, which would give me a lot greater resolution (about little over 1mV per step). Indeed, a little quick searching yielded that it was not only true, but dead simple: the Arduino provides an “analogReference” call. If you simply call it in your setup() routine with the argument INTERNAL, you’ll get a 1.1V reference.
To test it out, I did another run, pretty much the same as before, but illustrating the values read after changing to the internal 1.1V reference. Again, I began with the diode in air, then pinched it, released it, pinched it, then released it, then placed it next to a cold can of Diet Coke I had sitting next to me.
Seemed to work pretty well!
Kragen mentioned that the Atmel also had in internal temperature sensor as well. Indeed, it appears that you can simply do an analogRead(8) to access an internal “virtual pin” that links to an internal temperature sensing node. (On the Arduino Mega boards, the pin will be a different one) Read about it more here. I’m currently just using an old ATMega168 which doesn’t seem to have that capability, so I haven’t tested it. It appears that the sensor is noisy and uncalibrated, but it might be useful in some applications. When I dust off one of my more recent boards, I’ll give it a try.
I had an application where I wanted to detect temperature. No big deal, lots of good temperature sensors exist. But of course, I don’t have any of those. Rather than order something from sparkfun, I thought I’d just try to see what I could do with the stuff I had on hand. What I had on hand was about 100 1N4148 diodes that I got for about a penny a piece.
The idea is that the forward voltage of diodes is temperature dependent. For every degree Celcius the diode increases, the forward voltage should drop by 2mV. So, I decided to test this idea. I configured the analog input pin 0 on my Arduino to be an input, and then activated its internal pullup resistor. I then wrote a program which averaged a bunch (1000) of readings in an attempt to get a stable, relatively noise free signal.
I logged the values beginning at room temperature, then held the diode between my fingers, and then released it a couple of times. Here’s a graph of the resulting data values:
You can see that when I grab the diode, the forward voltage drops rather quickly, but when I release, the signal returns to the original value, somewhat more slowly. Room temperature in my house is around 70 degrees (21 degrees C) and body temperature is 98.6 is about 37 degrees C. The difference would then be about 16 degrees C, and we might expect a difference of 32 mV, but I experienced a difference of only about 16mV. At least part of this can be attributed to the fact that your finger temperature isn’t actually that close to 98.6.
This simple experiment demonstrates a couple of problems: the values returned by analogRead() are noisy, and quantization error is significant. The analogRead call returns a 10 bit number, which means that each bit is about 4 mV, or about 2 degrees C. We could use an operational amplifier to multiply the voltage to make it easier to read, which might help. Consider that an experiment for the future.
I keep looking for cool projects where people build small computer and microcontrollers, more or less from scratch. Today, I ran across FIGnition:
FIGnition is a £20 educational DIY computer which works like an 8-bit home Micro: outputting to composite video and ready to be interactively programmed from the moment you switch it on. It has 8Kb of RAM; 384Kb of storage; an 8-key keypad and runs a variant of FIG-Forth. It uses USB for power; firmware upgrades and program downloads.
via fignition – Libby8dev
Very cool little Forth-based computer, using at ATmega168, a small 8K serial RAM and an SPI flash memory chip. You can either buy a PCB board, or you can assemble it on strip board. Lots of good ideas!
I mentioned that Roger, G3XBM was shifting from the very low frequencies to much higher frequencies. His interest has already uncovered some links that I hadn’t seen before. One very cool thing was his discovery of a local 477Thz beacon (that’s red light) that is aimed roughly in his direction at a distance of around 30km. The beacon is the work of GB3CAM, and uses ten 10mm red LEDs, running with about 400mw DC power input. What a cool idea! The entire circuit consists of a PIC processor and an XR2206 monolithic function generator.
A conversation I had recently got me on the topic of solar energy, and introduced me to something I hadn’t heard of before: maximum power point tracking. The basic idea is solar cells exhibit a complex non-linear relationship between illumination, temperature and resistance. This is usually represented by an curve that (for a given temperature and level of illumination) shows the relationship between current and voltage. Let’s swipe the diagram from wikipedia:
To maximize the transferred power, we want to maximize the power of the solar cell. This means operating the DC/DC converter at the particular point along the I-V curve where the area under the rectangle is maximized. Tim Nolan has designed a pretty cool circuit that when combined with an Arduino can do precisely that:
The details of the design are a bit beyond me at the moment (I’ve studied it for about 20 minutes) but the basic idea is to sample the voltage (via a voltage divider) and the current (derived from the voltage drop across a very small current sense resistor, amplified by an op amp), and then use the PWM capabilities of the Arduino to serve as a switching dc/dc converter. Very neat little circuit. I’ll study it more in the future.
I’ve mentioned Codec 2 a few times in the past, but for those who don’t rememember, David Rowe has been working on a very low bitrate codec optimized for speech applications. This is of interest in amateur radio because we don’t have a suitable speech codec which isn’t patent encumbered (if for instance, DSTAR’s AMBE codec was not encumbered by patents, we could create open source versions which would be compatible with the DSTAR network).
David just announced that’s he’s got the codec down to 1400 bits per second. Check it out: it sounds pretty good.
I’ve stopped hacking on my Arduino/Gameduino satellite tracker for now. Here’s the final video demonstrating it running:
I’m currently working on the final schematic which will be posted on this permanent page. The code will be available github.com, for right now, it includes the library that I wrote that does the satellite prediction. I’ll be updating the code sometime later this week.
If you take it and use it, let me know: it will motivate me to do more with the code.
I’ve been playing a great deal with Arduinos lately, and have acquired a couple of Xbees to experiment with wireless. But Xbees, cool as they are, are kind of expensive for many tasks where a much simple RF link could suffice. Today, I ran across the JeeNode, which is available as a kit from Modern Device for just $22.50, and that includes a 915Mhz RF link. You’ll need an FTDI cable to program it, just like any other low cost Arduino. Pretty neat!
I like operating systems. My first exposure to Unix was a revelation. Unix was a complex operating system that provided useful facilities for programmers, and it wasn’t written in assembler and locked away: it was written in C (the same language that you use to write ordinary programs for Unix) and it was understandable.
This was enhanced by The Lions Commentary on Sixth Edition Unix. It’s a brilliant commentary, clearly describing the source code for the Sixth Edition Unix. It filled a gap in the practical learning of operating systems for a generation of students.
But, well, it’s aging. It’s hard to use the Sixth Edition code, because it’s written for a PDP-11, in an archaic dialect of C, and well… we can do better.
Luckily, that’s what MIT thought too. They created an ANSI C version of the Sixth Edition Unix, compiled it for the x86 architecture in a way that could be run under the QEMU or BOCHS emulator. Here’s the page:
I was looking for beacon circuits, and ran across VK3YE’s USB powered 40m transmitter. Unlike most simple beacon transmitters, this one transmits double sideband, which makes voice transmission possible. I like the basic idea!
Pretty simple! A couple of things to note: the NDT2955 is a logic level P type MOSFET, which turns fully on with a gate threshold of just 4V. Readers may remember that my own experiments with the IRF510 didn’t succeed in some small part because the IRF requires 10V to switch entirely on. Secondly, the ATtiny13 is powered directly from a 6V supply, through two diodes. These are there simply to drop the voltage to the 5.5V level which is the maximum safe amount. The ATtiny13V is very forgiving on voltages, and can operate all the way down to 1.8V, long after the batteries will have given up the vast majority of their power.
I’ll try to work through the equations and design a similar driver for my 1W Cree LEDs. To build it, i’ll need to come up with an appropriate MOSFET. Stay tuned.