Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Re: Split power supply on: February 23, 2011, 11:22:12 pm
I'd be using a simple voltage divider and an op-amp wired as a unity gain amp to set the 0 volt reference.

That is, if I really needed a 0 volt reference and could not tolerate the impedance of just using a voltage divider.
 
2  Using Arduino / Project Guidance / Re: Arduino durability in industrial environment on: February 23, 2011, 01:57:10 pm
Keep it clean and keep it cool. Heat and dirt are the enemies.

Vibration can also be an issue. I've done my share of troubleshooting on similar hardware used in an industrial environment. Fretting of inexpensive headers and connectors and chips creeping part way out of their sockets was not uncommon after many hours attached to punch presses, motors, and conveyors. Even screw terminals on heavy duty barrier strips would occasionally come loose. Factor in the cost of more reliable connectors and the elimination of chip sockets where possible as well.
3  Using Arduino / General Electronics / Re: Strange resistor value on: February 22, 2011, 11:31:10 pm
39 ohms is right for a 3.3-3.6 Volt power supply like single Lithium Ion cell or 3xNiMH cells.

I'd use 68 or 82 ohms with a 5 Volt power supply.
4  Using Arduino / Project Guidance / Re: Triac/Optocoupler Dimmer on: February 14, 2011, 03:00:19 pm
I just wouldn't expect a 56Ω resistor to go like that in the absence of extreme power line noise, highly reactive loads, or some kind of misconnection. I have no problems with 100Ω and some of the triac drivers in my projects have been driving inductive loads for over 10 years. The math says use line peak divided by the maximum optocoupler output amps, about 170/2. Even if 56Ω is too low, resistors will often take a 50% overload for months before failing.

It's easy to check with a DMM. Gate-MT1 typically has low resistance. Gate-MT2 does not. IIRC, getting them backwards means you're firing in the wrong quadrants or possibly not at all. In reality, triacs aren't near as bidirectional as they appear.
5  Using Arduino / Project Guidance / Re: Triac/Optocoupler Dimmer on: February 10, 2011, 11:31:36 pm
The one I wanted to post is simpler but there is a good circuit in this app note:

https://www.onsemi.com/pub_link/Collateral/AND8011-D.PDF
6  Using Arduino / Project Guidance / Re: Triac/Optocoupler Dimmer on: February 10, 2011, 11:06:10 pm
Is the 56Ω resistor connected to MT2 or MT1? If you have the main terminals backwards that's another situation where it could end up doing all of the conducting. After doing a little more math, the resistor should not have fried with a 4.8W load and a 60W bulb should be far enough above the latching current. In fact, I wouldn't be surprised if the optocoupler can handle a 4.8W (40mA) load all by itself.

I'll have to hunt around a bit. I can't find that "perfect", easy to follow and well explained example of a dimmer circuit with a zero cross detector triggering a 555 timer driving the optocoupler. I'll bet it is still in the browser history at work though. Take that circuit, connect the zero cross detector to an Arduino input, generate the desired delay in software, and connect the Arduino output to the optocoupler.
7  Using Arduino / Displays / Re: Weird analog signals in LCD Keypad shield on: February 10, 2011, 11:45:58 am
After i connected LM35Z temp sensor to analog input pin5 and tried to read signal that sensor outputs to Arduino the readings was pretty weird.

...

int tempSens = A0;

...

pinMode(tempSens, INPUT);


If it's connected to analog input 5 shouldn't tempSens be initialized to A5?

A0 is used by that shield for the pushbutton inputs. I had to add some debouncing to the function for checking pushbuttons that's supplied with LCD4Bit library. The print routines supplied with the LiquidCrystal library also work better than those in LCD4Bit and I haven't needed anything not included in LiquidCrystal either.

I use A1 to read a position sensor attached to a linear actuator. I've had zero problems since I added a 0.01µF cap between the sensor output and ground. I found I didn't need to explicity set pinMode to INPUT. After doing so though, I'm curious as to whether a digitalWrite(tempSens, LOW) would be needed to clear the pull up resistor.
8  Using Arduino / Project Guidance / Re: Triac/Optocoupler Dimmer on: February 09, 2011, 08:18:33 pm
The basic triac switcher won't work with a PWM signal. The zero cross detector in the MOC3041 won't allow firing at arbitrary phase angles. An MOC3011 would be needed along with a separate zero cross detector and voltage controlled timer connected to the firing circuit.

Also, I believe the 56 ohm resistor is burning up because the load is too close to the latching current of the SCR. The SCR can't latch itself on until the voltage is above 50V or so. In the meantime, the 56 ohm resistor and optocoupler are doing all of the conducting. The 330 ohm resistor doesn't fry because it's in parallel with the gate-MT1 resistance which is generally quite low.

How about this DC Controlled Light Dimmer Electronic Kit K8064?
http://www.apogeekits.com/light_dimmer.htm

9  Using Arduino / Project Guidance / Re: Motor Twitching - Using Motor Shield on: February 08, 2011, 09:34:27 pm
How would I be able to determine that this exists, or if I can get rid of it?

By trial and error and looking for spurious resets, unconnected inputs, ground loops, etc.

I would start with ground loops and move on to capacitive coupling causing one of the chips to reset.

Are your chassis and circuit grounds connected? are they connected in a star topology (good) or connected in series (grounds at different potentials) or in more than one place (classic ground loop)? How about RFI? is there an ungrounded portion of the chassis broadcasting the rise and fall times of power FETs like an antenna? Is your ground plane capacitively coupled to that antenna?

OTOH, I am no EMI/RFI wizard.
10  Using Arduino / Project Guidance / Re: Motor Twitching - Using Motor Shield on: February 08, 2011, 04:01:44 pm
EMI through the chassis?
11  Using Arduino / Programming Questions / Re: Floating point math on: February 02, 2011, 01:09:30 pm
I get about 2300 "cos()" and associated operations with the following example: ...

That's fast! Thanks for the info. I was personally expecting something around 500.

Still, 2300/several dozen operations = about a 30ms floor for the loop execution speed. Add some string processing, serial communications, or an LCD display could easily slow things up quite a bit more.

My upcoming project will require an overall loop speed below 10ms, a little interrupt driven pulse timing accurate to within 250µs, and just a few floating point operations to calculate results for the display. I think this puts that well within reach.

Arduino will run rings around an old Apple 2 or CPM box or even a PDP-11 that folks did all kinds of significant work on.

Hehe, I cut my teeth programming on the successor to the PDP-11.  smiley-lol
12  Using Arduino / Programming Questions / Re: Floating point math on: February 01, 2011, 09:00:18 pm
Even when programming far more powerful processors, I bend over backwards to arrange my algorithms to minimize floating point due to it's relative impact on speed, especially trig and log functions. It's an old school habit. Heck, you'll even see division involving two long integers minimized in much of my code.

Several dozen per second ≈ 14 milliseconds each. I could see the Arduino handling that. I could also see the Arduino struggling to handle any other tasks being performed at the same time.

Several thousand per second ≈ 170 microseconds each. I'm from Missouri. Show me.

I, for one, hope SJ posts his results. They could come in very handy for one of my upcoming projects. If the floating point division doesn't carry as much of a penalty as I'm suspecting, I won't have to resort to clever tactics to reduce a near real time speed measurement problem to long integer division.
13  Using Arduino / Project Guidance / Re: Gas powered soldering irons?? on: January 31, 2011, 11:25:53 pm
My vehicular repair and maintentance has always been done in close proximity to electrical outlets but I've found my big master something butane iron is the only way to go for high power soldering on heavy gauge wire and stud mount SCR's. It feels as though it's got 200 Watts worth of power.

I'd never dream of using it for microelectronics. I'd rather lug a car battery and and a small inverter to the scene and use my old (and not particularly expensive 40 Watt Weller WCC100) temperature controlled iron. I have considered retrofitting it with a longer power cord in the past though. It's old. What's to lose? It's unlikely to be more than a little cutting with a Dremel and attaching 25' long, 16/3 cord. I'd have to do it after hours at work though. How else am I going to solder my soldering iron?

Nyuk! smiley-lol Nyuk! smiley-lol Nyuk! smiley-lol DoH!
14  Using Arduino / Programming Questions / Re: Delay() works, but millis() doesn't? on: January 31, 2011, 01:20:57 pm
Code:
  //Test for recording State
      long endTime;
      while (millis() < endTime && millis() > startTime){
      lcd.home();
      lcd.print("Recording! ");
      recState = true;
    }
    //test for interval passed
      while (recState == true)
      if((millis() - startTime) > interval){
      StopRec();
    }

in effect this is if while (millis() < endTime && yada yada all ok until millis rolls over)

since endTime = startTime + interval then if (millis() - startTime > interval) is the same as if (millis() > endTime)

so, what do you suppose it does when millis() = endTime?
15  Using Arduino / Programming Questions / Re: Delay() works, but millis() doesn't? on: January 29, 2011, 01:30:53 pm
StopRec only being called once at the end of the StartRec function. A delay() would cause StopRec to wait. The millis() comparison is only being performed once. It comes up false, doesn't stop the recording, the function finishes executing, and never gets called again.
Pages: [1] 2