Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 1169
61  Using Arduino / General Electronics / Re: Do i need capacitors on: July 18, 2014, 02:39:47 pm
Quote
Arduino is powered through a 9V battery and the motor driver with 12V battery... Bluetooth, LCD , distance sensor are powered from arduino's 5V,

 Your main problem is that a small 9 volt battery will never be able to supply enough current for those devices, not enough current capacity. Even with a proper battery with enough current you will still be limited by the arduino 5V current capacity to power that much external stuff. You will need to use an external +5vdc power source with enough current capacity for all that stuff. How much current? Can't say without looking at the datasheets for each of the external devices to see what they require.

62  Using Arduino / Microcontrollers / Re: ATMEGA 1284 - Definative Bootloader Solution.... on: July 18, 2014, 02:31:39 pm
Yeah I read that somewhere and changed it... this is what I have now, but I still dont think its working (after rebooting IDE)

Code:
mighty_opt.name=Mighty 1284p 16MHz using Optiboot
mighty_opt.upload.protocol=arduino
mighty_opt.upload.maximum_size=130048
mighty_opt.upload.speed=115200
mighty_opt.bootloader.low_fuses=0xff
mighty_opt.bootloader.high_fuses=0xd6
mighty_opt.bootloader.extended_fuses=0xfd
mighty_opt.bootloader.path=optiboot
mighty_opt.bootloader.file=optiboot_atmega1284p.hex
mighty_opt.bootloader.unlock_bits=0x3F
mighty_opt.bootloader.lock_bits=0x0F
mighty_opt.build.mcu=atmega1284p
mighty_opt.build.f_cpu=16000000L
#mighty_opt.build.core=arduino:arduino
mighty_opt.build.core=standard
mighty_opt.build.variant=standard

For this to work just restarting the IDE does not implement it. You have reburn the bootloader using the IDE as that is the only time the IDE takes the new fuse values and burn them to the chip.

63  Using Arduino / General Electronics / Re: fun projects involving TV tuner antenna on: July 18, 2014, 02:26:52 pm
I recently got a hold of one of those old rabbit ear antennas with the circular antenna on it as well. I was wondering if there are any fun projects I can hack it into?

Make a hat out of it.
64  Using Arduino / Programming Questions / Re: Help understanding a script. on: July 18, 2014, 02:06:16 pm
well the lines that eventually print the final result are these

Code:
Serial.print(F("#KAL:"));             //Kalman Filtered angle
pad(kalAngleX);
The result is indeed accurate. (there is a margin of error of course within 0.5 - 1 degree)

Can i use kalAngleX directly? Is the Serial.print(F()); and pad(); of any significance?

Well assuming you are going to use the analogWrite() function to drive the motor driver to the desired speed, you just need to scale the angle range (0-90 degrees) to the 0-255 pwm output range. So the basic conversion can be done using the map() function as so:

Code:
int outputSpeed;
int angle;
outputSpeed = map(angle,0,90,0,255);
analogWrite(pin#, outputSpeed);



 
65  Using Arduino / Sensors / Re: Pressure Transmitters on: July 17, 2014, 07:08:40 pm
The typical way to translate a arduino ADC value to a desired units of measurement is to utilize the mapping function.

So see if this makes sense:

 int pressure = map(analogRead(A0), 204, 1023, 0 100);   // read analog voltage to PSI units.
66  Using Arduino / Programming Questions / Re: problem in using interrupts on: July 17, 2014, 07:01:45 pm
Things that you cannot use in an interrupt routine because they deadlock the Arduino:

delay()
Serial
( there may be others in other libraries - anything that waits for other
interrupts, basically )

Things that don't work in an interrupt routine:

millis()
( there may be others in other libraries )

Things that aren't a good idea in an interrupt routine:

anything time-consuming, anything that can be done in loop() without
difficulty.

 Millis() is often used in ISRs as long as you realize that it doesn't increment while inside the ISR, however it's still good as a 'time stamp' to tell a sketch when the interrupt triggered and use that value for say a debounce function.
67  Using Arduino / Microcontrollers / Re: Why 16 Mhz clock??? on: July 15, 2014, 08:09:58 pm
I also ask Why 16mhz clock however the reason I ask it is because the avrs are rated to run at up to 20mhz so why not clock it at that frequency?

 Not hard to change it to 20 MHz.
Change the resonator, edit the boards.txt file and locate and burn a 20 MHZ bootloader and there you go.

68  Using Arduino / Project Guidance / Re: Using External ADC's on: July 15, 2014, 10:42:02 am
Your correct, there are four different strapping options for the single address selection pin, allowing up to four of these ADC/MUX modules to share a single I2C bus. So up to 16 single ended inputs or 8 differential inputs maximum.


69  Using Arduino / Sensors / Re: How can I conect a 4-20 mA sensor with external electrical supply on: July 15, 2014, 08:50:00 am
Dear retrolefty,

Could you explain this calcuations, please?.

Thanks in advance,

Simple Ohm's law, voltage = current X resistance

.020 amps X 250 ohms = 5 volts
.004 amps X 250 ohms = 1 volt
70  Using Arduino / Project Guidance / Re: Max AC input frequency arduino can read on: July 14, 2014, 07:31:50 pm
Hi,

I am using a Mega 2560 for my project. I am inputting an AC signal to one of my Arduino's Analog In pins. I've read that Arduino is capable of reading a value from its Analong In pins up to 10000 times per second. Is this correct? Also, is there anything that can be done to increase this reading rate? Does the Baud rate have an effect on how fast the Arduino reads in analog values?

Thank you

Applying an AC voltage directly to a arduino analog input pin can/will result in pin damage or worst. Applied voltage to any analog or digital pin must be restricted to 0 to +5vdc, no negative voltage allowed as AC voltage has 50% of the time.

71  Using Arduino / Project Guidance / Re: Using External ADC's on: July 14, 2014, 06:14:39 pm
The ADS1115 is a very nice ADC/MUX that can be configured to switch between 4 single ended analog inputs (or 2 channels of differential inputs). Also the chip has a address pin that can be strapped high or low to gain a second I2C address, so two of these devices can share the two I2C pins (20,21) and handle reading up to 8 analog input signals. The Adafruit folks have a nice arduino library to make using this device pretty simple.

72  Community / Bar Sport / Re: The Cracked Pot on: July 14, 2014, 03:17:54 pm
At least the cracked pot offers variable resistance...

You reminded me that I had an intro physics problem something like that. It's a tower with hole on the side. Calculate something about that hole and water flow. Variable resistance, not sure, but variable water speed, yes.

Flow rate dependent on the depth of water in the tank?


Yes, depth of water (head pressure) is equal to voltage. Crack in pot is equal to resistance (fixed value). Leak rate is equal to current flow and varies with water height. So Ohm's law applies.

73  Using Arduino / Project Guidance / Re: Driving multiple Solid State Relay on: July 14, 2014, 10:17:16 am
There are some DC SSRs that do work with pwm like the power-io HDD-xxxxx SSRs but you will only find that in DC

 There are some AC SSRs that can do some form of slower PWM often called phase controlled. However the PWM switching speed must be at the line frequency speed not the higher speed that the arduino PWM uses, and one must have a external means of detecting the AC zero crossing for proper timing.

 Standard AC SSR only turn on and off it's output at AC zero crossing (8.33 msec @ 60 Hz) where as the 'phase controlled' AC SSRs allows turning on the device at any time in the AC waveform, but can only turn off the SSR at zero crossing like the standard ones.


74  Using Arduino / Sensors / Re: How can I conect a 4-20 mA sensor with external electrical supply on: July 14, 2014, 09:55:49 am
The typical method is to wire a precision 250 ohm resistor from the sensor 4-20ma output pin and then to sensor ground. Add a ground wire from the sensor ground pin to a arduino ground pin. And then wire from the sensor side of the resistor to a arduino analog input pin. At the sensor's maximum 20 ma output the resistor will 'see' +5vdc dropped across it, suitable for the arduino analog input pin. At the sensors minimum 4 ma output the analog input pin will 'see' +1 vdc. 

 
75  Using Arduino / Project Guidance / Re: Driving multiple Solid State Relay on: July 14, 2014, 09:46:54 am
Yes, direct control from on arduino output pin will work. And yes, it will not do PWM output, just on and off control.

Pages: 1 ... 3 4 [5] 6 7 ... 1169