Tuesday, April 7, 2015

20140506 Arduino VGA Out

May 6, 2014
Arduino VGA Out, one of the many things I randomly see as I roam the internet. This is kind of a neat project, and it does work, and it was pretty simple to hookup even thou there was an error in the documentation.  I do have to say that couple of the sketches on the google code site didn’t work. I’m not sure if they are works in progress or what.  That being said, the project did as expected and outputed a display on a VGA monitor. Here is the link to the project,
https://code.google.com/p/arduino-vgaout/ It seems there hasn’t been an activity on the site since June of 2013, so I don’t know what the current status is.  I also had to do a little digging to find what pins on the arduino this uses. And pictures of someones completed setup can be found here (It looks like he was using a 2011 version):
In the schematic, he also points out that PIN 9 shouldn’t be hooked up on the VGA connector, PIN 5 and PIN 10 should be ground, there was an error in the original schematics that are still on the google code site.
Quite a bit more information can be found on the Arduino forums:

I was going to chop up an old VGA cable to make this when I found that MCM electronics have this (and it’s only $4.50) and since I wanted to be sure I got the right resistors for this project I was already going to make an order, seemed like a no brainer:


VGA to Screw Terminal Module - MCM Part #: 83-12821

It probably ending up saving some build time, thou how much would be debatable.  So here are a couple of pictures of my setup:



So as you can see, it’s takes up a lot of pins, all of the analog pins, and 2 of the digital pins.  The digital pins are used for HSYNC and VSYNC, the analog pins are used for RGB, each color channel takes two pins, and each have a 1K and 470ohm resistor wired up. And yeah, I went a little nuts with the size of the resistors, I wasn’t really thinking about it at the time I ordered them, oh well, they were cheap something like $0.70 for 10 of them.
I probably need to trim up the resistors a little, but what the heck it works, and it will be one of those projects that I can say I did it, and now it’s in a box… :-)

20140424 DHT11 Humidity and Temperature Sensor

Apr 24, 2014
DHT11 Humidity and Temperature Sensor.  This is a fairly simple device, very simple really.
It uses 1 wire, and VCC & Gnd - Works at either 5v or 3.3v, and is slow as compared to some of the other temperature sensors. There is no calibration to it, pretty much plug it in and take a reading. It could take up to 2 seconds before a reading happens thou.  
Adafruit has a lot of information about this sensor, and it’s bigger brother DHT22 (they work the same way, the DHT22 is a little faster, and more accurate)
Adafuirt also has a DHT library which makes it even easier to use this device.

OH BTW The pull up resistor is not as necessary as it might seem to be (it works without it) -That bit of information came from a Teensy forum, Teensy seems to have some timing issue with it thou and it doesn’t work as it should with out a lot of modification of code with the Teensy 2.0 - IT apparently works just fine with the Teensy 3.0 using the default settings in the Adafruit library

20140420 Nokia 5110 LCD with Arduino

Apr 20, 2014
Nokia 5110 LCD with Arduino.

Not going to go too much into how this works, mainly because I’m not 100% sure myself.
Also not going to post a lot of code, because this device is very well documented. I will give links to Sparkfun and Adafruit, both with contain a lot of information about the LCD.  
Sparkfun, only uses the SPI Library, which is interesting, you will see in the code alot of HEX, which is how the display gets its commands. From what I can tell, the screen is not true SPI - but it close enough that the SPI library doesn’t have a problem with it. I think Sparkfun contains more information, or at least better information about this device.
That being said, Adafruit developed a ready to use library - and from what I can tell they are making the display work a little different then how Sparkfun did it. The library does make it a little nicer as well, since you can just call what you need, there is still some HEX to do graphics, but it looks like that is if you are doing a custom graphic, standard things like lines and circles, squares are all handled by the library.  There demo program is better as well, shows off more of what the display can do. So to sum up -
Sparkfun has better information, but Adafruit has a better library and program.
Here’s some links:

Stolen (don’t say that too loud, but I think we are aloud to use them) from the Sparkfun site:


Apr 4, 2014 - Using a 74HC595 8 Bit Shift Register with a 7 segment LED and Arduino

Apr 4, 2014 - Using a 74HC595 8 Bit Shift Register with a 7 segment LED and Arduino

A Better Example of using a 8 bit shift register (74HC595) with 7 segment LED - I got it working


int dataPin = 2;
int latchPin = 4;
int clockPin = 3;

byte dec_digits[] = {0b10000110,0b01101101,0b1001111,0b01010110,0b011011011,0b1110011,0b00001110,0b11111111,0b01011110,0b0111111 };

void setup() {
 //set pins to output so you can control the shift register
 pinMode(latchPin, OUTPUT);
 pinMode(clockPin, OUTPUT);
 pinMode(dataPin, OUTPUT);
}

void loop() {
 for (int numberToDisplay = 0; numberToDisplay < 10; numberToDisplay++) {
   // take the latchPin low so
   // the LEDs don't change while you're sending in bits:
   digitalWrite(latchPin, LOW);
   // shift out the bits:
   shiftOut(dataPin, clockPin, MSBFIRST, dec_digits[numberToDisplay]);
   //take the latch pin high so the LEDs will light up:
   digitalWrite(latchPin, HIGH);
   // pause before next value:
   delay(1000);
 }
}

4/1/2014 HC-05 Bluetooth device

Apr 1, 2014    HC-05 Bluetooth device
At the 1st meeting I attended Jim gave me a blank holder for the HC-05 Bluetooth device, I was able to solder a HC-05 to it today, and it worked well.
The HC-05 bluetooth is a surface mount style device, and that can be a little scary for people.
They are cheap enough, and the blank is cheap enough I figured if I messed it up I wasn’t out much.  You aren’t saving yourself much by soldering your own to the blank (I think .30 or .35 cents, spend the extra money and get one already mounted).
I used the “drag” method of soldier, which is only one method for doing surface mounts, but I’ve got to say, it was easy to do, and it works, and it works well.

You’ll see in a couple of the pictures below that I didn’t get every pin, on this it doesn’t matter, I got the pins that are connected and as I said the bluetooth does work well.



3/22/2014 Cheap FS100a 433 Mhz Transmitters Revisited


Mar 22, 2014  CHEAP FS1000a 433mhz transmitters revisited,

Hooked up two transmitters and one receiver.  One Arduino was set to transmit “hello #1”, One Arduino was set to transmit “hello #2”, and one Arduino set to receive, Seems to work fine!

here’s a video:


So I was giving it the worse case, and the best chance to fail, and it seemed to work. By that I mean, both transmitters were right next to each other, the receiver was only a less the a foot away, and I put antennas on everything.
I don’t know for sure, but I had suspected this would work. I think it’s because of the modulation type, but I’m not sure about that either (not 100% sure).  A lot of digital modulation types have built in error checking.  
These are cheap, and a cheap way to send low speed data around.


3/16/2014 The SPO-512 Speech Synthesizer

Mar 16 - 17, 2014
A side project this week, The SPO-512 Speech Synthesizer also known as the RoboVoice from SpeechChips.com http://www.speechchips.com/shop/item.aspx?itemid=22

This is a PIC microcontroller that takes a serial 9600 baud input (ASCII data) and outputs (speaks) VOICE, There are a couple of demos of this on the website. I bought the chip probably 2 years ago, and it sat on my desk.  There is a design circuit in the PDF on the site, turns out most of the circuit is an amplifier for the speaker, the circuit to make this work is really pretty simple. 4 grounds, and 4 3.3v power - a TX line, a RX line, a Cap for filtering (I think, left it off and it didn’t sound as good, I also didn’t have the 4.7u cap that is called for, I used a 10u, seems to be fine so I think it is just filtering) and an output to the speaker.  

I have a lot of parts that I pulled out of old computers, turns out a few of the dell systems have little tiny amplified speakers build in them, these things work great, and I wish I would have pulled more out.  I am running my little speaker off 5v, but I wonder if it wasn’t hooked up to 12v in the computer - seems like they were much louder. Doesn’t matter it works, and I think it will work at 3.3v as well.

I think I’ve talked to the man who invented this chip, I think he is very active in the “Basic Stamp” forums, and very knowledgable about all things microchip.

Speech chips offered a robovoice on an arduino shield, I don’t think they do any more. So after I went from breadboard, I moved the whole thing over to a proto board, (well the speaker isn’t mounted, I really wanted to mount it, but…)
So here are a few pictures of my side project, and I’ll bring it with me to the meeting on Thurs.

It took a couple of hours to move it from breadboard to proto board, and I ran into a couple of issues, the 1st, the chip is 28 pin, the board only had enough multi-tap pins for a 20 pin microchip, (Issue was fairly easy to overcome). 2nd my proto board didn’t give any tap to the 3.3v line of the arduino, in fact it was shorted to the 5v line (Huh?) Yeah that was a mistake from the manufacturer I am sure, but I can see how someone not paying attention could short out the Arduino board.  This proto board provide 3 different 5v rails, and 3 different ground rails, (one set of those rails ended up being UNDER the IC chip and not at all in a useful spot), No 3.3v rail, I had to make my own. but that ended up taking up more room on the board then really needed. I could have done without one of the 5v rails for a replacement of a 3.3v rail, probably would have had to move the IC but I could have dealt with that.
My last issue was - this proto board had stackable header on it. I wanted to make this semi-permanent so I didn’t want to plug a wire into the header, I wanted to use the port directly. I had to remove the most of the headers which caused another problem, it was a little hard to remove the headers, and the holes closed behind being removed, for some reason my solider sucker just wasn’t working well tonight.  
Over all thou, this was a fun project, now I just need to order a couple more protoboards for the next time I want to move off breadboarding.