Loading...
  Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 27
331  Using Arduino / Project Guidance / Re: Creating a spark? on: December 02, 2011, 09:44:04 am
Scrutiny? I don't know how it is where you live, but around here we can still touch off up to 40lbs of black powder for "recreational use" (but fireworks are illegal here...). No permits needed as long as you don't use it to blow something up that could pose an environmental hazard.

You could use a model rocket igniter:
http://www.amazon.com/Estes-2301-Rocket-Igniters/dp/B000TF4DUO/ref=sr_1_1?ie=UTF8&qid=1322836701&sr=8-1

Or buy a small spool of nichrome wire (would be cheaper than steel wool)

Or use a commercial igniter. Pyrosure makes a fireworks igniter that complies with Canadian law: http://www.pyrosure.com/igniters.html . I have used them, they work quite well.


I just used a simple 2n2222 transistor and 2A mechanical relay to trigger the nichrome wire and Pyrosure igniters.
332  Using Arduino / General Electronics / Re: Unreliable Keypad input on: December 02, 2011, 09:26:15 am
I think its a quality control issue. I used to use these in little electronic props that I make for people. I have purchased around 5 of these since August, and every one had this problem. Since I have used these keypads in around 20 different props with no problems prior to this (and I have made no hardware or software changes since then), I assume it is an issue with the keypads themselves.
333  Using Arduino / Sensors / Vacuum sensor, and maybe a valve on: November 10, 2011, 04:28:46 pm
I am thinking about adding a vacuum sensor to the 4wd differential locking system on my truck, for troubleshooting purposes. Right now the system works by a mechanical switch in the transmission, that allows vacuum from the engine to pull back an actuator when the shift lever is in 4wd-LO. I would like to put this sensor: http://search.digikey.com/us/en/products/MPXV6115VC6U/MPXV6115VC6U-ND/951851 just before the actuator, so I can tell when the actuator is getting vacuum. The idea is that the Arduino would read this sensor (and a second sensor that checks for actuator movement), and light up an LED or something to show that the system is working. Looking at the datasheet, I can just use the analog pins on the Arduino to read the 0v - 4.6v provided by the sensor, correct?


Also, it would be nice if I could cut the mechanical switch from the transmission out of the picture, and use some sort of electric valve instead (there are many cases in which it is useful to be in a low gear without sacrificing turning ability). Anyone know of a good source for cheap electric valves that will work with a vacuum system?
334  Using Arduino / General Electronics / Re: Transistor not switching off on: November 01, 2011, 06:46:50 pm
You used to get this problem with germanium transistors not silicon. I suspect that something is not what you think it is. Like the ground not being connected or the pin on the arduino not being defined as an output in the sketch.

I found a different relay and it seems to be working now. Could that relay just have been too large for a 2n2222? (The diagram mentions using a TIP102 for "large" relays) The coil resistance is 270 Ohms and the coil voltage is rated for 12v, although I am powering it with 10v.

I did check the code and the ground, both were fine (forgetting to set the pin as output already bit me once, heh.).
335  Using Arduino / General Electronics / Transistor not switching off on: November 01, 2011, 04:30:57 pm
I have a transistor connected to my Arduino so that I can switch a relay on and off. I followed the diagram here: http://www.arduino.cc/playground/uploads/Main/relays.pdf

The transistor is an NPN type NTE123AP, (2n2222 equivalent), the relay is a R22-5d16-12 (12v coil), and I am using a 1k ohm resistor between the transistor base and the Arduino. When the arduino pin is active, the relay switches on, but when the pin switches back off (~0v on the arduino pin) the relay does not switch off. I poked around with my multimeter and found that the side of the current limiting resistor closest to the arduino is reading ~0v, while the other side (connected to the base of the transistor) is reading 0.73v. If I short that to ground, the voltage goes to ~0v and the relay will then switch off. Do I need some kind of pull down resistor in the circuit somewhere? I have used this exact same design before, with the same code, the same parts, and no problems. I have purchased a new transistor, and I still have the same problem.
336  Using Arduino / Project Guidance / Re: 3x4 matrix keypad repeat button presses on: September 05, 2011, 09:05:00 pm
Yes, I used the example code from the library. Created a do loop that keeps looping until a key is pressed. I just noticed something odd though. I have tried 3 separate matrix keypads from Sparkfun, all of them have this problem. I just went out and bought a Valleman 4x4 matrix keypad from a local store, and it doesn't have this problem. So maybe its not my code? I'd like to be able to use the sparkfun keypads because they are cheaper, and I don't need the 4th column.

Heres a better description of what is happening. If I type in a series of digits, like "8507840", the arduino will read something like "885078440". The digits that are doubled are not always the same. I'm going to upload just the example code to it and see if I still get the error.

EDIT: Just tried the code from the library here: http://arduino.cc/playground/Code/Keypad?action=sourceblock&num=1 Had the same issue.
337  Using Arduino / Project Guidance / 3x4 matrix keypad repeat button presses on: September 04, 2011, 10:55:56 pm
Hello, I have 3x4 matrix keypad (the 12 button one from Sparkfun) hooked up to an arduino Duemilanove with the matrix keypad library. I am getting repeat button presses at seemingly random intervals and I cannot figure out why. It does not appear to be caused by the way the button is pressed. I tried holding a button down for a long period of time, pressing quickly, slowly, and releasing half-way and pushing down again. None of those produced the problem consistently, so I assume it has to be an error in my code somewhere.

The code is too long to post here, so I uploaded it to pastebin:
http://pastebin.com/84nbkGWj
(It is for a Airsoft/Paintball bomb prop like the one in the Counter-Strike videogame)


When a key is pressed, the loop runs correctly, verifies that the key pressed matches the stored code, and then it loops through again without waiting for a new key press for some reason. I thought it might be junk data stored in memory, so I changed the "char key;" line from the example to char "key = '\0';", and I still have the same problem.

Thanks in advance for the potential help, sorry my code is so ugly.

338  Using Arduino / Project Guidance / Re: Measuring snow depth with ultrasonic device? on: August 10, 2011, 01:49:47 pm
How about using a simple stick, with optical sensors (or, since rise/fall time doesn't matter, a bunch of cheap LEDs) mounted in 1 inch intervals? 5 Sensors in the dark = 5 inches of snow. I used a similar setup to let me know when our sump-pump tanks were getting ready to overflow (in the event of a power outage during a rain storm, or a failed pump).
339  Using Arduino / Project Guidance / Re: Airsoft Ammo Counter? on: August 10, 2011, 01:38:43 pm
I will most likely be using a PEQ box or bag for the arduino. There is a mod for the XCR that allows me to remove the fake gas tube that is just above the gas blowback to provide me with lots of room to stuff in there as well. I'm not so concerned about the muzzle velocity, I'd probably be more concerned with the Rounds Per Second, at stock with a 7.4 Lipo can give about 15 rps, with a 11.1 Lipo in excess of 22 rps... Is this sensor capable of measuring the rate of fire at these levels?

I'd like to put the sensor by the magazine feed, however, I am worried that if I drill a hole through this feed, it may affect the feeding/suction mechanism.

I am from Winnipeg.

This is the datasheet for the Photo Interrupter: http://garden.seeedstudio.com/index.php?title=Photo_interrupter_(OS25B10)



You wont have to worry about any suction in the hop-up unit, the nozzle seals off that section when a round is "chambered". You may run into feeding issues though. Just try to make the holes as smooth as possible. You could add a piece of clear acrylic on the inside to guide the BB if you have to. As long as there is nothing for the bb to catch on, the spring inside the mag should have enough force to push the bb through.
340  Using Arduino / Project Guidance / Re: Airsoft Ammo Counter? on: August 09, 2011, 10:49:53 pm
First, have you decided where you are going to mount the sensors?

If you put the sensor on the hop-up unit, you will have to run wires from it to the arduino, which could be placed in a battery bag, PEQ box, or somewhere else.

If you put the sensor and the arduino inside a suppressor, you wont have to worry about wiring, but you will have to make sure your sensor is fast enough to pick up on 10 - 30 rounds per second traveling at 300 - 450feet per second (91.44 - 137.16m/s) and you will need a smaller arduino.


I have never had an XCR in my hands, so I can't give specifics on wire routing. I assume the battery is stored in the empty space within the heat shield? Or do you use the PEQ box that comes with it?
341  Using Arduino / Project Guidance / Re: Airsoft Ammo Counter? on: August 08, 2011, 11:53:56 pm
Thanks guys! I will give it a skim through. How would you guys do the wiring from the suppressor for the photosensor? Or is there like wireless way of communicating back?

You could make your own arduino on a breadboard, or get one of the smaller ones, and hide the whole thing inside a supressor (they are all hollow, are required by law), or you could run some thin wires between the inner and outer barrel. For a typical M4/M16 clone with collapsible stock, you can hide a Duemilanove inside a PEQ box mounted on rails, inside a battery bag, or inside a mag pouch.

What type of gun are you putting this on? Madbull makes a hop-up for M4/M16 clones that has a window on the side for mounting LEDs to charge "tracer" bbs, you could use that instead of trying to drill into a hop-up yourself.
http://www.airsoftpost.com/product_info.php?products_id=32281

You can probably find it cheaper somewhere other than Evike.
342  Using Arduino / Project Guidance / Re: Airsoft Ammo Counter? on: August 07, 2011, 11:43:50 pm
For detecting a mag release, a lot of mosfet systems use a simple pushbutton glued to the part of the mechbox that is visible from the magwell(For the non-airsofters here: Airsoft MOSFETs are not just mosfets, they are simple computer systems that allow for fine-tuning of the airsoft gun's firing system, early designs used a mosfet to separate the trigger circuit from the high amperage motor circuit, since the mechanical triggers were slow, high-resistance, and had a tendency to burn out. Newer designs are a lot more complex.).

The easiest way to put a sensor on a gun would be to hide it inside a large flashhider or supressor. There isn't a lot of room inside the hop-up or the mechbox, and you dont want to be drilling into the barrel.
343  Using Arduino / Project Guidance / Re: Strange reading with QRD1114 optical detector on: July 02, 2011, 11:12:21 am
At the upper end of your speed range, in the time it takes to do one analogue reading, your BB will have travelled three times its diameter.
Maybe time for a rethink on your sensors, and how you read them?

Probably. Any suggestions to point me in the right direction?
344  Using Arduino / Project Guidance / Re: Strange reading with QRD1114 optical detector on: July 02, 2011, 10:53:46 am
Doing analogue readings on sensors trying to detect small fast-moving objects doesn't seem to me to quite add up.
What sort of speeds are you expecting to measure, and how big are the objects (4.5mm?)?

The speeds will generally be between 100 feet per second and 600 feet per second. The BBs are 6mm.
345  Using Arduino / Project Guidance / Strange reading with QRD1114 optical detector on: July 02, 2011, 02:01:09 am
I am trying to make an airsoft chronograph (a device that calculates the velocity of a projectile by measuring the time it takes for the projectile to trip two separate sensors that are a known distance apart) using two QRD1114 optical detectors that I acquired from Sparkfun. I hooked them up by following the instructions here: http://bildr.org/2011/03/various-proximity-sensors-arduino/ . They worked fine when I tested them on a breadboard, the analog value was around 50 with my finger touching the sensor and around 850 with nothing in front of it. I placed the two sensors in a 1/2" diameter piece of PVC pipe so that when a BB travels through the piece of PVC pipe it will travel in front of one sensor and then the other (with 4" between them).

The sensors were not behaving like I expected once I put them inside the pvc pipe. Inside the pipe, the analog values were reading roughly 350 on one sensor and 250 on the other with nothing in front of them. So I assume a base line of 240 and 340, with any value below those being shown as "tripped". When I test it by sticking a pencil in front of the sensors, the value with the pencil touching the sensor was 50, and with the pencil touching the opposite wall of the pipe from the sensor, the value was reading 500.
A value of 500 should mean that the object in front of the sensor is at a distance greater than the diameter of the pipe. What would cause this? Will this type of sensor not work with a curved surface?

I am thinking that I may get better results if I get a separate IR transmitter and receiver, so that I can put one on each side of the pipe to create a "beam". If this would be better, any recommendations for the IR transmitter and receiver I should use?

Thanks
Pages: 1 ... 21 22 [23] 24 25 ... 27