Show Posts
Pages: 1 ... 60 61 [62] 63 64 ... 69
916  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Realtime Spectrum Analyzer with Video Out! on: November 14, 2010, 04:09:25 pm
Taking forever for the video to be processed by blogger software.  My little Kodak does it's filming in Quicktime MOV's, which for some reason takes forever for vendors to process into post-able format.  For what it's worth, posting the video to YouTube also just in case, they are usually a little better..

917  Forum 2005-2010 (read only) / Exhibition / Arduino Realtime Spectrum Analyzer with Video Out on: November 14, 2010, 03:14:35 pm
After only minor tweaking, a project I had in mind worked on the first try... a (near) Real-time audio spectrum analyzer light show.  The goal was to produce an amusing party display, and isn't intended to be used for any real purposes.. just fun!

There's a lot of room for improvement, feel free to tweak the design- the single-transistor amplifier is barely enough to use, my next version will chain two transistors in a Darlington array to increase the gain.  The Fast Fourier Transformation (FFT) is thanks to a Arduino forum post- 8-bit FFT in C.  Coupled with the TVout library also found here, it's a working design if not optimal!

Link to Project:
http://blurtime.blogspot.com/2010/11/arduino-realtime-audio-spectrum.html

Link to 8bit FFT code in C that made this possible:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286718155
918  Forum 2005-2010 (read only) / Exhibition / Re: Hackvision now available on: October 22, 2010, 04:56:37 pm
This was also done for other machines, in fact, I remember clearly writing code for Atari 400 that does color by artifact.  Note that I think it only works for CRT's, I don't think the process would work on an LCD or other screen.  You should be able to experiment to get the effect... the whole idea is spacing vertical, horizontal, or diagonal lines at regular intervals.  You essentially cut your resolution by using two (or more) pixels per "dot", but you gain some basic "color".  To test it for yourself, just write some code for your lib there, and see what "colors" you get using different patterns.  If I remember, it only gave you a palette of half a dozen psuedo-colors, but it was useful when you had nothing else..

I do also think it required that hrez be rather high (320 or more) because it had to do somehow with overscan..

I remember that the base code that I used was from COMPUTE! magazine, if I had to guess, probably 1984-85ish, if that helps..
919  Forum 2005-2010 (read only) / Exhibition / Re: Simple arduino routerbot on: October 17, 2010, 07:51:15 pm
Very cool.  Now, what you do is build an army of them that run on solar cells (hmm, not outlandish so far).  Each one keeps going until it's received signal from the previous node drops to a certain level, at which point it becomes a "repeater" as a bridge.  If it's received signal drops below a certain point, it would backtrack until it found signal.. and if signal is above a certain point, the node would pull up stakes and set out to find a new "home".

It would run as a self-healing WiFi network, which would be extremely fault-tolerant and self-repairing.. nodes simply seek to extend range at all times while still remaining interconnected.  One might base the "homing" rules on being able to get connection to two or more nodes to set up camp.. I'd be surprised if this type of thing hasn't been worked out before.  For you guys that remember radio days, wouldn't a self-ranging free-roaming repeater network have been fun?

Outlandish.. for a hobbyist, yes.  However, you might be surprised what NASA and the Military might make feasible, if they like a technology... happened many times before..  and imagine a battlefield network that autonomously repairs itself and re-ranges based on an updatable (as they are interconnected) rule set..  
920  Forum 2005-2010 (read only) / Exhibition / Re: Halloween Display Lightning on: October 18, 2010, 05:44:54 am
You know, I totally forgot to think about the voltage drop across the transistor.. and since the recommended Vf is 3.42v on this module, that's quite a bit more breathing room than I was thinking at first.  Five ohms was a little high anyway, it was a convenient number when I was having trouble finding low-value resistors in my box of goodies.  If my math is right, the "ideal" value is about 4.7 ohms... but as you had said (and I noted in another thread), we can probably get away with overdriving the LED quite a bit because of it's intermittent use.  Heat is the issue in play, and our flashes are pretty short.  That being said, 1w LED's go for cheap money these days and I wouldn't freak out if I cooked one over the course of a full evening of trick-or-treaters..  

SO.. I may add a third 10 ohm resistor in parallel, which drops the series resistor to 3.333etc ohms.  It will be getting overdriven pretty significantly at that level, but since it's a Luxeon Star, it's mounted and heatsunk fairly well, and if needed, I can grab some heat paste and slap it onto an old CPU heatsink I have lying around.

As wired, it would be pretty good for some window display or whatever at best.. overdriving it, especially since I am Underdriving it at the moment, the light output (if it remains fairly linear, which I think it does, to a point) might be a LOT higher than it is now..

Thanks for catching that!  Once again, too many years away has left me a bit of a dolt when it comes to circuitry.. three semesters almost thirty years ago, way too easy to forget valuable info!
921  Forum 2005-2010 (read only) / Exhibition / Halloween Display Lightning on: October 17, 2010, 04:06:08 pm
This is a really simple project.. a PWM-flickered superbright (I used a 1watt Luxeon) LED strobe for halloween decorations.  Every 2-10 seconds at random, a sequence of PWM levels are fed out, to simulate the flash of lightning.  Feel free to mess with the delays, just be careful if powering the LED for long periods, as a series resistor to regulate LED current is inefficient and generates a lot of heat which will damage components.  

Note that driving a power LED by using a power resistor is not recommended.. but since we are doing short pulses, heat isn't as large an issue.  Longer "on" times may present issues.  In addition, for the 5v supply, I tap directly off the 5v regulator.  This circuit will pull 350ma for just the LED, in addition to more from the series resistor.  I wouldn't recommend drawing that much power through the regular circuitboard traces on an Arduino.  If you use an external power supply, remember to connect the grounds!  You can use a different supply voltage for the LED as long as you adjust the series resistor accordingly, or multiple LED's in series.  The TIP120 can handle quite a bit, particularly as it's being used as a switch in this configuration.  If you're going to be doing much interfacing to arduinos, I'd get a few of them.  For lower current demand, I'd recommend 2N2222 or 3904's... pennies each and a perfect little switching transistor for projects.

TIP120 is a Darlington transistor, but any NPN that can handle 500ma or more will likely work.  To create a 5 Ohm resistor, I connected two 10 ohm resistors in parallel, which also shares the wattage (heat) dissipation.  Remember to keep heat in mind, parallel resistors of small wattage can replace a single higher wattage one in most cases.

Remember also to check the pinout of your particular transistor type, many small-signal types order pins C-B-E, while others (like TIP120) order their pins B-C-E...  This circuit is a nice general-purpose switching circuit, usable for almost any load without modification.  Inductive loads like motors or selenoids will require a diode to supress voltage spikes.



Code:
int flash[]={255,128,64,255,64,255,255,0,128,0};

void setup() {                
  // initialize the digital pin as an output:
  pinMode(11, OUTPUT);
  Serial.begin(9600);
  // Seed random number generator with noise.
  randomSeed(analogRead(0));
 }

void loop() {

  // loop through the array with our flicker pattern
  for(int i=0; i<10; i++) {
    analogWrite(11,flash[i]);
    delay(100);
  }
  
  // wait a random time from 2 to 10 seconds
  delay(random(2,10)*1000);
  
}

This is meant as a temporary circuit, any longer-term design should use a constant-current cicuit to drive the LED....
922  Forum 2005-2010 (read only) / Exhibition / Re: A simple Arduino project for beginners: SIMON on: October 13, 2010, 06:36:31 pm
Very cute!  Like Korman said, go for random sequence- but other than that, awesome documentation of your project.. that's one that a beginner could follow easily.  Bravo!
923  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 17, 2010, 04:04:37 pm
Okay, so now I am running into problems... it seems the TVout Library does not play nice with Serial communications, causing dropped characters from the input.  I assume this is because of an interrupt issue.

Once TV rendering has begun, serial data transfers become unreliable.  The idea was to accept data in via serial and display- but you can't do both.  Pausing the rendering does nothing to improve.

You said you had a term program working? what am I doing wrong here?

Code:
#include <TVout.h>

TVout TV;
char indata[256]="test";
int i,cnt,foo,t;

void setup()  {
//  TV.begin(_NTSC,128,96);
  Serial.begin(19200);
}

void loop()
{
  cnt=Serial.available();
  
  if (cnt>0) {
      delay(100);
      foo=Serial.available();
      for (t=0; t<=foo-1; t++) {
        indata[i]=Serial.read();
        i=i+1;
        };
  indata[i]=0;
  Serial.print(i);
  Serial.print(" bytes: ");
  Serial.println(indata);
  }
// TV.print_str(0,0,indata);
};


or is there something else going on?

If I remove the commented out render references, serial data gets garbled and lost.  pause_render() does not change anything.  Thoughts?

[UPDATE]

Looks like it is indeed a lib/serial conflcit involving interrupts.  However, the new version of the lib to be released will address these issues.  Since the lib isn't quite ready for "prime time" per the author, In the meantime, I'll work on a workaround.. which will be forward compatible.  Just know that the new lib will make my workaround kind of obsolete...
924  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 16, 2010, 03:33:53 pm
Anyway, gonna rewrite the sketch so it accepts text input from the serial port.. making it a nice little "teleprompter" or video dongle.   Once I started thinking about it, a barebones arduino (chip, regulator, resonator is pretty close to all that's needed) that functions as a serial-to-videotext generator/marqee for under $10 is a damn cute project..


I think it's already been done, but if not, I see a one-chip serial terminal with ntsc out in the not too far future...

Here's a gallery with the setup running...
http://www.facebook.com/album.php?aid=2090070&id=1467522154&l=f96ac27b05
925  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 16, 2010, 10:13:56 am
Anyway-- does anyone know where I can find the music (like notes..midi?) for the Zero Wing opening?  The first "text" sketch I did, which led to this "card", was the Zero Wing opening sequence, better known as "All Your Base Are Belong To Us."

I now feel the need to complete the thing, with music.  I've already discovered there is a conflict with the text-to-speech library (pin 10 output, but prolly could be remapped) which would give me CATS... but, what the hell... MAIN SCREEN TURN ON!

Ha ha ha ha ha!
926  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 16, 2010, 06:14:31 am
You can find it in the "playground", under the Output section.

It's a very easy to use and cute library.  It does cause a few conflicts here and there, especially other libraries that want to have d8-d10 to themselves- but most things work great.  I'd recommend this mainly for AT328 if you are gong to have extensive code.. it does eat a bit of memory.

I'm currently working the interface for a camera controller using this, and switching back and forth between the arduino video and video the camera outputs (previews, etc) and piping that to the screen.

this is such a simple build that you can do it for a gag.. have fun!

By the way, this should also work for PAL, simply change it in code.. if the library supports it, which I think the current version does.
927  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 15, 2010, 08:08:28 am
Additional thought:  I may modify the code to make this a "real" project.  All I'd really need to add is Serial input (to "record" the message) and store the messages in flash so it retains the data during poweroff.  That way you could connect via serial (even terminal program or serial monitor in IDE), dump in your message, and be ready to go.

LED blinkies are popular in the colleges around here, I think making a simple NTSC video text generator that is essentially disposable might have some really cool Guerilla Art potential..  probably best to create a markup language for the input, so that delays could be set, inverts could be done for effect, and graphics could be incorporated.

Last but not least, as long it meets the memory required and can be clocked at a workable rate, I would assume this could be ported over to even smaller, cheaper Atmel chips like ATTINY.  Just how small a package could you fit 4x button cell, ATTINY, and a RCA plug into?
928  Forum 2005-2010 (read only) / Exhibition / Re: Video Greeting Card - Arduino Style! on: September 15, 2010, 08:00:37 am
Heheh.. worked perfectly.  She loved it.  She'll be back Friday night and has already texted that I should prepare for a romantic evening, so to speak..

 ;D

Since I'm using a BoArduino from adafruit, it's even smaller than a standard arduino.  Plugs directly into breadboard- though I plan to pick up an "actual" Arduino (and a Mega also) at some point when I've got a little play cash about, I'm loving the breadboarding ease of the BoArduino I must admit.  Less wires means less places to go wrong.  I'm using the AT328 version, no USB onboard (so you use serial/TTL converter)- draws very little power.

I power it with a 9v battery, when not plugged in, though for maximum duration I'd probably use 4xAA.  The BoArduino has a 7805 voltage regulator, so it'll be happy with anything from 5v to around 12v without too much worry.  If you used a Nano, the design would be even smaller, maybe you could power with lithium cells.

In any case, the little beast works with any NTSC input- so with some simple code you can have a little "teleprompter" or Ninja Video Feed Hijack for all of $15.. think walking into Best Buy, plugging it into a huge Plasma screen, and walking away while it cycles.

Someone set them up the bomb?  Let go every Zig. For great justice.

-focalist
929  Forum 2005-2010 (read only) / Exhibition / Video Greeting Card - Arduino Style! on: September 15, 2010, 12:03:22 am
My wife is taking a short business trip this week, and to score points, I imported the tv_out library and connected up the output resistors into a plug for  a broken portable DVD player, which accepts NTSC video in, but disk transport is shot.  Happily it also runs on 9v, so I can run the whole rig from one adapter.  For the circuit, you simply need a 330 ohm resistor from d8 and 1k ohm resistor from d9- connect both of them to the center conductor, and the shell to ground, for most connectors to video displays.  For specific info, I'd recommend reading up on the actual library.  VERY nice, if a tiny bit twitchy

 smiley

In any case, left it running for her to find when she gets up in the morning... a cute sendoff that she'll get a kick out of and brag up to her office friends...I know what side my bread is buttered on!!  The whole thing takes all of five minutes to rig up-  score some spouse points (just remember to substitute your OWN NAME at least...)

Laugh all you want.. I'll get the payoff for the corniness of it...

smiley-wink

Code:
#include <TVout.h>

TVout TV;

void setup() {
 TV.start_render(_NTSC,128,96);
}

void loop() {
 
  TV.clear_screen();
  TV.print_str(0,0,"      Hi Honey! ");
  TV.print_str(0,16," I just wanted to ");
  TV.print_str(0,32,"Say that I Love You");
  TV.print_str(0,48," and that I'll miss");
  TV.print_str(0,64,"        you! ");
  
  TV.delay_frame(360);
  TV.clear_screen();
  TV.print_str(0,0,"      MWAH!!!");
  TV.print_str(0,16,"  (Smooches)...");
  TV.print_str(0,32,"  (Snuggles)...");
  
  TV.delay_frame(180);
  TV.clear_screen();
  TV.print_str(0,0,"    I Love You!");
  TV.print_str(0,16,"     @@@   @@@ ");
  TV.print_str(0,24,"    @@@@@ @@@@@ ");
  TV.print_str(0,32,"     @@@@@@@@@ ");
  TV.print_str(0,40,"      @@@@@@@  ");
  TV.print_str(0,48,"       @@@@@ ");
  TV.print_str(0,56,"        @@@");
  TV.print_str(0,64,"         @ ");
  TV.print_str(0,80,"    Love, Paul");
  TV.delay_frame(360);

}
 

Nite guys!
930  Forum 2005-2010 (read only) / Exhibition / Re: binary out on: August 14, 2010, 07:00:34 pm
erm, yah.. variable scope..  and the six must have been a typo. I'll blame it on blind coding while half awake smiley-wink

 When I was doing development work, I was doing Oracle/SQL and VB (client/server special purpose apps)- both of which are notorious for their variable declarations.. or should I say the lack thereof, in most cases.  Code efficiency and data compactness aren't what you are looking for, as much as readability and understandability- because some poor schmuck is going to have to deal with it eventually, when they want to change the code.  Way too many bad habits get ingrained when playing by the rules becomes optional.  "Forced" back into a strict-syntax language like C, I sometimes pay for all the evils I got away with it seems... at least we can avoid pointer operations in Arduino.. almost guaranteed to confuse even the programmer writing the code...
Pages: 1 ... 60 61 [62] 63 64 ... 69