Show Posts
|
|
Pages: 1 ... 5 6 [7] 8 9 ... 11
|
|
91
|
Using Arduino / Project Guidance / Re: newbie: use digital i/o pin as input for this situation?
|
on: April 16, 2012, 03:02:47 pm
|
|
Just like when doing the button tutorial. The digitalwrite accounts for current by turning on a 20k resistor built into the arduino to limit the incoming current while reading the button press, though in your case its the LED that its reading a signal from, but its kinda the same principle. Make sure the LED is running on 5V though.
Actually looking now, the digital read tutorial doesn't do a digitalwrite, it uses an external 10K resistor. Thatd work too though requires you to have another part in your system.
Note crosscheck this with someone else before going and trying it. I'm still a scrub with electronics.
|
|
|
|
|
92
|
Using Arduino / Displays / Re: DB0-DB3 to ground
|
on: April 09, 2012, 12:06:04 pm
|
Did you also hear the sound of "USB device unplugged" on your computer when you stick the screwdrive at the 5V and gnd? Like James said, it's intentionally destroying your investment. I had short circuited a few things in the past and they all ended up in the dumpster.
No infact it doesnt, In operation I'm nowhere near a computer since this is built into somethign for airsoft. and btw the screen works fine now. But the screwdriver in question, Before everyone jumps to "your a dumbass" conclusions. From 1 face of the blade to the other is over 900 ohms. Its got this blueish coating on it, that according to my grandfather (used to run a TV/Radio shop back in the 50s and 60s) was put onto it for working with electronics and trying to maintain safety of not damaging things via short circuit in case you were working, you moved your hand wrong and touched 2 pins or something. But the thing still has makes good contact so in cases when you need to jump from 1 spot to another to see if something will get continuity it'll still make the jump. Actually its fairly nifty of a concept. So in cases where I want to test a switch without having to grab an actual switch and a resistor, I can just use the driver to make the continuity and it also has the resistance built into it to protect from high current. Also it makes a great demo potentiometer because from the tip of the driver up to where it goes into the handle it gets ~ 20k ohms. Yeha ill probably still break the screen or something in the future, but itll probably be more of a physical, got shot by airsoft BBs at closerange and the glass broke, failure and not an electronic. Which also leads to, its not that big of a deal if the thing breaks electronically because odds are im gonna break the thing physically first. But w/e, thing works now, havent managed to get interference on the thing since tying the 4 pins I asked about to ground. So I'm jsut gonna do that in the future. And yeah sorry for necroposting, havent been on in a couple weeks cause of schoolwork.
|
|
|
|
|
93
|
Using Arduino / Project Guidance / Re: Serial communication stops after long periods.
|
on: April 09, 2012, 11:39:25 am
|
oook... I was testing serial communication with the simple code from zoomkat, and I found what was causing this: the refrigerator... that's right, the refrigerator...
This might seem like a bad joke, but I replicated this 4 times today and I didn't believe it either. Every single time the refrigerator turns off, the serial connection just breaks.
The only connections is that the computer and the refrigerator is plugged in the same wall socket. Being an old fridge, I'm guessing an electric impulse is sent through the wall socket, through the power supply, and somehow messes up the USB port.
Still looks like a driver problem to me. The driver does not behave correctly when it gets interference through the USB cable.
Any other ideas? Any way to fix this? This shouldn't be happening obviously, since all other things plugged in the USB ports and all of the computer components work perfectly.
Actually it might completly be the fridge. I recall a couple months ago a person was having some trouble with a machine that would monitor the temperature of some beer storage I think, and then use that to control when to turn on the refridgeration. But it kept breaking down because they eventually found out the fridge was causing the problem. Try connecting the fridge into a socket a little farther away and running it. Honestly thats what the other guy ended up doing to fix it. I'll find that forum a little later and link it to you if you don't believe me.
|
|
|
|
|
94
|
General Category / General Discussion / Re: Long term reliability
|
on: April 09, 2012, 10:57:37 am
|
If you are having problems with rough environments, maybe you should just try and "pot the whole board"( minus the connectors you will use)... paint it with epoxy resin. That should seal it and still allow for heat transfer, if that is any kind of issue.
Actually on the note of this, I've done this twice so far, and as long as I make sure that there is a little piece of aluminum stuck to the voltage regulator and a couple other things (probably doesn't help them) with some heat sync compound stuff. And the piece of aluminum comes up out of the resin, the thing becomes nearly un-damageable. ( I heatsync the the VR even though I probably don't need to cause the airsoft batteries I run can be up to over 9V so it can heat up a bit) I've been using this method on all the arduino stuff I make for airsoft because radioshack project boxes are broken through by the airsoft BBs all the time. I potted up one of my arduinos a bit inside of the project box, the thing can take shots from a real BB gun, and I haven't damaged it in any falls or tossing it in my car either. With regards to overall longevity. Well I've got an arduino uno thats about a year or so old, thats been assaulted by about 500 different sketches (it was my tutorial unit) and different pin usages. Definitely drawn too much current from several pins on several occasions. Thing still works fine. And its been built into a temperature sensing jig and running constantly for the last 3 months with the exception of shutting it off to put a new SD card in and reset the timer. Theres another one in use on a machine by a friend of mine thats been in constant operation since 2009 with the exception of power outages and its still fine.
|
|
|
|
|
95
|
Using Arduino / Project Guidance / Re: Analog current draw
|
on: April 09, 2012, 09:30:27 am
|
|
Umm im pretty sure putting the half an amp into the analog pin is probably what killed it. In the future for testing pins, try going from 5v to 1 leg of a pot, middle leg to the analog, and last leg to ground. It should make a voltage divider that will let you show the full range, 0-1023 of the analog pin when you turn the pot, and it won't kill the pin, (might damage it if you put the pot @ 0 and have the full current going into the pin though, should probably put identical resistors in series with the gnd and 5v legs. I use ruggeduino now because i know how often i break stuff)
|
|
|
|
|
96
|
Using Arduino / Programming Questions / Re: Declaring Variables
|
on: March 28, 2012, 11:02:53 am
|
|
alright thanks, was driving me up a wall looking at the program, theres index running around in 6 separate loops. I realize every time its used to move through the positions in different arrays, but damn, somethign else for naming would be helpful.
Ok then, marking solved.
|
|
|
|
|
97
|
Using Arduino / Programming Questions / Declaring Variables *solved*
|
on: March 28, 2012, 10:52:43 am
|
Umm hey,s o I was wondering. I've been doing some arduino stuff for a couple months now, and a friend of mine linked me a program of his that kinda made me wonder a bit when I was trying to read it. So up in the beginning of the program, he declares a variable Int Index = 0; Now with what I thoughts, that means its a global variable now that can be used in any segment of code (setup, loop, loops within the loop) and all. and that works for me. But now here's where it gets odd to me. Later on he starts a while loop designed to take your key-presses on a keypad, put them into an array, convert that array into a string, and then set that string as a filename to go to an SD card. Fine, program works. But at teh beginning of the loop we see again. Int Index; Shouldn't that cause a compiling error since hes declaring the same variable twice, once in a global scope and once within the scope of this while loop? PS sample of that segment of code here // before setup where I assumed global variables were created, the other 2 variables are used within a timing section of the program hes making.
long hrD = 0; // Variable used for storing hours when being input from keypad char hrD1[3]; // Used to convert keypresses into a number for arduino to use int index = 0; // Used to shift through arrays
// within setup, right after starting an LCD screen
int index; b = 0; c;
while(b == 0){ c = 0; index = 0; key = keypad.getKey(); //get key reading if (key == '*' ){//if * move to input filename, else skip it adn move on to next lcd.clear(); lcd.setCursor(0, 0); lcd.print("Ent date: mmddyy"); lcd.setCursor(0, 1); lcd.print("* to cont"); while(c == 0){ key = keypad.getKey(); if(key == '*'){ lcd.clear(); lcd.setCursor(0,0); lcd.print("file name:"); while(index != 6) { key = keypad.getKey(); if(key != NO_KEY) { name[index] = key; lcd.setCursor(index, 1); lcd.print(name[index]); index++; } } delay(500); lcd.setCursor(0, 0); lcd.print("correct? *=Y,#=N"); index1 = 0; while(index1 != 1){ key = keypad.getKey(); if(key == '*') { index1 = 1; c = 1; b = 1; delay(500); } else if(key == '#'){ index1 = 1; c = 1; b = 0; lcd.clear(); lcd.setCursor(0, 0); lcd.print("Enter File Name"); lcd.setCursor(0,1); lcd.print("* cont, # skip"); delay(500); } } } } } else if(key == '#'){ lcd.clear(); lcd.setCursor(0, 0); lcd.print("file name dflt"); lcd.setCursor(0, 1); lcd.print(name); b = 1;
Sorry if this seems mad newbie of a problem. It doesn't seem to cause any problems with the program (also theres a global B and C running around and then another one in this filename loop and another in another loop as well). Its was just driving me a little crazy when reading it and trying to follow what different vars were doing.
|
|
|
|
|
98
|
Using Arduino / Project Guidance / Re: Best way to detect skee-ball hole
|
on: March 23, 2012, 09:15:47 am
|
What if a Grasshopper Drops in! or some kind of other element in the external environment, bingo ball is in! , i will suggest double checking the result, Im thinking how it may happen.
... well I hope there arent too many insects in your arcade or no kids will come to play. Double checkign wouldnt be too hard, just have 1 beam straight on acrossed the score hole and another offset so that it takes teh large ball going through and setting off both to cause it to score. I doubt a grasshopper is big enough to cross both streams, maybe a moth or butterfly could, but I doubt theres too many of those in the building. If someone gets a free score, well aren't they lucky.
|
|
|
|
|
99
|
Using Arduino / Project Guidance / Re: Best way to detect skee-ball hole
|
on: March 22, 2012, 07:03:33 pm
|
|
Well actually thats probably a good point, whereas you could mount the IR gear at the base of the hole, after the ball has hit off the walls, so they'll be pretty safe there. But the flex sensor 1 might not get enough of a signal out of some shots because they land better in the hole. And 2 the flex sensor is basically getting beat every time a person shoots, so yeah flex sensors probably wouldnt be too good in the long run.
|
|
|
|
|
101
|
Using Arduino / Project Guidance / Re: Best way to detect skee-ball hole
|
on: March 22, 2012, 06:16:37 pm
|
|
the thing I've been considering to add to an airsoft gun of mine, is an IR led and an IR receiver facing eachother on either sides of the barrel, so taht when a BB is fired, itll break the beam between the emitter and receiver for a pulse, and that's how its gonna count. I guess you could try something like that.
|
|
|
|
|
102
|
Using Arduino / Displays / DB0-DB3 to ground
|
on: March 22, 2012, 03:40:02 pm
|
|
Hey so just a general question. i've got an LCD screen thats been in close proximity to poorly shielded motors on airsoft guns and lots of static. I have it setup so it uses the 6 pin setup (DB4-7 RS and E). Now some guides tell me I should leave the DB0-3 alone, and others tell me I should connect them to gnd to try and help get rid of the screen messing up.
Well, would it be helpful, I've only had the thing mess up on me (start throwing gibberish characters) like 2 times, and i just pull a screwdriver across the gnd and 5v for it and reset the thing. Though doing that, ill probably break it or the arduino it runs off of soon. So would going gnd do anything good, or is there anything else that could be done to help keep it from messing up?
|
|
|
|
|
103
|
Using Arduino / Project Guidance / Re: Industrial use
|
on: March 16, 2012, 06:29:46 pm
|
|
Haha, arduino in industrial use. Actually its really amazing when I look aroudn when visiting companies now. here adn there you can find the 1 guy who works for most companies that builds little rigs for them that run off of arduino to do simple automated tasks. When I first got into this I thought that they'd just be a little "hee hee, hobby fun" rig when my boss set me up with one. But now, I can see where they could be used EVERYWHERE.
And like kduin says, the ATmega line is ridiculously popular. Though PICAXE I've found quite a few more times since starting. When taking apart electronics, I've got a good stack of boards that I've been stealing components off of out of random things with atmega chips on them. I really should learn to burn a bootloader to them. Itd probably save me a bit of money on later projects that I don't want to use a full arduino in.
|
|
|
|
|
104
|
Using Arduino / Project Guidance / Re: Easy and Cheap USB Methods?
|
on: March 15, 2012, 03:23:04 pm
|
|
Sorry I can't really help you with your current problem. But hey if your planning on trying to sell those, can i sign up to buy one once u got em working. I tkae it if one was properly setup, while recording a viedo (livestream) of playing a game, I could perhaps use this module to adjust volumes of the game, music I'm playing from Itunes, and friends voices from teamspeak without having to alttab over and do it from the volume mixer (that way it doesnt mess with the recording, but I can mute my friends if their being morons and screaming into their mics to make my video weird). That is a pretty awesome thing to add to a comp. I hope you'll release the code in a manner that I could tell it which programs to link to at a give time.
As far as trying to solve your cost problem. You could try doing a minimalist arduino breadboard setup with a mega chip. Though handproducing several of them and putting them together with all your stuff for the USB would be time consuming and might not even save you that much money. Only other way I can think of would be see if you can build it out of an arduino micro cause they're a little cheaper. But then you'd probably lose the savings in building in the USB chip and a cable.
Really though itd probably be simple enough to use a straight up arduino, I'm assuming for your demo of the sketch your just having the arduino serialmonitorly send the pot values to the program on the computer to manipulate. Using the cheapest full arduino you can get would probably be best cause its already got your USB stuff for you. And then, have a little thing saying that infact their thing is run off of this nifty microcontroller that most anyone who feels like making a little electronics project can use, and have a link back to the arduino forums/getting started in the documentation with your thing your gonna sell. Then there'll probably be more people showing up in the forums if you end up selling a few. And then, if you sell a handful, see if a company will take on producing them for you more cheaply, and make a few bucks selling them.
One thing I say though, use all the analog ports you can for this project, that way you can have more control over the computer without having to leave a program or something.
|
|
|
|
|
105
|
Using Arduino / Project Guidance / Re: Ammo Counter for airsoft
|
on: March 15, 2012, 12:45:48 pm
|
Lots of cool ideas! I have been working extensively on a project to use with airsoft over the last couple of months. I'll share details as I get closer to done. sweet dealWith the 4D Display systems, they have what they call a Graphics controller on board. It appears to be basically a micro controller of some sort and it handles the program similar to the Arduino. You can use the same display in two different ways depending on the firmware that you install. Either serially or stand alone. In serial mode (what they call SGC mode), all of the work is handled by the Arduino and you simply send it commands to tell it what to do. In stand alone (what they call GFX mode) you do have to use their IDE to write the program which is sent to the display's onboard controller. The SD card is used exclusively for data storage like images, music or data. They have their own software which will setup the SD card for you so it is fairly intuitive. They can play video at about 12-15 Frames per second. good to know. I think,though, before upping the screen size and capability I'm gonna try for getting the wireless between the gun and the arduino working. Since they dont have any of those screens in stock, and though xbee modules can be kinda big, shouldnt be too much trouble to work one into some part of the gun without getting in the way (I figure I'll get and arduino FIO to be the onboard gun controller for my first prototype of wireless)The 4D IDE is also C based and while different is not too hard to learn. I have two of their displays the 1.4 and 2.4 w/touch and love them but for any kind of volume production they are a bit expensive. I am probably going to be buying a 4.3 w/capacitve touch ($250) soon for use on another part of the project I am working on. For the wireless options, for your guns to the display, bluetooth would work but you would have to go with a different option to talk to teamates as you've already noted. So instead of using two different components, stick with one for both. One of the challenges of the Xbees is their size. They are extremely user friendly but they are also huge. I recently came across Anaren's Air modules which utilize the Texas Instruments CC1101 chip and these things are TINY!. 12mm x 6mm. But they are surface mount so a little more work to use them. They can also be had for $12.50 as compared to an XBee at $23. The CC1101 operates in the 433,868,or 915 MHZ band instead of 2.4GHZ. I chose 915 because it is less crowded and has less chance of interference. They might be a little more challenging to setup but they are not too intimidating plus I think they are smarter than the Xbee and once setup they are easier to use since they handle preamble, packetization and checksum for you unlike the Xbee where it has to be done by the Arduino to a large degree if you want to send data in a point to multipoint setup. interesting, that is in fact pretty small. I wonder about their range though, I know some of the Xbee stuff (for between players) can get up to 1-2miles with clear LOS (So maybe a quarter of a mile or so in the woods). These smaller ones are pretty nifty though, 3.6v max though. So fir the data IO on it would that mean I need to cut the power coming from the arduino pin a bit so as to not damage it?For GPS, talk about expensive. I have struggled with this in the past because it has so many cool options. Especially when tied to an iPhone or iPad since they have a built in MAPKit in their IDE. I bought a Mac Mini just so I could write programs for the iPhone. The cheapest GPS module I have been able to locate was through Mouser and I keep thinking that it is a fluke and eventually the price is going to jump. In fact it has gone up $6.00 since the last time I looked about 2 months ago http://www.mouser.com/ProductDetail/Fastrax/UP501/?qs=sGAEpiMZZMv%2fbGM7XKYHK5cWKPdkcWhM but this same module on Sparkfun goes for $49.95. yeah I'm gonna write GPS off as a project for later this summer, after i have guns talking and peoples gear talking spreading gun info. From there it shouldnt be too hard to get the units to communicate GPS info since the network will already be in place.I think where you are going with all of this is awesome and there is no better way to learn all the ins and outs of programming than having an ambitious project to work on that will challenge you to learn more and more as it grows. And yeah, if your not being ambitions then whats the point. Theres no fun in it if you aren't trying to do something that they haven't done before (though the military probably has something like this already in place to share GPS data, but well, who doesn't want their airsoft team to have paramilitary tech.Actually that kinda leads me to a side project that kinda might support this. So say I get a bunch of this stuff working. Then here we are playing a match spread otu over a large area. An area we know is too big for the wifi gear we all have with us to transmit. Now I know that there are wifi bridges you can get for houses and office buildings. Plug them into a wall outlet, and they act as a repeter for teh wifi so you can use it from farther away. I wonder what it would take to build a repeter like that. Just a little box that you could carry (all its got in it is a controller and a wifi module, and maybe a GPS to help you find it later after the game is over). And by take to build it, what kind of stuff would need to be coded. just have it take in signals and put them immediately back out? edit. Goes and reads a bit about it. Wow it practically is that simple to make a repeater. Perhaps add in some micro SD to it then and log players positions and other info just so you can go over what happened during the game later on.
|
|
|
|
|