Show Posts
Pages: 1 2 3 [4] 5 6 7
46  Using Arduino / Project Guidance / IR Remote controlled finger for camera shutter (completed with demo video) on: March 02, 2011, 04:57:29 pm
This is one of my first completed arduino projects.  A IR remote controlled (and also laser controlled) finger to manually press a camera shutter button on a Nikon P100 camera, since that camera has no other way to support remote shutter.

Demo video here. 

I plan to eventually put up some sort of tutorial somewhere for other newbies to help avoid some of the issues I struggled with while learning, if anyone knows a good place to put up a quick and simple tutorial without a bunch of hoops to jump through let me know.
47  Using Arduino / Programming Questions / Re: Newbie having trouble displaying variable on lcd. on: February 25, 2011, 02:01:38 pm
Daneel: Thank you so much for taking the time to write that code.  Definetly above and beyond.  I'm going to try it later today.  I think I'll try without the delay though and see how it works.  For this particular project the delay doesn't matter, but I know in the future I won't want to have delays holding up the rest of the code.

PaulS: Could you give an example of the correct syntax for the sprintf command in this situation?  I did some seraching for sprintf but all the examples I had found were very confusing and seemed to be used for completely different situations.
48  Using Arduino / General Electronics / Re: Help choosing correct opto isolator. on: February 25, 2011, 01:48:30 am
Thanks for that advice, I did not know that there was such a thing as an opto-scr.

I'm pretty sure my flash doesn't go above 300v, my multimeter says 160, I've just heard rumors they could go up to 400, so perhaps the TLP372 could work, but I am leaning towards theVO4257.  One thing I don't know for sure is the current requirement of the flash, since my multimeter doesn't trigger the flash when measuring the voltage, it must not let through enough current.  So the higher the capable current the better.

One thing that would help big time is can anyone help explain exactly what variables I should be looking for on a datasheet?  I mean, I wish it was more simple like max input voltage, and max output voltage, and speed.  But instead there are so many more complex terms, such as input always contains "reverse voltage", "forward current", "breakdown voltage", "collector emitter voltage" and many other cryptic terms.  Which one simply means the input voltage?  And when you try to figure out the amount it can pass through the output, they are always full of cryptic terms like "off state voltage", "continuous power dissipation", "breakdown voltage", "dark current", "isolation voltage", "rms on state current", and many others, how to I simply figure out how much voltage and current can pass?  Also the speed, on occasion I think I find speed listed on datasheets, usually in "us" microseconds, but many times I don't find it at all.  I'm not too picky about speed, but as long as its within the microsecond range it should be fine, but I'd still like to know, and can't always find it. 

If anyone could simplify which are the important fields to look at, it would really help in being able to figure this stuff out on my own.  I've tried looking up datasheet reading tutorials before without much luck.
49  Using Arduino / Programming Questions / Re: Newbie having trouble displaying variable on lcd. on: February 24, 2011, 10:29:54 pm
Quote
Its a much easier solution than all that. You are not clearing the display. Get rid of lcd.home and cursor positioning, Just use lcd.clear() at the end of your loop.

I've been messing around with that lcd.clear() code, however am having issues with it as well.  If I simply add it to the code, I end up getting nothing on the display.  I think that its just writing and clearing so fast that nothing shows up.  

I did write a code where it has the lcd.print, then a 20ms delay, then lcd.clear, and that sort of solved the problem, at least the variables are showing up correctly, however it is having 2 issues as well.  First it is adding an unnecessary delay (doesn't matter for this project, but will for others).  And second it adds sort of a rolling refresh effect to the text.


As far as the sprintf code, I spent a bit of time looking it up, but its not in the arduino reference at all.  I did find other various references to it (mostly non-arduino related), but they were all extremely confusing.  Isn't there an easier way than using this exotic piece of code that isn't well documented and seems rarely used with arduino?

I'm just so baffled that I seem to be the only one having this simple problem.  I've spent hours combing through around 50 different pages of different arduino projects with lcd's, arduino lcd tutorials, etc.  Yet I could not find any mention of anyone having this issue with values displaying correctly.  Such an incredibly simple thing, display a variable, yet I didn't find it incorporated into anyone else's project, most people seemed to be displaying either text, or numbers that only increase and never decrease.  

I suppose I could add all sorts of extra lines of code, with big "if" tiers that monitor when the number of digits changes, and how many digits, and adds spaces when the digits drop down or whatever, but that just seems so elaboarate and sloppy.  Does it really take a massive "if" "else" "else if" tree to get a number such as 1 to display as 1 instead of 100?
50  Using Arduino / Programming Questions / Re: Newbie having trouble displaying variable on lcd. on: February 24, 2011, 06:21:25 pm
I just tried using the lcd.setcursor call, instead of the lcd.home call, but it still does the same thing.  Works good at first, 1 is displayed as 1, etc.  However once I get to the double and triple digits, the extra zeros never go away, so 1 will be 100.

As far as the value being a set amount of characters though, it will always be a different amount, since it will be either 1, 2 or 3 digits depending on the value (from 0 to 179)
51  Using Arduino / Programming Questions / Newbie having trouble displaying variable on lcd. on: February 24, 2011, 04:21:57 pm
So I've read multiple tutorials, and the arduino lcd reference, but have not seen this seemingly simple problem addressed anywhere.

This is my first time using an LCD, I'm using one of the common 16x2 lcd's.  I'm wanting to display angle of a servo, which is controlled by a potentiometer (right now I have the servo left out).  The problem is the way it is displaying the values.  Originally using lcd.print(val), when displaying something like 51 for example, it would display 51515151515151515151, anything over 2 digits would end up a garbled mess. 

I tried almost every type of code from the arduino reference, and found that adding lcd.home(), did help a little, but not completely.  Once I get up to a triple digit number, the 3rd digit never goes away, so something like 150 would be correct, but 67 becomes 670, 1 becomes 100, etc.

How can I get this value to display correctly?  Here is the code I'm using.
Code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 179);
  lcd.home();
  lcd.print(val);
}
52  Using Arduino / General Electronics / Re: Help choosing correct opto isolator. on: February 24, 2011, 01:18:25 am
Bumping the thread.  Its been a few weeks, and still haven't got a suitable optocoupler.

Can anyone confirm the TLP372 should work by itself?  Or have a different one to recommend? 

I've been reading over the datasheet, trying to make sense of it all, but I just don't know enough to understand most of the details, and if it will let through enough volts and current, with a low enough input voltage.
53  Using Arduino / Project Guidance / Re: Help making bare minimum standalone arduino. on: February 19, 2011, 01:25:29 pm
Thanks for all the input, very helpful.

One thing I noticed though is on many of the rather minimal arduinos, people are hooking them up similar to my schematic (which I'm not 100% sure is right).  http://img191.imageshack.us/i/arduinoschematic.jpg/ , however they are also applying voltage to the AREF pin, sometimes direct, and sometimes through a resistor.  Is this necessary or not?  I've never used the aref pin on my duemilanove for anything.

Also, some are not using a pull resistor on pin 1 reset, and others are. Is the resistor pretty important, or not really?

And I don't get why, if the voltage regulator can by made with just the chip and 2 capacitors, why is the rbbb kit (and others) using 3 capacitors, and a diode? (plus an led, but I understand the point of that).

All the info just varies so greatly from different sources.

I hate asking so many questions, but I'm just baffled by how hard of a time I've been having finding this basic info.  I've searched for "minimal", "standalone", " bare minimum", and others, and read at least 50 pages of so called minimum arduinos, and none of them are minimum.  They all have tons of extra parts for programming, and generally are pretty full fledged programmable arduinos.  I mean, thats good for a diy arduino that you can work on, and those are very cool. But if you already have a working project with all the bugs worked out, then it shouldn't need any extra programming.  If you want to make it permanent, or make multiple permanent copies of it to give to family, or other situations like that  then there is no point in wasting time and components, using anything more than the bare minimum components, and minimum connections.  Seems like something 95% of the arduino users would want to do this. Make permanent minimal installations of successful projects. Yet info such as a simple accurate schematic of the bare minimum for a stable working chip, without anything extra, has been near impossible to find.
54  Using Arduino / Project Guidance / Re: Help making bare minimum standalone arduino. on: February 18, 2011, 07:58:56 pm
Thanks for those diagrams of the voltage regulator.  I'm still getting 2 different stories about the capacitor sizes though, I had copied and pasted from the reference and it said a 10uf and 1uf, and "retrolefty" mentions a big and small cap, but "pluggy" said he read in the reference somewhere that its 2 10uf ones, I've also heard other sources seemingly using 2 identical ones.  Does it work both ways, or is one method better?

Also, voltage regulator aside, does the schematic I posted above look all correct and problem free?

As far as the issue "selby96" mentioned about programming it.  Well I plan to just program it with a duemilanove board, and then take it out and put it in its permanent spot in its own circuit.  The purpose of me making the minimum standalone is for permanent installation.  I do all the prototyping on the duemilanove board, but once a project is done and needs no more changes, I'd like to just pop the chip out, install it permanently to the project, and pop a fresh atmega328 with bootloader into the duemilanove and move to the next project.
55  Using Arduino / Project Guidance / Re: Help making bare minimum standalone arduino. on: February 18, 2011, 12:22:09 pm
Thanks for the help so far.  I've looked at those sources, and they still seem to be have more components than necessary for a bare minimum setup.  They did help though, I think i might have been able to figure it out, and I made a crude schematic. Does it all look correct and problem free?

http://img191.imageshack.us/i/arduinoschematic.jpg/

I've seen different places use either 20pf or 22pf capacitors on the crystal, does it make a difference?


Also as far as if a voltage regulator is desired, well I bought the 3 parts that were mentioned in the arduino reference
    * 7805 Voltage Regulator Jameco# 51263
    * 10μF Electrolytic Capacitor Jameco# 94220
    * 1μF Electrolytic Capacitor Jameco# 94160
However I have been unable to find a simple schematic for this part, trying to do a search results in multiple different schematics, all containing more than just those 3 parts (such as diodes, extra capacitors, etc).  Can anyone explain, or point me in the right direction how to make the voltage regulator with those 3 parts only?
56  Using Arduino / Project Guidance / Help making bare minimum standalone arduino. on: February 17, 2011, 05:41:23 pm
So a long time ago, I had stumbled upon instructions for making the absolute bare minimum arduino, using nothing more than the atmega chip (with your sketch pre-uploaded), a 16mhz crystal, 5v regulator, and a couple capacitors or resistors.  In fact, I remember you could even omit the crystal (suffering a slight loss in timing, but functional for most things where timing isn't super important), and I'm pretty sure you could even ditch the 5v regulator too, as long as you were powering it by batteries that were roughly 5 volts.  Making it little more than just the plain chip itself, and maybe a resistor or two.

However I've been searching all over the place, and can't find the details how to do this anymore.  Searching for standalone arduino, or bare minimum arduino gets hundereds of results, that are far from what I'd call bare minimum.  Can anyone point me in the right direction for some good instructions on how to use the absolute bare minimum with only the chip, crystal, and regulator w/ caps (and also without the crystal and regulator).

Also one other question, what is the safe range of voltage you can power arduino from without using a regulator?  Like is 6v from 4 aa batteries fine?  What about 4.8v from 4 rechargeable AA batteries?
57  Using Arduino / General Electronics / Re: Bizarre phenomenon happening! Trying to use camera flash w/ Optocouplers & SCR on: February 07, 2011, 08:57:02 pm
This is my code, I have a potentiometer to control the threshold, and I have a 2 way switch (which controls the switch case statement).  When I have the switch in one direction it lights an LED so I can test out the threshold and get things just right, when I'm satisfied with the threshold, I switch the switch the other way to activate the flash.

Code:
int threshold;
int current;
int setting;
int potpin = 0;
int flashpin = 13;
int mic = 5;
int switch1 = 3;
int testpin = 12;

void setup() {
  // put your setup code here, to run once:

}

void loop()
{
  threshold = analogRead(potpin);
  threshold = map(threshold, 0, 1023, 0, 2000);
  current = analogRead(mic);
  setting = digitalRead(switch1);
    switch (setting) {
    case LOW:
        threshold = analogRead(potpin);
        threshold = map(threshold, 0, 1023, 0, 2000);
        current = analogRead(mic);
        if (current > threshold) {digitalWrite(testpin, HIGH);
        delay(100);}
          else digitalWrite(testpin, LOW);
      break;
    case HIGH:
        threshold = analogRead(potpin);
        threshold = map(threshold, 0, 1023, 0, 2000);
        current = analogRead(mic);
        if (current > threshold) {digitalWrite(flashpin, HIGH);
        delay(100);
        digitalWrite(flashpin, LOW);}
         
      break;
   
  }


  }
58  Using Arduino / General Electronics / Re: Help choosing correct opto isolator. on: February 07, 2011, 06:47:43 pm
I looked up that TLP372 that was suggested, a tad pricey at around $10 shipped for a single one, but I'd consider it if it will solve all the issues I'm having, and work as a single component without needing any additional stuff.

I'd consider a mosfet too if it would work, although you said it could need additional current protection.  I've heard of using only SCR's too, but I also heard of someone frying their arduino pins with an scr, so I'm a little nervous.  Just trying to find the simplest solution, hoping for a single optocoupler that works without any extra parts (or don't they exist)?

My current buggy setup is using a cny17 opto isolator, and a MAC97A8 600V SCR, but I've just been having all sorts of trouble with it (I have another thread on here trying to figure it out, but still haven't), so hoping to get rid of all that junk and use a single optoisolator, if that's possible.
59  Using Arduino / General Electronics / Re: Bizarre phenomenon happening! Trying to use camera flash w/ Optocouplers & SCR on: February 07, 2011, 06:41:36 pm
Does anyone know what is most likely causing such a large delay as described above?
60  Using Arduino / General Electronics / Help choosing correct opto isolator. on: February 07, 2011, 04:01:46 am
I'm relatively new to electronics, and although I can hook stuff up well if I know the right components, learning to choose the correct ones for myself by trying to search through the thousands out there, reading datasheets, etc has been a massive challenge.

I'm trying to find out if there is a single opto isolator that can be triggered by the arduino, but able to pass 200-400volts on its output, and operate extremely fast (like a fraction of a millisecond or less).  The purpose is for triggering a old vivitar 283 camera flash, and triggering it instantly within less than a millisecond, for high speed photography.  When I measured the flash it was only putting out about 120-150 volts, but I always hear 400v as a common number when talking about similar flashes, so potentially passing 150 volts could be fine, but might be good to go with 400v for a good safety margin.

Right now I've got a goofy setup with an underrated optocoupler, linked to spare batteries to trigger an scr, etc.  I'm having many issues with it (right now an issue of having a very considerable delay).  I'm hoping to simplify this and just use a single optocoupler, but the problem is I've spent hours upon hours reading through all sorts of different datasheets, most of which I barely understand, and can hardly tell if any are even close to what I need. 

Can anyone help suggest one that has an input current low enough for arduino, and output current high enough for the flash, the speed to operate as fast as possible (less than a millisecond), and hopefully not too hard to find or expensive?  Thanks.
Pages: 1 2 3 [4] 5 6 7