Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Project Guidance / Re: measuring AC voltage with an analog input pin. on: April 28, 2014, 06:12:01 pm
I like the transformer idea for sure. I just came up with a percentage of 30. Any thing below 95vac (rms) would be concidered a brownout. I was looking to monitor if power was lost or low voltage. I was going to have a battery back up.
2  Using Arduino / Project Guidance / measuring AC voltage with an analog input pin. on: April 28, 2014, 04:58:24 pm
Hi
I'm looking for some help with measuring AC voltage with an Arduino. The normal home voltage here in the USA is 120vac RMS. I'm looking to build a voltage divider the highest voltage would be 156vac (rms) would provide an output of the divider of = 5vdc on analog input pin. The low end 84vac (rms) would produce an output of the divider of 0vdc. I'm planning on rectifying the ac voltage and providing 1/8 amp fuses to protect ac primary voltage. On the dc side I'll have a 5.6v zener to clamp the voltage  30 percent of 120vac is 36 volts so I got 156vac on the high end and 84vac on the low end. I have no idea how to compute the resistor divider. Thanks in advance.
Don
3  Using Arduino / Programming Questions / Re: Ethernet DHCP: How to detect if the cable is connected/disconnected ? on: July 21, 2013, 08:37:35 am
Great idea I could use that to know when my link drops and flag an errror
4  Using Arduino / Microcontrollers / Re: Arduino Mega2560 R3 pinouts photo on: July 21, 2013, 08:30:29 am
I have the (reference to company selling counterfeit product removed by moderator) board too I found it's best to print the schematic to see which pins and ports that where extened to the stackable connector. Im using 6 external interrrupts on mine
Don
5  Using Arduino / Networking, Protocols, and Devices / Re: Server class on: July 04, 2013, 10:46:48 pm
Thanks guys I'm working with 1.0.x also. Don
6  Using Arduino / Networking, Protocols, and Devices / Re: Is there a similar "socket_connect" to Arduino? on: June 30, 2013, 07:40:44 pm
I can work with that. I was planning to send a call sign with the server would compare and allow it to communicate with the server. If it didn't match then issue a client.stop (); function to disconnect.
Thanks Paul I'm looking for project id3as and learn more about ethernet library and the classes in it.
Don
7  Using Arduino / Networking, Protocols, and Devices / Re: Is there a similar "socket_connect" to Arduino? on: June 30, 2013, 02:48:46 pm
Hi question is there a way for the server to know which of the possible 4 clients connection its talking to?
  Could the sever send a message just to one of the connected clients only?
Im working with udp and wondering can I a message to
All ofvthe connected clients?

I've been looking over most of the examples there using get/response webserver type.
Thanks
Don
8  Using Arduino / Programming Questions / Re: I'm looking to convert UTC Time to Central Standard Time used in Chicago on: June 26, 2013, 06:04:54 pm
Thanks Guys-
  For the Library and the statement and I'll check them out thanks for your help !
 Don
9  Using Arduino / Programming Questions / I'm looking to convert UTC Time to Central Standard Time used in Chicago on: June 26, 2013, 05:04:55 pm
Hi
Does anyone have a function to convert UTC time to CST used in Chicago? I was thinking about using an array like this. Is there a easier way to solve this problem?
Code:
byte cstHours = {18,19,20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
Thanks
Don


 
10  Using Arduino / Networking, Protocols, and Devices / Server class on: June 24, 2013, 04:57:57 pm
Hi I was wondering which Server should I be using to create an instance to create a server to listen for udp transfer? What is the difference between them?

this one
Code:
// telnet defaults to port 23
Server server = Server(23);

void setup()
{
  // initialize the ethernet device
  Ethernet.begin(mac, ip, gateway, subnet);

  // start listening for clients
  server.begin();

}

void loop()
{
  // if an incoming client connects, there will be bytes available to read:
  Client client = server.available();
  if (client == true) {
    // read bytes from the incoming client and write them back
    // to any clients connected to the server:
    server.write(client.read());
  }
}

or this one
Code:
EthernetServer server = EthernetServer(23);

void setup()
{
   // initialize the ethernet device
   Ethernet.begin(mac, ip, gateway, subnet);

   // start listening for clients
   server.begin();
}

void loop()
{
   // if an incoming client connects, there will be bytes available to read:
   EthernetClient client = server.available();
   if (client == true) {
     // read bytes from the incoming client and write them back
     // to any clients connected to the server:
     server.write(client.read());
   }
}
Thanks Don
11  Using Arduino / Programming Questions / Re: expressing a statement most compact method on: June 15, 2013, 10:55:02 pm
Didn't think of that one I just happen to pick those pins.

Is there a problem solving in c book anyone can recommend to me so I
Can get more experience solving these type of problems. I feel like Im doing things the hard way kinda step by step. It's very interesting how different people code the same task.

Don
12  Using Arduino / Programming Questions / Re: expressing a statement most compact method on: June 15, 2013, 07:59:10 pm
Thanks Peter H too
13  Using Arduino / Programming Questions / Re: expressing a statement most compact method on: June 15, 2013, 07:41:26 pm
I'm looking to build a binary number of the input pins I listed.
14  Using Arduino / Programming Questions / Re: expressing a statement most compact method on: June 15, 2013, 07:38:57 pm
Thanks John, that's really simply. I struggle the most simple ways of coding my solutions to the task at hand
15  Using Arduino / Programming Questions / expressing a statement most compact method on: June 15, 2013, 07:24:48 pm
Hi
Is there a more compact method of expressing this statement below,  I'm using it to shift the bits 1 position to the left ? bitIndex = bitIndex <<1;

Code:
// sample of code to reading data from a MT8870 DTMF ic

  const byte pins[] = {11,10,9,8};
  byte bitIndex = 1;
  byte val = 0;
  byte data = 0;
  //read the 4 data pins from MT8870
  for (byte i=0; i<4; i++)
    {
      val = digitalRead(pins[i]);
      if (val)
        data |= bitIndex;  
      bitIndex = bitIndex << 1; //shift bits left  
    }
Thanks Don
Pages: [1] 2 3 ... 8