Show Posts
|
|
Pages: [1] 2 3 ... 1039
|
|
1
|
Using Arduino / General Electronics / Re: Surge supressing for Solid State Relay?
|
on: June 18, 2013, 06:50:47 pm
|
|
Controlling inductive loads with A SSR can be very problematic as the resulting voltage and current go out of phase with each other and that can cause major problems with turning on and off of the internal triac/SCRs. Carefully calculated and sized "snubber" circuits are the general solution for using SSRs with inductive loads. Or go with a good quality electromechanical relay instead.
Lefty
|
|
|
|
|
2
|
Using Arduino / Project Guidance / Re: voltage measurement using arduino
|
on: June 18, 2013, 01:04:43 pm
|
Little point to trying to measure the board's 5 volt Vcc voltage via a analog input pin as it will always read 1023 counts as the same Vcc is used as the reference voltage. So even as the Vcc battery pack lowers in voltage the analogRead value will still report as 1023 counts.
Best to state what you are trying to accomplish rather then how you think it should be done.
Lefty
He's not trying to measure the the board's power supply, he's using a wall wart to determine if there is AC power to an outlet (at least, that's what I've gathered from the limited information he's given). OK, I missed that. However I would just wire the adapter's 5vdc output to a digital input pin rather then bothering to read it's value as it's a on or off type application alarm? Lefty
|
|
|
|
|
3
|
Using Arduino / Project Guidance / Re: voltage measurement using arduino
|
on: June 18, 2013, 12:59:09 pm
|
you mean A0 to A5...??ok then my 5v comming from my power pack..then 5v vcc and gnd wire how can i input to arduino?? thank you
You plug the 5v into an input pin and the ground to the ground pin of the Arduino, as has already been explained. Little point to trying to measure the board's 5 volt Vcc voltage via a analog input pin as it will always read 1023 counts as the same Vcc is used as the reference voltage. So even as the Vcc battery pack lowers in voltage the analogRead value will still report as 1023 counts. Best to state what you are trying to accomplish rather then how you think it should be done. Lefty
|
|
|
|
|
4
|
Using Arduino / Sensors / Re: Hall Effect Wheel Speed, next step
|
on: June 18, 2013, 10:45:03 am
|
Interesting sensor. It's not a pure simple hall effect sensor as it has an internal magnetic field generator that 'biases' the sensor such that rotating teeth will effect the field. It's also outputs a pure digital signal so you should not be reading it with a analog input pin using a analogRead() statement, but rather read it as a digital input signal using digitalRead() commands or better yet learn how to use the user interrupt functions on the arduino using digital pins 2 or 3 (on a Uno) board. As far as maximum speed capabilities you will have to work out the minimum time between teeth to see that you are not exceeding a maximum switching speed of the sensor. The key spec seems to be: Fast operating speed – over 100 kHz This will of course be related to the number of teeth on the gear wheel and the maximum RPMs of the wheel. Less teeth would allow higher maximum RPM. Lefty
|
|
|
|
|
5
|
Using Arduino / Sensors / Re: Hall Effect Wheel Speed, next step
|
on: June 18, 2013, 10:31:09 am
|
|
Note that hall effect sensors come in different 'flavors'. Yours appears to be one that outputs a analog voltage relative to the magnetic field strength being sensed? Others come as simple digital switches that out either a logic high or low depending on if the magnetic field being sensed is above or below a specific value. A digital hall sensor would be better to use as a speed detector as you can easily interface it as a interrupt and use timers to keep track of the last change of signal to the next change of signal and then calculate the speed based on the delta time passed.
Now what I do not understand is how a hall effect will work with just metal gear teeth? A hall effect senses the strength (and in some cases the polarity) of a external magnetic field. Unless the gear is magnetized I don't see where there is a magnetic field to be sensed in your application? There are speed sensors that are designed to just sense gear teeth, called variable reluctance sensors that work on a different principle as the magnetic field is generated internal inside the sensor and the rotating teeth effect the magnetic field and is sensed by the internal circuitry of the speed probe. Perhaps a link to the sensor you are using will verify if it's best suitable for your application?
Lefty
|
|
|
|
|
6
|
Using Arduino / Project Guidance / Re: voltage measurement using arduino
|
on: June 18, 2013, 10:08:01 am
|
Hi all, I'm new to arduino..i am doing a project to detect power outages in areas.so i need to get power outages using arduino.so what is the best way to do this arduino..please be kind enough to tel me how arduno analog input use to detect outages.for demo using 5v power pack hw can we do this?? thank you.
One easy and safe way to detect main AC power failures is to use a simple relay that uses a AC coil relay. Your AC main power would keep the relay energized unless there was a main power outage in which case the relay would deenergize. The arduino would be wired to the relay's contacts and read continuously as a digital input signal. Lefty
|
|
|
|
|
7
|
Using Arduino / General Electronics / Re: Voltage divider - power usage improvements?
|
on: June 18, 2013, 09:43:07 am
|
That wouldn't help, because current would still flow from the +12V source through the upper resistor and into the pin protection diode of the mcu...
Good point. What if you combined it with setting the pull-up resistor in the input pin on the MCU? Geoff That would not change the fact that the input pin's positive protection clamping diode inside the AVR would still 'see' the +12vdc source voltage if the negative lead of the divider was 'floated' from ground.
|
|
|
|
|
8
|
Using Arduino / General Electronics / Re: 24VDC and 5VDC to the same 0V
|
on: June 18, 2013, 09:38:19 am
|
In such a setup, where the ground is shared with a higher voltage power source, could there be any problem if there were any negative feedback?
Could you define what you mean by 'negative feedback' in context of using multiple DC power supplies. There is a requirement for all voltage sources to share a common ground unless you are using some form of opto-isolators to interface the higher voltage components. Lefty
|
|
|
|
|
11
|
Using Arduino / Project Guidance / Re: How to modify the servo sweep code to different angles?
|
on: June 17, 2013, 01:33:34 pm
|
That is most likely because the servo library assumes and applies a default values assuming your servo can handle microsecond pulse lengths of: default min is 544, max is 2400 And it maps those pulse width values to assume 0 to 180 if using the servo.write(angle_value) command. The original R/C servo standard was a range of 1000 to 2000 microseconds and all servos will work with that range. Most servos do have 'overrange' below and above 1000 to 2000 but how much varies from specific servo brand and model you have. So you are most likely forcing your servo up against a mechanical stop and that is not a good thing. You need to either limit the range of values in your your servo.write commands to less then arduino 0-180 angle degrees or use the servo.writeMicrosecond command with actual pulse width values that your specific servo can handle safely. All servos cannot safely respond to 544 to 2400 microsecond range and all servos do not have a 0-180 degree mechanical travel range. The arduino abstracted servo 'angle' positioning method is a flawed concept (it works on assumptions that may or may not to true for any specific servo) and helps prevent beginners to servos from understanding how they actual work. Lefty
|
|
|
|
|
12
|
Using Arduino / General Electronics / Re: Voltage divider - power usage improvements?
|
on: June 17, 2013, 01:20:25 pm
|
The potential divider circuit only needs to be connected when you are taking a measurement. The bottom of the divider could be an output which is only taken low just before a measurement. Sleep modes may also be useful.
The problem with that is if you let the bottom resistor 'float' free then the analog input pin will 'see' the total voltage that is applied to the divider circuit which would then exceed the maximum safe voltage that can be applied to an AVR pin and puts the AVR's internal protection clamping diode at risk. Lefty
|
|
|
|
|
13
|
Using Arduino / Installation & Troubleshooting / Re: Does the USB Driver Auto-Set the Baud Rate?
|
on: June 17, 2013, 11:25:44 am
|
I use a serialBegin(9600) function in my code when opening the serial port. However irrespective of the baud rate used in the VB program which communicates with the board or the baud rate used in a terminal program, I can still communicate ok. Does the USB driver autoset the baud rate for communication with the virtual port? (Similar to the way dialup modems could autoset the baudrate on the fly)
Yes the baudrate spec is only needed to be matched by the PC application and the arduino sketch code serial.begin statement. The PC usb driver and the arduino USB serial converter chip will handle the actual USB transfers 'transparently' of the desired baudrate that the 'end users' are using. Lefty
|
|
|
|
|
14
|
Using Arduino / Project Guidance / Re: How to reduce the size of the code for Leonado?
|
on: June 17, 2013, 11:19:59 am
|
How to reduce the size of the code for Leonado? For the same sketch,it can be upload to UNO, but fail to Leonade because of its size. Maybe, I'll write the larger code for Leonado. Any suggestion would be very appreciated.
The Leonardo has it's own built in USB hardware so it's bootloader will always be larger then the bootloader for a UNO, so there will always be a difference in how large a sketch one can run on a Uno Vs a Leonardo board. However there are usually ways to make a sketch smaller with changes in how you program the sketch by changing software algorithms or changing of functions and/or libraries used in the sketch. Lefty
|
|
|
|
|
15
|
Using Arduino / Installation & Troubleshooting / Re: Help programming pro mini.
|
on: June 17, 2013, 10:50:17 am
|
ok that seems straightforward enough
Keep in mind that you will also have to locate the proper USB driver software for this serial converter compatible with your PC as the arduino IDE does not have one for this series chip. While I located such a driver for my windows XP system when I first bought one I don't have a link handy at this time, but perhaps someone else does? Lefty
|
|
|
|
|