Recent Posts

Pages: 1 ... 8 9 [10]
91
General Electronics / Ultrasonic Transducer: How do ...
Last post by heyarn - Today at 03:10 am
Hi Guys,

does anyone have experience with this ultrasonic transducer that I got online? Here's the source: https://www.aliexpress.com/item/110V-100W-40K-Ultrasonic-Cleaner-Power-Driver-Board-1PCS-60W-40K-Transducer-For-Ultrasonic-Cleaning-Machines/32730395243.html?spm=2114.13010608.0.0.7m8Wir

I received it with no instructions at all. The site I got it from shows pics, but have no clue if those are instructions, or just pics with wires seemingly attached to the module.

I hope someone could help with these questions:
how do I hook up the transducer to the board?
how do I power the board?
how thick should the sheet metal be to work with this transducer?

Thanks in advanced guys! :)
92
Hello! I am making a circuit of LEDs that respond to MIDI messages using an Arduino Uno. I wish to have each LED correspond to a musical note contained in the MIDI file. Here is the code I am using:
Code: [Select]

<pre>/*Receive MIDI and check if note = 60
By Amanda Ghassaei
July 2012
<a href="https://www.instructables.com/id/Send-and-Receive-MIDI-with-Arduino/">

https://www.instructables.com/id/Send-and-Receive-...>

 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.

*/

byte commandByte;
byte noteByte;
byte velocityByte;

byte noteOn = 144;

//light up led at pin 13 when receiving noteON message with note = 60

void setup(){
  Serial.begin(31250);
  pinMode(13,OUTPUT);
  digitalWrite(13,LOW);
}

void checkMIDI(){
  do{
    if (Serial.available()){
      commandByte = Serial.read();//read first byte
      noteByte = Serial.read();//read next byte
      velocityByte = Serial.read();//read final byte
      if (commandByte == noteOn){//if note on message
        //check if note == 60 and velocity > 0
        if (noteByte == 60 && velocityByte > 0){
          digitalWrite(13,HIGH);//turn on led
        }
      }
    }
  }
  while (Serial.available() > 2);//when at least three bytes available
}
   

void loop(){
  checkMIDI();
  delay(100);
  digitalWrite(13,LOW);//turn led off
}


As you can see, this code is not my own; it was made by Amanda Ghassaei. I am following her instructable starting at this step. In the test code from the instructable (the code above), an LED at pin 13 flashes on and off when the Arduino Uno receives note "60".

What I want to happen: I want to duplicate this process, so an LED at pin 12 flashes on and off when receiving MIDI note "59", and an LED at pin 11 flashes on an off when receiving MIDI note "58", and so on with pins 2-10 and MIDI notes "57-49" in addition to the LED at 13.
 
What I tried to do: I tried to copy and paste the code below the original code as a test to see if I could get the program to work with one additional LED. In the copied and pasted portion, I changed "if (noteByte == 60 && velocityByte > 0)" (which checks to see if the MIDI note is 60) to "if (noteByte == 59 && velocityByte > 0)" so it would instead check to see if the MIDI note was 60 or 59. I also changed "pinMode(13,OUTPUT); digitalWrite(13,LOW);" and "digitalWrite(13,HIGH);//turn on led" and "digitalWrite(13,LOW);//turn led off" to "pinMode(12 OUTPUT); digitalWrite(12,LOW);" and "digitalWrite(12,HIGH);//turn on led" and "digitalWrite(12,LOW);//turn led off", which would turn on an LED at pin 12 (if the MIDI note was 59).
 
What I thought would happen: The Arduino would turn on and off an LED at pin 13 if the MIDI note was "60", and an LED at pin 12 if the MIDI note was "59", each LED acting individually from each other.

What actually happened: Only the LED at pin 13 would turn on, and that would only happen if both notes 60 and 59 were sent to the Arduino at the same time. Nothing would happen if I sent only note 59 or 60, meaning neither LED would turn on if I I sent the notes individually.

Essentially, my problem is I can not individually control outputs when MIDI notes are received by the Arduino Uno.
93
Deutsch / Steuerbefehl per Ethernet an A...
Last post by raspido - Today at 03:09 am
Hey Leute,

ich habe eine Frage, wie kann man am einfachsten einen Steuerbefehl an den Arduino senden? Also in der Form: "Ausgang 1 einen Impuls (kurz einschalten)" bzw. "Ausgang 2 einen Impuls".

Ich habe ein Arduino Uno mit Ethernet-Shield, an dem zur Zeit eine Relaiskarte befindet und ich möchte diesen Arduino ansprechen. Bzw. es soll eigentlich nur so einfach wie möglich ein Kommando an den Arduino gesendet werden, worauf er lediglich reagiert.

Kurz zu dem was ich vor habe. Ich habe eine Anlage (etwas Älter aber top Sound), an der befindet sich ein Taster um diese ein und aus zu schalten. Diese wird über eine geschaltende Steckdose ("Automatisch" über ein Relais durch den Raspberry Pi in der Unterverteilung) mit Strom versorgt und um unnötigen Standby Strom zu vermeiden, schalte ich diese dann aus.

Soweit so gut, aber wenn ich die Anlage wieder einschalte, möchte ich gerne, dass die Anlage nicht nur an geht sondern auch in den "Aktiven Modus" ist. Also möchte über ein kleines Relais (ist 230V geeignet), welches Parallel zum Taster angeschlossen ist den Taster betätigen. Und dafür wäre es eigentlich ausreichend wenn man per Telnet (Arduino wenns geht nur als Client für Telnet, wenn er trotzdem Daten empfangen kann und so.) oder sowas (weiß nich was da so geht) einfach ein Befehl an den Arduino schickt und Los geht's. Oder einfach formuliert, ich möchte meine Anlage ein wenig "Smarter" machen.  8)

Ich hoffe man versteht was ich meine und man kann mir helfen.

Ich weiß, eigentlich ist der Arduino damit mehr als unterfordert und auch eigentlich nicht dafür gedacht, aber das ist ein anderes Thema eigentlich.



Michael
94
I was thinking something like..as the bytes only can be sent one at a time, maybe I should make it into an array which i loop through and send, then set something like 0 as the start transmission and 9 as the end and anything in between is slave addresses.
95
Proyectos / Re: Comprobador de caudal de g...
Last post by surbyte - Today at 03:04 am
Puede ser.. se me ocurrió pero a corta distancia el sensor ultrasónico no responde bien. hablas de muy pocos cmts.
La idea mas fácil sería que mida el recipiente que contiene el grano y cuando se quede sin grano con un margen es que no tienes mas.

No recuerdo si puede medir desde 0 cmts.

Consultando algunas especificaciones encontré que mide desde 2 cmts a 4 mts.
Lo que te obligaría a ponerlo desplazado en 2 cm como mínimo.
96
1. Please edit your post to use code tags.
2. I can't watch the video right now, so I don't have any specific advice for you.
3. Your question seems to be "If I run in full step mode, I get a different result to 1/8 step mode?" My answer to this is "Yes. You do get a different result."
97
So notafter all.

No wonder I am confused
I was talking about the code that I needed, which was the subject of this topic. :)
98
Proyectos / Re: Control de consumo energia
Last post by surbyte - Today at 03:00 am
Si.. estudiando arduino, Visual Basic 2015, redes, SQL, etc.

Dime y ahora dejo la ironía, que sabes de todo el background necesario para este proyecto?
99
Yes, but a solid state relay won't provide speed control.
100
Software / Re: Leer bancos de memoria SD
Last post by surbyte - Today at 02:58 am
Olvida WProgram hasta donde yo se, puedes prescindir.
Solo comentala.

Otra sugerencia. Si miras SD.h seguramente existe el bajo nivel que permita un acceso a nivel de sectores.
Tal vez sean procedimientos privados para la clase asi que podrias crear una librería propia donde estos procedimientos sean públicos.

Aca otro hilo que merece leerse.

El anterior hilo que te sugerí esta pensado para IDE 1.0.X ojo!!! no me había percatado de ese detalle. Te dará muchos dolores de cabeza.


EDITO: He modificado la librería eliminado WProgram y agregando Arduino.h y compila.
Te dejo la prueba con la SD a ti.

La adjunto para que tengas el archivo ejemplo y las librerías todo para una prueba.
Pages: 1 ... 8 9 [10]

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy