Recent Posts

Pages: [1] 2 3 ... 10
yes it work very cool
Generale / Re: Scelta cavi per progetto p...
Last post by Claudio_FF - Today at 01:04 pm
Un paio di metri sono una distanza irrisoria, e con le correnti altrettanto irrisorie per quei sensori qualsiasi conduttore va bene. Direi quindi qualsiasi cavetto telefonico / citofonico / audio con almeno tre poli. Se il cablaggio è fisso si possono saldare le estremità isolandole con termorestringente sottile.

Quei sensori effettuano un current sink, quindi chiudono come interruttori verso massa, basta aggiungere una resistenza pull-up da 1k lato arduino.
But I am not aware about is how to transfer the data (sensor value) between microcontroller with I2C or Rx and Tx. (may be Rx and Tx would be the best)
Serial communication has the advantage of familiarity. It also has the benefit that you can easily test the communication with either board on its own using the Arduino Serial Monitor.

I2C or SPI are short range mechanisms - distances measured in centimetres. I have never used I2C but SPI is straightforward.

For Sam boards, a double (= double float)  is an 8 bytes number. Precision with a float is 7 decimals, and 15 decimals with a double.
Have you wanted to mean that double x = 1.25; and double float x = 1.25; are synonymous? Is double float x = 1.25; a syntactically correct declaration?
Microcontrollers / Re: [ ATMega328p ] Implementin...
Last post by Smokehead - Today at 01:00 pm

It seems like the microcontroller is running into the following ISR. After implementing this it seems to do exactly this. It puts on the LED connected to pin PC0. I'm slightly confused. I don't have any other interrupt enabled nor do i have called `sei()` (just for testing purposes).

Code: (Bad Interrupt) [Select]

    PORTC |= (1 << PC0);

I don't know whats happening there. Do Fuses maybe have any influence to interrupt handling? The external crystal oscillator at 16MHz seems to run without any issues. When using the _delay_ms(500) with 500 ms as parameter it toggles the LED 2 times a second which would be correct. I do not have any idea what could cause this behaviour.


Hardware / Re: "Termostato"
Last post by Lianx - Today at 12:59 pm
Quello e' ancora piu semplice ... due pulsanti per impostare la prima temperatura, altri due per la seconda, display centrale per visualizzare quella letta ... piu semplice di cosi da usare, si muore (corna facendo :P :D)
Grazie della conferma. Volevo chiederti un consiglio, ho la possibilita di prenderlo sia a 12v che a 220v come alimentazione. Io vorrei prenderlo a 12v e poi prendere un alimentore-stabilizzatore che da 12v in uscita, cosi da proteggere il termostato da sbalzi o simili. Metto il link del termostato e dell'alimentaore che vorrei prendere. Vorrei un tuo parere/opinione della serie faccio una cavolata a prendere la versione 12v + alimentatore? conviene prendere diretto quello a 220v?? Dove sarà installato non ho grandi protezioni, anzi, diciamo zero. Oppure l'alimentatore che ho scelto non va bene?? GRAZIE mille

Termostato ci sta sia la versione 12v che la 220v


Alimentatore2 forse quello sopra è un pò troppo grande come alimentatore.
Deutsch / Re: Auslegung eines Transistor...
Last post by combie - Today at 12:59 pm
Jeder Stromdurchflossene Leiter bildet ein Magnetfeld aus.
Ist also eine Induktivität.

Heizungen bestehen häufig aus einem gewendelten Draht.
Haben somit auch eine Induktivität, irgendwo zwischen vorhanden, nennenswert und erheblich.

Mit einer bifilar ausgeführten Heizdrahtführung kann das ausgeglichen werden, wird aber meist nur dort gemacht, wo unbedingt nötig, z.B. Hochleistungs Shunts, da konstruktiv viel aufwendiger, als die triviale Wendel.

Die Freilaufdiode ist also kein Fehler.
Vielleicht, in diesem konkreten Fall, ein unnützes Feature.
Aber grundsätzlich, ist es schon erstaunlich, was so manche Heizung, für eine Induktivität aufweist.
I agree with the suggestion to study the concept of "state machine", It is just a rather grand name for using variables to keep track of where you are.

I suspect that your flow chart is not appropriate. in the sense that the sections do not, or need not follow one after the other. ie. all the button1 stuff does not need to be completed before there is button2 stuff. Using a state machine concept will allow the effects of the different user-inputs to be taken into account regardless of the order in which they happen.

It is common for us humans to think of a series of actions in a linear fashion even though, in practice, we often don't do them that way. Getting your head around the idea of asynchronous code can be a little tricky to start with but it will make the whole job much easier. Maybe have a look at how the code is organized in Planning and Implementing a Program

Project Guidance / Re: Current Transformer
Last post by Ceejay90 - Today at 12:58 pm
Big thanks to everyone, I used the ACS712 library and I got positive results, I used the examples in the library

Code: [Select]

#include "ACS712.h"

  This example shows how to measure the power consumption
  of devices in 230V electrical system
  or any other system with alternative current

// We have 30 amps version sensor connected to A1 pin of arduino
// Replace with your version if necessary
ACS712 sensor(ACS712_30A, A1);

void setup() {

  // This method calibrates zero point of sensor,
  // It is not necessary, but may positively affect the accuracy
  // Ensure that no current flows through the sensor at this moment

void loop() {
  // We use 230V because it is the common standard in European countries
  // Change to your local, if necessary
  float U = 230;

  // To measure current we need to know the frequency of current
  // By default 50Hz is used, but you can specify own, if necessary
  float I = sensor.getCurrentAC();

  // To calculate the power we need voltage multiplied by current
  float P = U * I;

  Serial.println(String("P = ") + P + " Watts");

Français / Re: Compte à rebours
Last post by fdufnews - Today at 12:55 pm
Et qu'est-ce qui se passe avec ce code?
Pages: [1] 2 3 ... 10