Show Posts
Pages: [1] 2 3 ... 24
1  Using Arduino / General Electronics / Re: Transistor switching circuit instability on: June 22, 2014, 09:42:12 am
I was able to get to it yesterday with my dso nano (thanks kculm!) and pretty easily found a connection fault which was causing the problem (shown attached, blue line).  Thanks all for your input!
Cheers,
John
2  Using Arduino / General Electronics / Re: Transistor switching circuit instability on: June 18, 2014, 09:51:28 am
You need to find out where the oscillating is comming from. It is most likely that it is the other side of the opto isolator, not the bit you have drawn. This can. E caused by faulty components or more likely interference form other controllers. A mains filter on these circuits and the one giving you trouble could help.

By "mains filter" do you mean something like a consumer grade "surge suppressor"?

Thanks,
John
3  Using Arduino / General Electronics / Re: Transistor switching circuit instability on: June 18, 2014, 08:59:14 am
Thank you all for the ideas, I will look into the wiring layout, snubber, and "mains filter".

Cheers,
John
4  Using Arduino / General Electronics / Re: Transistor switching circuit instability on: June 17, 2014, 08:18:52 pm
You could make the 1K into 2 X 4.7k and add a capacitor from the common junction to ground.
Try .1 to 1uf

I think I understand the idea of the cap across the input of the SSR.  But what is the purpose of changing the base resistor from 1k to "2 x 4.7k"?  Do you mean in series (9.4k) or parallel (2.3k)?

Thanks!
John
5  Using Arduino / General Electronics / Re: Transistor switching circuit instability on: June 17, 2014, 05:52:16 pm
Impossible to say from this limited information what the problem is, but why have the contactor? Many, if not most SSRs handle 220VAC. I've been using one with a 220VAC deep well pump for years with no problems at all.

Thanks for your reply.  I used these SSR's because I had them from an old project.

And, I'm not sure about sizing and heat sinking that would be needed for my 2hp pump?   From a bit of googling it looks like I would need an SSR rated for >= 75 amps.  Combined with my <=4ma input requirement, suggests a $80-$100 SSR (Mouser prices).

Thanks,
John
6  Using Arduino / General Electronics / Transistor switching circuit instability on: June 17, 2014, 05:15:29 pm
Attached is a circuit I have been using for a few months to allow a WRT54G wireless router to remotely control a 220v pump motor for irrigation.  (Not Arduino related but...)

Lately I have noticed that it will sometimes spontaneously go from "off" to an "oscillating" state, that is, the contactor turns on and off about 5-10 times per second. 

Is there something I'm overlooking in my calculations or design? 

I think the gpio from the router will source/sink 4ma.

The SSR is an OAC5 http://www.opto22.com/documents/0449_Std_Dig_AC_Outputs_data_sheet.pdf.
It wants input 2.5-8v and 12ma.

It may be a week or two until I can actually go to the location to try and diagnose.  Even then I'm not sure how to diagnose since it is intermittent.  But there is a second pump installation there which uses the same circuit and is not having the problem.  Of course it could be a bad component or a loose connection...

Thanks!
John
7  Using Arduino / Programming Questions / BitSet(N) for large N on: March 10, 2013, 07:37:20 pm
Did I see somewhere here or elsewhere some routines or library for read/write of an arbitrary-large array of "bits".

Something like STL bitset<N> ... I did see that there is an STL port (attempt?) but is it clean/easy to install?  Other alternatives?

Thanks,
John
8  Using Arduino / Programming Questions / Re: Arduino Intervalometer - One Button to Cycle Through Modes on: March 10, 2013, 06:01:46 pm
There are two events that are going on here, so you need two independent parts to your loop code
   * Button Pressed
   * timer has Elapsed

Code:
Pseudocode
loop()
   // Handle the Button Press:
    if the button has been pressed
        increment the mode, or roll over to zero
        set the interval

   // Handle the timer elapsing:
   if mode != 0
         if  ( now - lastPictureTime > interval )
              snap the Picture
              lastPictureTime = now

Hope this helps!
John
9  Using Arduino / Programming Questions / Re: Wierd PID results on: March 10, 2013, 10:18:51 am
Quote
And on the end its like the pid just shutdown itself.

What do you mean by this, it stopped working altogether?  If you post your sketch it would be helpful...
10  Using Arduino / Programming Questions / Re: Wierd PID results on: March 10, 2013, 09:51:45 am
Maybe there is a bug in your code?  Are you using a library, or did you write it?
11  Using Arduino / Programming Questions / Re: Traffic light circuit help? on: March 05, 2013, 05:16:21 pm
Could you use a wire and connect pin 2 to 5V and to GND ?
I can't see what the problem is with the code, so I want to be sure that pin 2 is high and low.

Poor phrasing, that!
12  Using Arduino / Programming Questions / Re: RTC Gurus please Help me on: March 05, 2013, 02:15:54 pm
Looks to me like there should be a Wire.begin() in there...
13  Using Arduino / Programming Questions / Re: Question about sprintf and memory allocation on: March 05, 2013, 11:45:04 am
Code:
void makeText () {
  char myText[4];
  sprintf(myText, "%02d, %02d ",day(),year());
  showDate(myText);
}
...
In the second case it has nothing to do with sprintf.  In the second case you've declared a local variable.  As soon as that function returns that variable goes out of scope.  So you can't use it anywhere else.  The same would happen if it was an intended variable and you had just done a simple assignment.

No, nothing wrong with passing the local variable to another function as in the above code.

The problem is probably putting the 8 characters into the 4 character array.  bratan, you need by my count myText[8] to hold what you're trying to put in there ("11, 22 " plus the end of string character)

Cheers,
John
14  Using Arduino / Programming Questions / Re: RTC Gurus please Help me on: March 04, 2013, 06:04:40 pm
Its the one from adafruit tutorial on github:https://github.com/adafruit/RTClib

If you compare the  "ds1307" example with the "softrtc" example from the library, it will become clear...

You want to use the "ds1307" example.  smiley

Cheers,
John
15  Using Arduino / Programming Questions / Re: Programming Style on: March 02, 2013, 09:54:22 pm
@Lefty:

Oops smiley
Pages: [1] 2 3 ... 24