Recent Posts

Pages: [1] 2 3 ... 10

1) Does this happen when the dishwasher switches ON?

Yes, when it heat the water at 60°C. Drop from 220V to 210V and "click" on the UPS

2) Can you reset the UNO etc during this approx 1hr of lower mains and it will operate correctly?


It may be 5V at the charger, but what voltage is it at the UNO after going through the Pi.
Don't forget the UNO is supplying the NRF.

3) How have you got the 3.3V configured for the NRF, which NRF is it? From 3.3v itself UNO

4) Have you measured the 3.3V to see how stable it is? NO

5) How much current is the 5V charger supplying? 2A

6) Have you measured the 5V supplies at the Pi, UNO and the 3.3V when your power drops. NO

7) What periferals have you got hanging off the  Pi and the UNO?  I did not understand

8.) What is your UPS? Powerwalker 600VA

You may need a UPS that has a boost/conditioning function, that is its output is set  at 220Vac and the inverter in it keeps the output at 220Vac no matter what the input level is. > It boost the voltage. I read on display 210 IN > 220 OUT. Normal condition 224 IN > 224 OUT

On startup of the dishwasher your mains may be instantly dropping well below 220Vac before settling at 210Vac. > It is possible...

Can you post a picture of your project so we can see your component layout please?

Sure... it's very normal project..... NRF with dupont from UNO. Uno power from USB of PI (I need for serial communication). Power PI from Samsung 5V/2A. Power for Samsung from UPS. Power for UPS from main :)

UPS mantain PC (24'' Led HD, I36100, SSD, 3xhd RED WD, gtx750ti) + router + PI/UNO. PC is low consuming.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

I know its a lot, but we are in troubleshooting mode. :o

Thanks.. Tom.. :)
I am trying to control my office Air Conditioner using Arduino, I am unable to control it. I don't understand what 's wrong with my project .please help to solve my problem.
Component :
IR receiver(TOSP1738):decode AC remote code
IR LED : send IR signal to AC
Arduino uno

1.Decode AC Remote code:

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
  irrecv.enableIRIn(); // Start the receiver

// Dumps out the decode_results structure.
// Call this after IRrecv::decode()
// void * to work around compiler issue
//void dump(void *v) {
//  decode_results *results = (decode_results *)v
void dump(decode_results *results) {
  int count = results->rawlen;
  if (results->decode_type == UNKNOWN) {
    Serial.print("Unknown encoding: ");
    else if (results->decode_type == NEC) {
    Serial.print("Decoded NEC: ");
  else if (results->decode_type == SONY) {
    Serial.print("Decoded SONY: ");
  else if (results->decode_type == RC5) {
    Serial.print("Decoded RC5: ");
  else if (results->decode_type == RC6) {
    Serial.print("Decoded RC6: ");
  else if (results->decode_type == SAMSUNG) {
    Serial.print("Decoded SAMSUNG: ");
  else if (results->decode_type == JVC) {
    Serial.print("Decoded JVC: ");
  else if (results->decode_type == PANASONIC) {
    Serial.print("Decoded Panasonic: ");
  Serial.print(results->value, HEX);
  Serial.print(results->bits, DEC);
  Serial.println(" bits)");
  Serial.print("#define Something_DEC ");
  Serial.println(results->value, DEC);
  Serial.print("#define Something_HEX ");
  Serial.println(results->value, HEX);
  Serial.print("Raw (");
  Serial.print(count, DEC);
  Serial.print("): ");
  for (int i = 0; i < count; i++) {
    if ((i % 2) == 1) {
      Serial.print(results->rawbuf*USECPERTICK, DEC);
    else {
      Serial.print(-(int)results->rawbuf*USECPERTICK, DEC);
    Serial.print(" ");

void loop() {
  if (irrecv.decode(&results)) {
    irrecv.resume(); // Receive the next value

2. Code for sending signal to AC using IR led(IR LED connect to pin no.3):

#include "IRremote.h"

IRsend irsend;

void setup()

int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
// ON and 2O C° with 1 FAN heat
unsigned heat[] = {3000,3000,3000,4400,550,1600,600,550,550,1650,550,550,550,550,550,1650,550,550,550,1650,500,550,550,1650,550,550,550,500,600,500,600,550,550,550,550,1650,500,550,550,600,500,1700,500,550,550,550,550,550,550,600,500,550,550,550,550,550,550,550,550,1650,550,1650,550,1650,500,1650,550,1650,550,550,550,550,550,550,550,550,550,1650,550,1650,550,500,550,550,550,1700,500,1650,550,550,550,500,600,550,550,550,550,550,550,550,550,550,550,1650,500,1700,500,550,550,550,550,550,550,550,550,550,550,600,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,500,550,1700,500,550,550,550,550,550,550,1650,550};
// OFF the A/C
unsigned OFF[] = {3100,2900,2950,4400,700,1500,700,400,700,1500,700,400,650,450,550,1650,550,550,650,1500,600,500,600,1600,600,500,600,500,600,450,650,450,600,550,550,550,550,550,550,600,500,1600,600,500,600,500,600,550,550,500,600,500,600,550,550,550,550,1600,600,500,600,500,600,500,550,1650,550,1600,600,500,600,500,600,550,550,550,550,1600,600,1600,550,550,550,550,550,1650,550,1600,600,550,550,500,600,500,600,550,550,550,550,500,600,500,600,1600,600,1600,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,500,600,550,550,550,550,500,600,500,600,500,600,1600,600,500,600,1600,550,550,550,1600,600,550,550,550,550};
// ON and 23° with 2 FAN cold
unsigned cold[] = {3050,3000,3000,4400,550,1600,600,550,550,1650,550,550,550,550,550,1650,550,500,600,1600,550,550,550,1650,550,1650,550,1650,550,550,550,550,550,500,600,1600,550,550,550,550,550,1650,550,550,550,550,550,550,550,550,550,550,550,550,550,500,600,1650,500,550,550,600,500,1700,500,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,1650,550,550,550,500,550,1650,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,550,550,550,550,550,550,550,550,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,1600,600,550,550};
// ON and 20 C° with 1 FAN heat and SWING
unsigned heat_with_swing[] = {3000,3000,3000,4400,550,1650,550,500,600,1600,600,500,600,500,600,1600,550,550,550,1650,550,500,600,1600,600,550,550,550,550,550,550,1600,600,500,600,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,550,550,1600,550,550,550,600,500,550,550,550,550,550,550,550,550,550,550,1650,550,1650,550,550,550,550,550,1600,550,1650,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,1650,550,550,550,550,550,550,550,550,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,1650,550,1650,500,1650,550,550,550,1700,500};
// ON and 23° with 2 FAN cold and SWING
unsigned cold_with_sqwing[] = {2950,3050,2950,4400,550,1600,600,550,550,1650,550,550,550,550,550,1600,600,500,600,1600,550,500,600,1650,550,1650,550,1600,600,500,600,1600,600,500,600,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,500,600,550,550,500,600,1650,550,550,550,1600,600,500,600,1600,550,1600,600,500,600,500,600,550,550,500,600,1650,550,1600,600,500,600,500,550,1650,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,500,600,500,600,500,600,500,600,500,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,1650,550,1650,550,1600,600,1600,550,550,600,500,550,550,550,550,550};

void loop() {

irsend.sendRaw(heat, sizeof(heat)/sizeof(int), khz);
irsend.sendRaw(OFF, sizeof(OFF)/sizeof(int),khz);

Editor / Re: Unable to connect to ardun...
Last post by swillis - Today at 07:43 am
Maybe I spoke too soon... as I am getting the following error when I try to load Blink (or any sketch):

Executing Command: exec: not started

With the following log:

Flashing with command:D:/Users/willist1/.arduino-create/arduino/avrdude/6.3.0-arduino9/bin/avrdude.exe -CD:/Users/willist1/.arduino-create/arduino/avrdude/6.3.0-arduino9/etc/avrdude.conf -patmega328p -carduino -PCOM10 -b115200 -D -Uflash:w:D:/Users/willist1/AppData/Local/Temp/arduino-create-agent090745184/Blink.hex:i

When I checked the directory D:/Users/willist1/.arduino-create/arduino/avrdude/6.3.0-arduino9/bin does not exist.  However there is a folder D:/Users/willist1/.arduino-create/arduino/avrdude/6.3.0-arduino9

There is no avrdude.exe that I can find anywhere on my pc.  So it looks like the setup process didn't install all the files correctly.  Is there a log file I could look at to check the errors in the setup process?

Or is there a way to manually copy the necessary missing files from somewhere?
Français / Re: Arduino Original versus Ar...
Last post by 3Sigma - Today at 07:39 am

Le sujet a en effet été largement déjà traité. Néanmoins, ce n'est pas binaire comme le titre de ce sujet: il y a également des sociétés qui font des dérivés à valeur ajoutée. Exemple l'Iteaduino Uno qui a un convertisseur de tension, beaucoup plus efficace qu'un régulateur (ainsi qu'un interrupteur 5V / 3.3V).

Donc le choix n'est pas Arduino officiel vs clone, mais Arduino officiel vs dérivé vs clone.
Friend of mine suggested arduino might do this as well.
It does sound interesting, I ordered a starter kit to try.

I'd suggest not worrying about the specifics of your project until you have your mind round some of the examples. (That said, of course you'll keep the project in mind as you work through the examples, and mentally store some thoughts for when you get to the project.)

There are loads of examples here, and they're all repeated in the IDE itself under File > Examples.

Deutsch / Re: Timer1 hadcore konfigurie...
Last post by anwo - Today at 07:37 am
Danke, wenn ich auf einen grünen Zweig komme, poste ich den Code.

Project Guidance / Re: Sending data to a local we...
Last post by PaulRB - Today at 07:35 am
A fridge is normally a metal box. That won't let RF signals out. You will need to get the antenna on the outside of the fridge.

Have a look at my temp/humidity/barometer sensors. They use a remote web server, but might give you some ideas.
Français / Re: aide sur la cinfiguration ...
Last post by adrien38 - Today at 07:34 am

j'ai rajouté les ligne

    const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
    // for your motor
    Stepper myStepper(stepsPerRevolution, 10, 11,8,9);

   et remplacé

    void step() {


oui j'ai déjà fait un branchement simple

mes la si vous regardé la photo

il y a pas de plans de montage pour les pin

je suis alimenté en 12v et pour les LED en USB via l'Arduino

je pense que mon problème vient des branchement  car mon code a pas erreur

entre les pin (Arduino) 11/10/9/8 et  ( l298n) int1 /int2 / int3/ int4

Code: [Select]
// FabScan -
//  Created by Francis Engelmann on 7/1/11.
//  Copyright 2011 Media Computing Group, RWTH Aachen University. All rights reserved.
//  Chngelog:
//  R. Bohne 29.01.2013: changed pin mapping to Watterott FabScan Arduino Shield
//  R. Bohne 30.12.2013: added pin definitions for stepper 4 --> this firmware supports the new FabScan Shield V1.1, minor syntax changes. Steppers are now disabled at startup.
//  R. Bohne 12.03.2014: renamed the pins 14..19 to A0..A5 (better abstraction for people who use Arduino MEGA, etc.)

#define LIGHT_PIN A3
#define LASER_PIN A4
#define MS_PIN    A5

//Stepper 1 comme indiqué sur Shield, Turntable
#define ENABLE_PIN_0  2
#define STEP_PIN_0    3
#define DIR_PIN_0     4

//Stepper 2, Laser Stepper
#define ENABLE_PIN_1  5
#define STEP_PIN_1    6
#define DIR_PIN_1     7

//Stepper 3, actuellement inutilisé
#define ENABLE_PIN_2  11
#define STEP_PIN_2    12
#define DIR_PIN_2     13

//Stepper 4, actuellement inutilisé
#define ENABLE_PIN_3  A0
#define STEP_PIN_3    A1
#define DIR_PIN_3     A2
#define TURN_LASER_OFF      200
#define TURN_LASER_ON       201
#define PERFORM_STEP        202
#define SET_DIRECTION_CW    203
#define SET_DIRECTION_CCW   204
#define TURN_STEPPER_ON     205
#define TURN_STEPPER_OFF    206
#define TURN_LIGHT_ON       207
#define TURN_LIGHT_OFF      208
#define ROTATE_LASER        209
#define FABSCAN_PING        210
#define FABSCAN_PONG        211
#define SELECT_STEPPER      212
#define LASER_STEPPER       11

// le protocole: nous envoyons un octet pour définir l'action à faire.
// Si l'action est unaire (comme éteint la lumière), nous avons besoin d'un seul octet, donc nous allons bien.
// Si nous voulons dire au stepper de tourner, un second octet est utilisé pour spécifier le nombre d'étapes.
// Ces deux octets sont définis ci-dessous.

#define ACTION_BYTE         1    //normal byte, première action nouvelle
#define LIGHT_INTENSITY     2
#define TURN_TABLE_STEPS    3
#define LASER1_STEPS        4
#define LASER2_STEPS        5
#define LASER_ROTATION      6
#define STEPPER_ID          7

int incomingByte = 0;
int byteType = 1;
int currStepper;

    const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
    // for your motor
    Stepper myStepper(stepsPerRevolution, 10, 11,8,9);

//Moteur actuel: tournez un seul pas
void step()

//le moteur actuel pour <count> times
void step(int count)
  for(int i=0; i<count; i++){

void setup()
  // initialiser le port série
   pinMode(LASER_PIN, OUTPUT);
   pinMode(LIGHT_PIN, OUTPUT);
   pinMode(MS_PIN, OUTPUT);
   digitalWrite(MS_PIN, HIGH);  //HIGH for 16microstepping, LOW for no microstepping

  pinMode(ENABLE_PIN_0, OUTPUT);
  pinMode(DIR_PIN_0, OUTPUT);
  pinMode(STEP_PIN_0, OUTPUT);

  pinMode(ENABLE_PIN_1, OUTPUT);
  pinMode(DIR_PIN_1, OUTPUT);
  pinMode(STEP_PIN_1, OUTPUT);
  pinMode(ENABLE_PIN_2, OUTPUT);
  pinMode(DIR_PIN_2, OUTPUT);
  pinMode(STEP_PIN_2, OUTPUT);

  pinMode(ENABLE_PIN_3, OUTPUT);
  pinMode(DIR_PIN_3, OUTPUT);
  pinMode(STEP_PIN_3, OUTPUT);
 //disable all steppers at startup
 digitalWrite(ENABLE_PIN_0, HIGH);  //HIGH to turn off
 digitalWrite(ENABLE_PIN_1, HIGH);  //HIGH to turn off
 digitalWrite(ENABLE_PIN_2, HIGH);  //LOW to turn on
 digitalWrite(ENABLE_PIN_3, HIGH);  //LOW to turn on
 digitalWrite(LIGHT_PIN, LOW); //turn light off

 digitalWrite(LASER_PIN, HIGH); //turn laser on
 Serial.write(FABSCAN_PONG); //send a pong back to the computer so we know setup is done and that we are actually dealing with a FabScan
 currStepper = TURNTABLE_STEPPER;  //turntable is default stepper

void loop()

  if(Serial.available() > 0){

    incomingByte =;
      case ACTION_BYTE:
          switch(incomingByte){    //ce commutateur gère toujours le premier octet
            case TURN_LASER_OFF:
              digitalWrite(LASER_PIN, LOW);    // turn the LASER off
            case TURN_LASER_ON:
              digitalWrite(LASER_PIN, HIGH);   // turn the LASER on
            case ROTATE_LASER: //unused
              byteType = LASER_ROTATION;
            case PERFORM_STEP:
              byteType = TURN_TABLE_STEPS;
            case SET_DIRECTION_CW:
              if(currStepper == TURNTABLE_STEPPER){
                digitalWrite(DIR_PIN_0, HIGH);
              }else if(currStepper == LASER_STEPPER){
                digitalWrite(DIR_PIN_1, HIGH);
            case SET_DIRECTION_CCW:
              if(currStepper == TURNTABLE_STEPPER){
                digitalWrite(DIR_PIN_0, LOW);
              }else if(currStepper == LASER_STEPPER){
                digitalWrite(DIR_PIN_1, LOW);
            case TURN_STEPPER_ON:
              if(currStepper == TURNTABLE_STEPPER){
                digitalWrite(ENABLE_PIN_0, LOW);
              }else if(currStepper == LASER_STEPPER){
                digitalWrite(ENABLE_PIN_1, LOW);
            case TURN_STEPPER_OFF:
              if(currStepper == TURNTABLE_STEPPER){
                digitalWrite(ENABLE_PIN_0, HIGH);
              }else if(currStepper == LASER_STEPPER){
                digitalWrite(ENABLE_PIN_1, HIGH);
            case TURN_LIGHT_ON:
              byteType = LIGHT_INTENSITY;
            case TURN_LIGHT_OFF:
              digitalWrite(LIGHT_PIN, LOW);
            case FABSCAN_PING:
            case SELECT_STEPPER:
              byteType = STEPPER_ID;
       case LIGHT_INTENSITY:       //Après ce point, nous prenons soin du second octet si l'on envoie un
          analogWrite(LIGHT_PIN, incomingByte);
          byteType = ACTION_BYTE;  //reset byteType
        case TURN_TABLE_STEPS:
          byteType = ACTION_BYTE;
        case STEPPER_ID:
          currStepper = incomingByte;
          byteType = ACTION_BYTE;
You will need an input to tell the timer to start the monitoring process.

Good point, possibly I could get that input from its auto on function from PMC, momentary switch.

Machine is a Makino cnc using 24vdc I/O.

Started this out as...
Trying to detect the halt of 3 phase motor.
My first thoughts to precisely fuse one leg, if it stops the rise in current would blow that leg and let overload protector do the rest.

Friend of mine suggested arduino might do this as well.
It does sound interesting, I ordered a starter kit to try.

At a guess, you are not correctly turning the reading from your analog input into an angle.

For more accuracy and less hassle, initialise your lookup table in your setup() using the math functions that come with the arduino. This does mean that some program memory will be consumed by the math functions, but meh. If memory is really tight, then yes you will want to precompute this and put it in progmem instead.

Index your array not by a value in degrees, but by what the reading from your analogIn will be. If you don't want your array to be 2k long (1024 * sizeof(float)), then index your array by what your analog input will be divided by 4, or 8, or some other power of 2. Using a power of 2 means there is less integer division aliasing going on.

Here's a sample sketch. I put a pot on pin A0 to test - seems to work. Or to something reasonable, at least.

Code: [Select]

// we divide the reading on the pot pin by 8 to get an index into this table
float potPin2Cos[128];
float potPin2Sec[128];

void setup() {

  for(int i=0; i<128;i++) {
    // we divide the reading by 8 to pack the gear into our array.
    // So I add 4 to get an angle in the middle of the range
    int reading = i * 8 + 4;

    // in the original code,
    // angle = analogRead(potPin) / 6.0
    // to give an angle in degrees. I will convert this to radians.
    float angle = reading / 6.0 / 90.0 * PI/2;
    potPin2Cos[i] = cos(angle);
    potPin2Sec[i] = 1/potPin2Cos[i];

    if(fabs(potPin2Sec[i]) > 75) potPin2Sec[i] = 75;

    Serial.print(angle / 2 / PI * 360); // convert to degrees for display purposes

uint32_t ms;

void loop() {
  if(millis() - ms > 1000) {
    int reading = analogRead(A0);
    Serial.print(reading/6.0); // convert to degrees for display purposes
    Serial.print(potPin2Cos[reading / 8]);
    Serial.print(potPin2Sec[reading / 8]);
    ms = millis();

-- EDIT --

I could have use the map() function to turn the "reading divided by 8" into "angle measured in radians". Also, for better accuracy you can do a linear interpolation. But, presumably you want speed.
Pages: [1] 2 3 ... 10