Show Posts
Pages: [1] 2 3 ... 67
1  Using Arduino / Project Guidance / Re: Voltage Regulator getting hot on: September 29, 2013, 04:25:59 pm
The goal here is to distribute heat across several components.
No it is not!
Don't quote me with crap like that. My comment is in reference heat sharing with diode vs resistors where another joker seems to think a resistor is the way to go. What the better solution is for the original poster is another story.
2  Using Arduino / Project Guidance / Re: Voltage Regulator getting hot on: September 28, 2013, 02:40:33 pm
No matter what you do, Vin and the load currents will always be changing. Motorcycle battery voltage is going all over the place, etc. The only way to get a stable Vin to the 7805 is to use a regulator to feed the regulator. Series diodes won't be any better than series-R. The 7809 scheme might be the best.
The goal here is to distribute heat across several components. With series R's you introduce a voltage drop that will fluctuate with load variations. With series diodes however, the voltage drop is fixed and so is preferred in this context.
3  Using Arduino / Project Guidance / Re: Interrupts and fast analog reading. on: August 04, 2013, 01:09:14 am
Hello:

 I am involved in make a train control, the team chose arduino UNO because is easy buy one and the local store gives you one with a introductory course, we have troubles in two aspects.

1) We chose send a stop signal when a laser beam is interrupted, using a LDR and analogRead, we can stop the train but when the train is so fast, analogRead can't detect the voltage change, I need improve the analogRead or need alternative, I believe digitalRead is faster, but I don't now how fast is it and I don't now how convert the analog signal of LDR in a digital signal using transistors or similar methods.   

2)We need a emergency stop, I think using interrupts can make faster an better stop, using the library PciManager, anyone has experience with this library?

Thanks 
The main issue here is more likely the LDR itself. LDR's are slow devices and need quite some time (say in the 5ms to 100ms range) to respond to changes in light. Rather you should be looking at phototransistors for this type of application.
4  Using Arduino / General Electronics / Re: 2 ATMega Processors sharing a peripheral device (SPI ram) on: July 18, 2013, 01:58:10 am
The MUX does add another chip but it also means that there can never be hardware contention between the two CPU's SPI pins, worth it I think.
In my mind this just adds complexity and cost.

A good precaution is to always power the project from a decent lab supply during development and limit current to a safe level. In case of an accidental short (from incorrect wiring or software) this will trigger a brown out reset and tri-state outputs.
5  Using Arduino / General Electronics / Re: 2 ATMega Processors sharing a peripheral device (SPI ram) on: July 18, 2013, 01:00:05 am
I thought i could just use a few AND gate buffers either side of the SPI ram and wire the SCK,MOSI,MISO and CS wires through these to basically turn on and off which of the arduinos is talking/receiving to the RAM at any given time, and control this by sending just a single character over serial to say 'your turn' but its a no go.
The AtMega328's support tri-state logic (high, low, float) and so you should be able to wire both AtMega's to a single RAM chip without additional hardware provided you carefully serialize access (one at time). SCK, MOSI and CS are outputs that all need to be switched between mode output and mode input (float) depending on which mcu has access to RAM. MISO is always input and so no issue. For CS, you should enable internal pull-up so that the RAM chip remains unselected when you switch control from one mcu to the other.
6  Using Arduino / Programming Questions / Re: Millis() rover over handling on: July 07, 2013, 03:51:46 am
If you only care to express your opinion, I have nothing further to add.

If on the other hand, you want to contribute with insight or knowledge this is my take:

The difference between two unsigned quantities (as in the code discussed above and quoted below) is signed and so the interval is limited to the LONG_MIN ... LONG_MAX range.

Code:
   if (millis() - startMillis > 30000) DoorError(); //longer than 30 sec means the string is tangled

7  Using Arduino / Programming Questions / Re: Millis() rover over handling on: July 07, 2013, 02:13:18 am
It will be good for 30 seconds, but not for ~50 days. The maximum interval we can time is half of that (2^32 / 2 - 1 = ~24.86 days).

Are you certain?  Are you certain enough to wager?

Certain of what?

My post is addressing whether this quote is true or false:

"As long as the interval being timed (30 sec here) is less than the ~50 day millis() rollover interval, and if the comparison is done with subtraction and unsigned variables as it is here (good job!) then the rollover will never be a problem."

I say yes, but only if interval being timed is less than ~24 days.

8  Using Arduino / Motors, Mechanics, and Power / Re: 12 volt relay at 24 volts at 20 amps on: July 07, 2013, 01:24:54 am
thanks for the posts. I just have one more question. Would I be able to use it in between the 2 lead acid batteries? (on the wire connecting the ground of one battery to the positive of the other battery)  would that be 12 volts or is it 24 volts?   
Interesting question. I'm not sure if this is better or worse (in terms of relay contact stress) than closing the circuit at one of the motor terminals, but in either case you will be closing/opening a 24V circuit.
9  Using Arduino / Programming Questions / Re: Millis() rover over handling on: July 07, 2013, 12:18:44 am
As long as the interval being timed (30 sec here) is less than the ~50 day millis() rollover interval, ...
It will be good for 30 seconds, but not for ~50 days. The maximum interval we can time is half of that (2^32 / 2 - 1 = ~24.86 days).

  32-bit max interval -> ~24.86days
  16-bit max interval -> 32.767 seconds
    8-bit max interval -> 127 milliseconds
10  Using Arduino / General Electronics / Re: Question regarding internal voltage reference on: June 17, 2013, 02:09:15 pm
Not sure what you mean by this :/
I plan to use the arduino function analogReference(INTERNAL) in conjunction with the attached circuit.
For a project powered directly from a battery, you can measure VCC without a resistor divider using the following formula (read from channel 14, reference is VCC):

VCC =1.1V * 1024 / ADC

If you power your board through a regulator (as in your case), this approach can not be used to determine battery voltage.
11  Using Arduino / General Electronics / Re: Question regarding internal voltage reference on: June 16, 2013, 11:26:17 pm
Now, to the question, what happens if I apply a voltage above 1.1V to an analog input? The reason I ask is that I'll be running an I2C device on the A4 and A5 pins, which will be running at 5V. I am new to electronics and I'm unsure whether using the internal reference of 1.1V will cause a reverse current when you apply 5V on the pins and whether or not it will be damaging.
There is only a single ADC on the AtMega and its protected behind a 16 channel multiplexor. Unless you program the ADC to actually read from A4/A5, the ADC subsystem will never be exposed to any voltage on these pins irrespective of reference. For measuring VCC, you should consider using channel 14  (1.1V reference as input to ADC).
12  Using Arduino / General Electronics / Re: Question regarding internal voltage reference on: June 16, 2013, 01:03:11 pm
I've done some research and the current plan is to make a voltage divider to bring the 12V down to around 1.1V and feeding it into an analog input. And as you may have guessed I'll read the analog input using the internal 1.1V reference voltage (which I have already measured to be 1.082V).
Another approach is to measure the internal 1.1V reference with respect to AVCC/VCC. Since you already know the internal reference (1.082V), you just turn the equation around and solve for VCC. Further still you can now use your calculated VCC as a reliable reference for your other ADC inputs irrespective of battery voltage. For AtMega328, the 1.1V reference can be selected as analog channel 14.
13  Using Arduino / Project Guidance / Re: Multiple L3G4200D sensors on: June 02, 2013, 03:31:25 am
A maximum of two L3G4200D devices can co-exist on a single I2C bus as otherwise there will be addressing conflicts.

In your application however this device serves no practical purpose (this is a gyro that measures rate-of-turn). For leveling, you will need an accelerometer.
14  Using Arduino / Project Guidance / Re: Possible to measure 12.6v battery with arduino input? on: June 02, 2013, 03:24:40 am
So I have a 3s 800mAh that I would like to use to power my arduino uno, but at the same time I would like to use one of the analog pins to monitor the voltage. Is this possible? Also, I know the maximum current the arduino input can handle is 40 mA and I'm scared that hooking it up will fry my board. Is there a way I can calculate how much current will flow through if I connect a fully powered lipo at 12.6V to my Uno (would Ohm's law be the right track? If there is a resistance value for the Arduino's input?).

Thanks in advance for all the help.
The analog input resistance is very high (about 100M Ohm) and so current flowing into the input pin is insignificant. The problem however is that when voltage exceeds about 5.3V, a protective diode opens and will connect your input directly (zero Ohm) to 5V. This will more than likely damage your Arduino microcontroller when connected to a 12.6V battery and so you must avoid this.

A common solution is to use a voltage divider. Two resistors in series from battery plus to ground are used to drop the center point voltage to within the 5V range.

Another solution is to use a zener diode (use 8.2V for a 3S lipo) connected from battery plus to a 1k resistor to ground. This will drop the center point voltage to about 4.4V for a fully charged battery and give a better dynamic range than is possible with a resistor/resistor divider.

Avoid using a pot as a voltage divider (other than for lab testing). The wiper on these devices typically rely on mechanical contact and are susceptible to failure.
15  Using Arduino / General Electronics / Re: High input impedance with analog read on: May 30, 2013, 09:03:50 pm
When you disconnect (by putting it into high impedance) the low-side (and maybe the middle as well) of the divider, still the current will flow from 9V battery via high-side ...
Not if you replace your top-side resistor with a zener.
Pages: [1] 2 3 ... 67