Show Posts
Pages: [1] 2 3 ... 443
1  Using Arduino / Programming Questions / Re: What is best method to multiplex many buttons with only 2 interrupts available? on: September 14, 2014, 08:36:55 am
How fast do you need to react to the buttons? I typically use a 500Hz tick interrupt to poll buttons and rotary encoders, which can gives you a response time as low as 2ms, depending on how you program it.
2  Using Arduino / Project Guidance / Re: Supplying 5v to A1 powers on arduino? on: September 14, 2014, 08:33:00 am
To solve this issue, connect a resistor between the inverter and pin A1 instead of connecting them directly. Similarly for A2. Use at least 10K, preferably more e.g. 47K.
3  Using Arduino / Project Guidance / Re: Powering a small "electromagnet" directly from an Uno? on: September 14, 2014, 08:29:54 am
Yes you can drive that solenoid directly from an Arduino pin.
4  Using Arduino / Motors, Mechanics, and Power / Re: How to replace solenoid power source with capacitor on: September 08, 2014, 05:33:30 pm
In principle you could use an inverter or diode-capacitor ladder to charge a capacitor to 12V from the 5V supply, and store enough energy in the capacitor to power the solenoid for 1.5 seconds. But there are at least two problems with this:

1. If you turn the solenoid on for 1.5 seconds every 5 seconds (so it is off for 3.5 seconds), then the average current it takes from 12V will be 0.8 * (1.5/5) = 0.24A. Even if your inverter were 100% efficient and you used a capacitor to smooth out the current, to generate 12V @ 0.24A from 5V, the drain on the 5V supply would be (12/5) * 0.24 = 0.576A. That's still quite a lot of current.

2. You will need quite a large capacitor. Suppose you want the capacitor voltage to drop no more than 2V (from 12V to 10V) during the 1.5 seconds that the solenoid is on. If we make the approximation that the current remains at 0.8A for the whole of that 1.5 seconds, then the value of the capacitor you need it:

C = (I * t)/V = (0.8 * 1.5)/2 = 0.6 Farads. So you need a supercapacitor. And it has to be rated at more than 12V, which means you need several in series (because supercapacitors are generally rated at much lower voltages than 12V).

Powering a solenoid from a capacitor bank is only practical if the solenoid needs to be powered only occasionally (i.e. very low duty cycle), and only for a very short period of time.
5  Using Arduino / Project Guidance / Re: arduino for shifting separatly controled overdrive in project car on: September 08, 2014, 05:09:37 pm
The sine wave appears to have negative and positive half cycles, so either the scope was in AC coupling or it truly does have negative half cycles, which would need to be dealt with.

Also the peak to peak voltage is only 1.5v, which is not enough to trigger a digital input.

I think you will need to build a small circuit to amplify and shift the signal levels to be 0 to 5V

Alternatively, use the analog comparator in the mcu. No need to shift the sine wave or amplify it. However, to improve noise immunity, you may need to add a little hysteresis. You can do this by connecting one of the analog comparator inputs to the sine wave source via a resistor of about 22K (to limit the current into the pin protection diode during negative half cycles), and the other one to ground via a resistor of about 100 ohms. In the analog comparator ISR, when you get an interrupt that tells you the input has gone negative, enable the pullup resistor on the other analog comparator input. When you get the interrupt to say that the input has gone positive, disable that pullup resistor.
6  Using Arduino / Displays / Re: Need help with display on: September 08, 2014, 11:17:29 am
Ohhh, I understand now!  I need to light the digits one at a time...

Actually, two at a time for this type of display. See Paul's response below.
7  Using Arduino / General Electronics / Re: PWM P channel MOSFET on: September 08, 2014, 06:25:56 am
I tried to drive the MOSFET directly with the Arduino and using a NPN transistor 2N3904.

That is the correct approach. What value pullup resistor did you have between the 2N2904 collector/mosfet gate and the +12V/mosfet source? How much current does the blower take? The Rds(on) of the IRF9540 may be too high for it to pass the blower current without needing to be cooled.

I am trying to find a p channel with a logic gate I am considering get the FQP27P06 but I am not sure if that is going to work better.

That won't help.

One other consideration is that transients are very common on 12V automobile supplies. So both the mosfet and the transistor should be rated at 60V or more.
8  Using Arduino / General Electronics / Re: Help Identifying Capacitors. on: September 08, 2014, 06:18:06 am
Unless there is a capacitor actually fitted on the motor, or a capacitor with one of its leads connected to a terminal on the motor and to nothing else, then it's unlikely that the motor uses a capacitor for starting. The fan is probably a single-phase induction motor with shaded poles for starting (there are generally copper hoops around one part of each pole). The starting torque is much lower than the running torque for these motors. To get it working again, you probably need to dismantle the motor, clean it, lightly lubricate the bearings, and re-assemble it. I once had to rotate the square-section housing of a brand new motor by 90 degrees relative to the ends in order to get the friction sufficiently low for it to start.
9  Using Arduino / General Electronics / Re: Connect Car 12V to Arduino Digital Inputs on: September 08, 2014, 04:03:12 am
The 1mA recommended pin protection diode current maximum is unfortunately not published on the datasheet, it is in an Atmel application note about detecting mains zero-crossing, see http://www.atmel.com/images/doc2508.pdf.

You can add external protection diodes if you like, however if you want them to conduct the current in preference to the built-in pin protection diodes, then your external diodes should be Schottky diodes, so as to conduct at a lower forward voltage than the internal diodes.
10  Using Arduino / Sensors / Re: dirty earth - automotive / car application on: September 07, 2014, 03:11:42 pm
Here are a couple of suggestions:

1. If the sensors are all in the engine bay,  then I suggest you ground to the Arduino and its voltage regulator to the car ground in the engine bay near the sensors, and nowhere else.

2. Put some filtering on the all the Arduino inputs, such as a 47K resistor in series with each Arduino input pin, and a 0.1uF capacitor between each input pin and Arduino ground.
11  Using Arduino / Displays / Re: How to use 2.4 Inch TFT LCD Display Module Touch Panel 240x320 with Arduino Uno on: September 07, 2014, 03:02:33 pm
The vendor does not offer a datasheet for that display on the web site and doesn't even say whether the interface is 8-bit, 16-bit or serial. I suggest you try one of these http://imall.iteadstudio.com/display/tft-lcm.html instead, there are downloadable datasheets for all of them. If you are going to drive it from a Uno, choose one with an 8-bit or serial interface, not a 16-bit interface because that will leave you very short of unused Arduino pins. The UTFT library should be able to drive most if not all of those displays.
12  Using Arduino / Displays / Re: Need help with display on: September 07, 2014, 02:54:35 pm
You need to use 2-way multiplexing. First you ground one of the ground pins, and drive some of the 14 segment pins high through series resistors to get 2 digits displaying what you want. Then you ground the other ground pin and drive some the 14 segment pins/series resistors high to get the other 2 digits. Repeat this quickly enough to give no apparent flicker. I normally use a tick interrupt to switch the multiplexing over at regular intervals, but with care you can do it in loop() instead.

You can drive the segment pins directly from Arduino outputs through series resistor of about 150 ohms, but you will need to use NPN transistors (e.g. BC337) to ground the ground pins because they each carry the current for up to 14 segments at once.
13  Using Arduino / General Electronics / Re: Connect Car 12V to Arduino Digital Inputs on: September 07, 2014, 02:44:54 pm
If you just want to detect whether there is 12V connected to the bulb (not whether the bulb is actually working), and the Arduino has a common ground with the car, then you just connect each 12V signal through a resistor to a digital input. Use a resistor value of at least 100K. This will keep the current into the processor pin protection diode below the 1mA maximum advised even for input transients of 100V.

If you are not sure whether the Arduino has a good common ground with the car, then use opto isolators.
14  Using Arduino / General Electronics / Re: Sneding signals to Analog pins while power is off. on: September 04, 2014, 01:47:58 pm
And if that current exceeds 1mA, you can blow the diode, leading to a failed chip.

The only figure I have seen is in an Atmel application note relating to detecting mains zero-crossing. The suggested limit was either 1mA or 2mA, I don't remember which. I suspect the reason for the limit is not related to blowing the diode, rather the risk of latch-up (due to parasitic SCRs etc.) that Mike mentions.
15  Using Arduino / Project Guidance / Re: DIY 3D printer, your collective thoughts on: September 04, 2014, 01:39:09 pm
some of the improvements I have made and want to make need a reasonable amount of processor power.

Could you give a rough description of the sort of changes you have made/plan to make - not code, just an overview.

Thanks

...R

Changes I have already made include improving the web server in the firmware so that it can serve all the files needed by the browser, provide a lot more information, and upload files to the SD card more quickly. Having a web interface is  tremendous help.

Changes I plan for the future include adding precompensation for the lag of the extruders behind the movement axes, to get more even prints. The lag is especially significant when using Bowden extruders.
Pages: [1] 2 3 ... 443