Recent Posts

Pages: [1] 2 3 ... 10
1
Project Guidance / Re: Can bus comunication non i...
Last post by sdturner - Today at 01:08 am
I've never seen something like that. Do you lay the CANHI and CANLO wires along the circuit  board and it detects the signals? That looks more like a capacitive coupling. In dominant state your would get a differential voltage on the two capacitors In recessive state they would be at about the same voltage. I would guess it's a FET input amplifier and maybe a comparator to make the signal digital.

The best way to monitor CAN is to electrically connect a CAN transceiver to the CAN lines. On vehicles there is almost always a connector that can be used to connect to the CAN bus. I am less familiar with CAN in industrial settings, but I would guess that a connector or terminal strip would be very common.

You could do it with an inductive sensor, but you'll have to separate the wires and only sense one. If you put an inductive coil or sensor around both wires you won't get any signal.

CAN has about 3V differential in the dominant state, so with a 120 Ohm termination resistor you will see around 25mA of current. That should be detectable with a suitable inductive pickup. The current will be in different directions depending on which side of the sensor the transmitting node is located, so you will want to make your detection circuit respond to either polarity. In the recessive state the current will be very nearly zero so it should be pretty easy to differentiate.
2
Project Guidance / Re: 24 bit ADC w/ GPS timing
Last post by tremmert - Today at 01:08 am
Thanks for all the feedback. 

AWOL: I would prefer to use a Rpi and write the code in Python, but I assumed an Adruino would be better suited.  Reading 2ksps on the Rpi, I was worried that there might be lag/delay.  Thats why I choose the Arduino.  Please correct me if I am thinking wrong....

aarg:  I will take a look and see what Adruinos use a quartz crystal for timing, or look into an external clock.

CrossRoads - The sample rate was chosen based on a professionally designed seismic recording unit (http://www.geospace.com/wp-content/uploads/2015/03/592-02770-01-GSX-Rev-C.pdf)   This unit supports .25ms -> 4ms (4000hz -> 250hz).  So to get the bandwidth that I am interested in, 2000hz would be sufficient. 

Any thoughts/comments on pushing the sampled time synchronized data from the ardunio over to a Rpi via serial?  Reason for this is that once the data is on the Rpi, it would be relatively easy for me to to deal with the data and analyze it.
3
Software / Re: Tren de pulsos
Last post by Lucario448 - Today at 01:05 am
tone genera ondas cuadradas de frecuencia variable; y digitalWrite es tan lento que solo puede conmutar hasta 70 KHz.

Tren de pulsos creo que lo tendrás que implementar por software, porque por hardware lo mejor que puede hacer es PWM de ciclo de trabajo y frecuencia variables.
Para obtener los resultados (creo yo) deseados, tendrás que jugar con los registros PORTx y retardos de precisión (delayMicroseconds).
4
Project Guidance / Re: Garden Sentry
Last post by mewhalen - Today at 01:04 am
yeah, I know I can repeat the code for more sensors and loop through it, but is there a more efficient way?  I was thinking that having the PIR sensors in an array and then reading the state of the sensors in the array and triggering the valves would be better, but I'm not sure how to do that.  Thoughts?

My code, (which I lifted from author: Kristian Gohlke) is below...

int calibrationTime = 30;       

long unsigned int lowIn;         

long unsigned int pause = 5000; 

boolean lockLow = true;
boolean takeLowTime; 

int pirPin = 2;
int valvePin = 13;


void setup(){
  Serial.begin(9600);
  pinMode(pirPin, INPUT);
  pinMode(valvePin, OUTPUT);
  digitalWrite(pirPin, LOW);

  Serial.print("calibrating sensor ");
    for(int i = 0; i < calibrationTime; i++){
      Serial.print(".");
      delay(1000);
      }
    Serial.println(" done");
    Serial.println("SENSOR ACTIVE");
    delay(50);
  }

void loop(){

     if(digitalRead(pirPin) == HIGH){
       digitalWrite(valvePin, HIGH);
       if(lockLow){
         lockLow = false;           
         Serial.println("---");
         Serial.print("motion 1 detected at ");
         Serial.print(millis()/1000);
         Serial.println(" sec");
         delay(50);
         }         
         takeLowTime = true;
       }

     if(digitalRead(pirPin) == LOW){       
       digitalWrite(valvePin, LOW);

       if(takeLowTime){
        lowIn = millis();   
        takeLowTime = false; 
        }
       if(!lockLow && millis() - lowIn > pause){ 
           lockLow = true;                       
           Serial.print("motion 1 ended at ");      //output
           Serial.print((millis() - pause)/1000);
           Serial.println(" sec");
           delay(50);
           }
       }
  }
5
Gigs and Collaborations / Re: Help with clock project
Last post by PaulRB - Today at 01:01 am
Quote
While most solid state relays are made to control AC, a DC version has been available for many decades.
My apologies, I've only ever seen the AC kind. If janexx can find a suitable one, it would save a little soldering. But soldering up a mosfet and a couple of resistors and some screw terminals is no big deal if you can't find one.

I've not heard of an rtc that has automatic daylight savings correction either. But it's not that hard to get the Arduino to perform this logic, I have suitable code that I have used before, and I'm sure I'm not the only one who does!
6
Software / mover motores PAP simultáneame...
Last post by darioreyes - Today at 01:00 am
HOLA gente estoy tratando de hacer un proyecto para mover motores simultaneamente a diferentes velocidades y direcciones, lo que he logrado es moverlos al mismo tiempo pero en igual velocidad y direccion , aqui miestro el codigo, los 2 motores estan conectados a drivers a4988


#define VELOCIDAD 1700


int steps = 2;
int direccion = 3;
int steps1 = 6;
int direccion1 = 7;
int reset = 10;
int pasos = 1500;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(steps, OUTPUT);
  pinMode(direccion, OUTPUT);
  pinMode(steps1, OUTPUT);
  pinMode(direccion1, OUTPUT); 
  pinMode(reset, OUTPUT);
}

// La rutina de bucle se ejecuta una y otra vez para siempre:
void loop() {
  digitalWrite(reset, LOW);    //Mientras reset este en LOW el motor permanecerá apagado y no sufrirá. El chip apagará todos los puertos y no leerá comandos.
  delay(100);
  digitalWrite(reset, HIGH);   //Cuando reset se encuentre en HIGH el motor arrancará y leerá los comandos enviados.


 
  digitalWrite(direccion, HIGH);
  digitalWrite(direccion1, LOW);
   

  for (int i = 0; i<500; i++)       //Equivale al numero de vueltas que quiero que haga. sabiendo que int pasos en 1500, 1500 seria el maxmo
  {
    digitalWrite(steps, HIGH);  // TEste cambio BAJO a ALTO es lo que crea la
    digitalWrite(steps, LOW); // al A4988 de avanzar una vez por cada pulso de energia.
    digitalWrite(steps1, HIGH);  // TEste cambio BAJO a ALTO es lo que crea la
    digitalWrite(steps1, LOW); // al A4988 de avanzar una vez por cada pulso de energia.   
    delayMicroseconds(1000);     // Regula la velocidad, cuanto mas bajo mas velocidad.

  }
 
  digitalWrite(reset, LOW);   //Mientras reset este en LOW el motor permanecerá apagado y no sufrirá. El chip apagará todos los puertos y no leerá comandos.
  delay(100);
  digitalWrite(reset, HIGH);   //Cuando reset se encuentre en HIGH el motor arrancará y leerá los comandos enviados.



 
  digitalWrite(direccion, LOW);
  digitalWrite(direccion1, HIGH);

 
  for (int i = 0; i<pasos; i++)       //Equivale al numero de vueltas (200 es 360º grados) o micropasos
  {
     
    digitalWrite(steps, LOW);   // LOW to HIGH hace que el motor avance ya que da la orden
    digitalWrite(steps, HIGH);    // al A4988 de avanzar una vez por cada pulso de energia.
    digitalWrite(steps1, LOW);   // LOW to HIGH hace que el motor avance ya que da la orden
    digitalWrite(steps1, HIGH);    // al A4988 de avanzar una vez por cada pulso de energia.
    delayMicroseconds(VELOCIDAD);         // Regula la velocidad, cuanto mas bajo mas velocidad.
  }

 
}

 
7
I would use an Arduino Leonardo or Arduino Micro to emulate a keyboard and send some shift keys.  The processor on the Arduino UNO doesn't have the USB hardware necessary to support the Keyboard library.
8
Generale / Re: Daq 4 a 8 sensori di forza...
Last post by aldoz - Today at 12:59 am
non sono un esperto ma di ampere in quel circuito ne scorrono davvero pochissimi millesimi o forse anche milionesimi... posta il codice che forse l'errore è li. Altra cosa forse voluta forse no, mettendo due sensori in parallelo non hai modo di capire quale delle due viene premuta.
Ciao eh si ne scorrono pochissimi ma l'Arduino ha dei limiti precisi se ricordo bene 15ma.

Con 4 sensori nessun problema e il codice e' un semplice :

Quote
fsrReading1 = analogRead(fsrAnalogPin1);
    fsrReading2 = analogRead(fsrAnalogPin2);
    fsrReading3 = analogRead(fsrAnalogPin3);
    fsrReading4 = analogRead(fsrAnalogPin4);   
il fatto che non si possa sapere quale dei due sensori della coppia stia premendo non mi preme.
Mi serviva solo aumentare la superfice sensibile.


La domanda rimane.. sarebbe il caso di utilizzare resistenze maggiori?
9
General Electronics / Re: Logic level shifting with ...
Last post by Wawa - Today at 12:52 am
here is the funny thing. if I wire just one using 3v3 logic 3v3 to VCC and 5v to JD-VCC it works about 80% of the time. the LED blinks on and off 100% of the time, but the coils tap about 80% of the time.
Did not see a link to the relay board yet.

Common relay boards have an opto LED, an indicator LED, and a 1k resistor in series.
One end connected to VCC, the other end connected to a relay input.
The opto LED and indicator LED have a combined Vf of about 3volt.
With a 1k CL resistor, this results in 0.3mA LED current.
Enough to see the indicator LED, but not enough to drive the opto coupler.
Leo..

 
10
Project Guidance / Pc wake using USB Arduino UNO
Last post by hawkt1 - Today at 12:51 am
Firstly is it feasible, can I wake my pc using a USB lead with and Arduino UNO?

Are there any goood examples out there?

Would USB be ok or lan shield better?

Just after some advice to start with, many thanks
Pages: [1] 2 3 ... 10