Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: problem with range of voltage output from TRIAC/optoisolator dimmer on: February 18, 2014, 08:43:53 am
Hi, I don't think you are detecting both zero crossing points in the full cycle. To detect both you will have to feed the input of the H11A1 AC via a full wave rectifier, so both positive and negative cycles conduct through it.

I haven't had a good look at your sketch yet, but don't forget you only effect the trigger point of half the cycle, then it repeats.

Tom.... smiley

If that turns out to be the problem (I'm not very good with the code, someone else will have to verify) you can just switch out the H11A1 for an H11AA1  http://www.vishay.com/docs/83608/h11aa1.pdf

Just make sure you double check all the maximum ratings and make sure you're not going to fry anything!

There's a good tutorial on the arduino site that I've used and worked out great here.  It has some good info if you're not too familiar with the electronics.  It's essentially the same set up that you're using, except with 0 crossing detection on both halves of the AC wave.

http://playground.arduino.cc/Main/ACPhaseControl

Hope this help!

Josh

2  Using Arduino / Project Guidance / Re: precision scale for checking liquid amount from a peristaltic pump on: February 14, 2014, 04:44:38 pm
A bucket would be one way to go, but would not be as elegant as a scale. I am building this for a lab, so I would like to automate  the calibrations as much as possible.

On the contrary, if you are measuring fluid, a "bucket" - or more correctly, a measuring cylinder with a level sensor - would enable the process to be completely automated.


Using a balance for accurate measurements of weight is usually a better option for small volumes and high accuracy.  In most lab settings its much easier to use a balance to measure a weight and calculate the total volume using the known density of the liquid.  Plus every lab has a balance already, and anything fairly recent is likely to have serial output already to go. 

Just keep in mind that your weight (or volume) measurements could vary quite a lot if you have a very inhomogeneous sample like the one you're describing.  Any large chunks could create deviations from average pump performance, so just make sure your calibration time is long enough to average these out.  Better yet, homogenize your sample some how (blender, shaking, stirring) to remove any of these problems. 
3  Using Arduino / Project Guidance / Re: arduino codes to measure speed of a falling simulated raindrop on: February 13, 2013, 07:54:14 am
I was reading a post yesterday I think in which someone was trying to do the same thing (or maybe it was you somewhere else)? 

They were having issues just as PeterH said, being unable to interrupt the beam with a water drop.


Once you get that figured out, I made a post here yesterday answering someones question about Ir receivers.

http://arduino.cc/forum/index.php/topic,148554.0.html

Basically, you feed the Vs pin on your detector with your voltage supply (5V from arduino), ground the ground pin, and then read the third pin with a digitalRead in your arduino sketch using any of the digital pins on the board.  Looking at your data sheet, it looks like the OUT pin should read high when no modulated IR light is detected, and low when it is (the transistor should be getting a current from the detector).

If you read my other post, make sure to take not that the leads on the detector he used are in a different order than yours.  (though I doubt you can harm the detector by hooking it up backwards.... but I would avoid it since I may be wrong)
4  Using Arduino / General Electronics / Re: Really need help with what is probably very simple IR emitter/receiver question on: February 12, 2013, 04:31:51 pm
Did you fry the sensor or the LED because you didn't use a resistor with it?

Are you using an arduino for the 5V supply?  If not, what is the voltage?
5  Using Arduino / General Electronics / Re: Really need help with what is probably very simple IR emitter/receiver question on: February 12, 2013, 03:13:36 pm
Hi Prism,

Looking at the data sheet you provided, and specifically the schematic on the first page, it seems that this works as follows... (someone correct me if I'm way off)

Pin 3 goes to Vcc (your power supply, probably 5V from an arduino, check the data sheet to see what the actual specifications are)

Pin 5 goes to your ground

And pin 4 is used as your signal pin.  When the beam is transmitting uninterupted, a current is applied to the transistor pictured in the citcuit which connects Vcc and Pin 4 to ground, so it should read 0V.  When the beam is interupted by an object, the current stops flowing to the transistor, and pin 4 is connected to Vcc with no connection to ground, and it should read high.


TL:DR -- pin 4 is what you read off to see if your beam is interupted.  If it's interupted, it should be high, if its unobstructed, it should read low (or it may be the other way around, admitedly, I don't know what some of that circuitry does).



To test that your detector is actually reading... hook everything up to pins 1, 2 (don't forget a resistor on the LED if you need one, check the data sheet), 3, and 5, and then read the voltage off pin 4 as you interupt the beam,

Let me know if that helps
6  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 09, 2013, 09:33:28 am
Often times I find people on this site while commenting with the best intentions lose track of the target audience.  How small are the motors you're using?  If they draw less than 50 mA you can drive it directly from the arduino board with no added circuitry.  Otherwise, you can use a battery pack (2 AAAs as you mentioned) to drive the motor and a single transistor ( just about any will do, just make sure it can handle the voltages and currents you will need for the dc motor.  If it was there idea, it's a great place to start and it will work very well.  As people mentioned, the motor will spin slower as the batteries are drained, but that's part of the fun. 

Transistors are very easy to explain to even a 5th grader, you simply use the small current from the arduino to turn a switch on and off that allows the motor to run (might not quite be true, but that's the basic idea).  For your own information, just google something like "how do I use a transistor" and look for a tutorial so you can learn about appropriate resistors and voltages.



And I just had A brilliant idea.  You can add a small potentiometer to the circuit after the transistor.  If you start it out with a moderate resistance, the students can use it to change the speed of the motor to fine tune their distance regardless of battery power (up to some limit obviously).  This also prevents you from having to reprogram the arduino every time you want to change the distance.

Good luck with the project, stop back and let us know how it all turns out!
7  Using Arduino / Project Guidance / Re: Need Guidance for finding exact dist b/w 2 objects under 1 meter range on: January 29, 2013, 11:55:54 am
I like the idea of using a light sensor if you'll always be in Line of Sight.  What I would think is an LED positioned on object 1, and a sensor a fixed (known) distance from the LED.  If object 1 were a circle of radius 10cm for example, put the LED at the center, and a detector at the edge of the object.  You can use the value read at a fixed distance to calculate the total light output from the LED and then using the value measured with a detector on object 2, you could work out the distance.

The detector on object 1 is used to correct for LED aging or any other effects that might influence your measurements.  The only problem with this would be that the detectors would always have to stay in the same orientation to the light source so as to provide the same detection cross section (can you get detectors that this wouldn't impact?  Probably)
8  Using Arduino / Project Guidance / Re: Voice control Servo (easyvr) on: January 29, 2013, 09:14:51 am
Hi there,

First, let me preface this by saying I'm very new to arduino and programming in general.  It seems you know a lot more about it than I do, but I might have some info that would be of use.

I recently was working on a project to control a servo using an Arduino Uno to control a servo and was using some serial communication just for debugging purposes (the system would be stand alone once complete)

I was having some of the same problems you were with freezes in my first attempt at writing the software, as well as random servo jumps and movement while searching.  After a significant amount of googling, I found that there was an interupt problem with the serial communication which I believe was interfereing with the PWM pins ability to constantly refresh the servo position.  I'm not overly sure how to help out in your case, but maybe this will put you on the right track.  I expect that is the reason that attaching your sevo in the action section leads to freezing after commands instead of freezing in the set up. 

Hopefully this sets you on the right track!

9  Using Arduino / Project Guidance / Re: Need some advice on which board/modules to use for a remote controlled light on: January 18, 2013, 01:04:11 pm
Update:

After doing some more reading, I think I'm going to use an IR remote and sensor for the control since they're so cheap.

Any thoughts on the best board to use?  I'd love something like http://digistump.com/ but they're not available yet smiley-cry
10  Using Arduino / Project Guidance / Need some advice on which board/modules to use for a remote controlled light on: January 18, 2013, 11:05:34 am
Hi guys,

I'm fairly new to Arduino (and programming and DIY electronics in general), so I'm looking for some advice on a small project i'd like to do.

Basically it's going to be an LED light for my bedroom that I'd like to be able to turn on and off without having to get out of bed =).

I'm planning to use a few (6?) white LED's, and then one each of red, blue, and green I think.  I'm going to set it up so that it can either be on as white LED's (possibly with 2 levels of brightness by turning on 3/6 of the LED's) and also slightly tinted by the colored LED's (whites on as well as one of the colors).  I'm fine with the programming and hardware using a normal switch but I'd like to be able to do it using either my iPhone, or a small remote.

However, I've never built anything that communicates like that before.  I had thought that since my phone is bluetooth capable, that would be the easiest way to communicate with the lights, but I'm not really sure.

I was looking to use the smallest/cheapest board I could find that will be able to control all of the lights from a 9V battery.  I think an Arduino Pro Micro board from Sparkfun (https://www.sparkfun.com/products/11098) might be my best bet, but again, I don't have much experience with any of this.  I'd prefer the board to be USB programmable so I don't have to fool with the serial connections.

As for a bluetooth module (I'm totally open to other options if there's something easier/cheaper/better) I'm kind of in the dark as I've never done anything like this.

Any advice you guys could provide would be much appreciated!

Thanks,

Josh
11  Using Arduino / Project Guidance / Re: Pressure gauge interface on: January 11, 2013, 11:14:04 am
Update--

After reading more closely through the user manual, I found that there is an option to output a voltage proportional to the readig across one of the.  I'm going to set that up, use a multimeter to find which pin it is in my serial cable and I should be able to use that signal without all the other pins for input to one of the analog pins on my board.

Pretty sure that should do the trick... Thoughts?
12  Using Arduino / Project Guidance / Pressure gauge interface on: January 11, 2013, 10:43:45 am
Hi guys!

New user here, and my knowledge of programming and electronics is admittedly limited.  I'll explain what it is I'm trying to do, and how I'm trying to do it because maybe I'm going about it in the wrong way =)

I have a system in a lab which uses a pressure gauge to monitor a reaction.  I currently have the following item

http://www.ge-mcs.com/en/pressure-and-level/handheld-test-tools/dpi-104-digital-test-gauge.html

Which I have attached via a serial cable to a PC using the provided software to log data for the gauge. 

In the interesting of automating the process, I have purchased an Arduino Uno board with a starter kit and a few servos so that I can program it to turn a Servo after a given amount of time.  This is very easy and I have successfully done so.

However, in the interest of safety, I'm also interested in turning the Servo if the reaction over-pressurizes.  Again, the software and basic idea are very easy, but I'm having trouble coming up with a good way to read data from the pressure gauge on my Arduino.  I have almost no knowledge of how to go about this.  I've looked over the serial information on a few tutorials and other google searches but I can't find quite what I'm looking for.

I do not need to monitor the cable data while it is attached to the computer, so I don't need a splitter or anything like that.  My eventual plan is to use something like PuTTY to monitor the arduino to log data on the PC, so I only need the serial cable connected to the arduino. (Or maybe use a micro SD card, I'm not sure yet).

I'm a little unclear as to what I need to do to the individual pins from the serial cable since I don't know anything about it.  From what I've gathered, I believe I need to hold Data Carrier Detect and Data terminal ready pins high to tell the gauge to transmit data?  I expect it's probably not this simple, but I'm looking for some help!


Any insight that can be provided would be much appreciated, thanks!

Josh
Pages: [1]