Bem bacana, parabéns pelo projeto... Estou tentando fazer +/- a mesma coisa para o meu apartamento(quando ficar pronto).
Meu maior problema é fazer caber tudo dentro das caixas de interruptor. Posso te perguntar como você colocou os relés dentro das caixas de interruptor de luz? Tipo, uma caixa com 2 interruptores(uma sala por exemplo para acender 2 tipos de luzes diferentes), os 2 relés couberam dentro da caixinha? Minha maior dôr de cabeça por enquanto é esta. Eu vou trocar os interruptores por push-button's e led's de estado(para saber se ta ligado ou desligado) e os relés vão ficar dentro das caixinhas. Se der para colocar fotos seria melhor.
Outra coisa, qual a distância +/- do seu maior fio do arduino para o relé? Você chegou a ter problemas de perda de voltagem ou interferência por causa do comprimento do cabo?
Em algum dos interruptores eu perdi um bom tempo acomodando os fios junto com os relés, mas entraram todos na marra mesmo. O fio pode ser bem comprido... Eu comprei 15 m e lembro de ter testado antes de cortá-los e funcionou. Não medi a atenuação, mas sei que os 15m não foram suficientes pra parar de funcionar.
Nem me preocupei com a interferência porquê pus nenhum fio em paralelo com outro que passe muita corrente como por exemplo chuveiro elétrico e etc. Mas mesmo assim não sei se o ruído dos 110V ia atrapalhar, já que pra alimentar o relé é um sinal contínuo. É uma boa coisa a se testar
I think the best method should be to add a lot of time (usually possible with only start button) and cancel after an arduino count. It saves you from having to press a lot of numbers.
Thinking about how to automate my microwave, I concluded that there is no such way unless you remove the buttons panel and risk to screw it all... So I chose the hard way, just for fun I liked so much the gadget I made that I decide to make a video.
I find out that the problem was with the circuit of the microcontroller I was testing. I used an xbee breakboard (that also has a FTDI) to continue the work and it stopped working either.
Unfortunately something wrong happened to that circuit and it cost me 2 FTDIs =/
Well, my Arduino suddenly stopped working and now the leds Rx and Tx are always on. On USB or external power supply, they're always on.
When it happened I was doing a series of tests in a circuit, changing the Arduino supply from USB to 12V and sometimes both connected. I've already connected both supplies together and anything never happened. And I've been using the 12V source for a while, it's trully 12V and never ever happened before.
There is an important detail: I was using the board without the ATmega, just as a serial bridge to other microcontroller (a 3.3V one). I removed the Atmega328 and connected the Tx and Rx pins of the microcontroller to the board. I just made a circuit to lower the 5V from the FTDI to 3.3V. It worked all the day but suddenly stopped working.
Sadly, I think the FTDI cooked, but I don't know why
Well it is your sketch, and your free to show what parts of it you wish.
I hope you didn't get me wrong. I didn't show the rest because it was not my creation. (I adapted from Lauszus post, which adapted from another project)
It reads the inclination angle data given by the accelerometer and gyro, applies Kalman Filter to best predict the real inclination and write to the servo motors the inverse angle to compensate the inclination.
Then I basically used the same code, just adapting it to write the angles to the servos:
// added in the beginning: #include <Servo.h> Servo servo1; Servo servo2;
// added in setup: servo1.attach(6); servo2.attach(9);
// added in the end of loop() function: servo1.writeMicroseconds(1560-yAngle*9.55); servo2.writeMicroseconds(1510+xAngle*9.55);
Where 1560 and 1510 are the values corresponding to the center position of my servos and yAngle and xAngle varies from -90 to +90 and are scaled to fit the observed servo limits.
Ok, in truth it's not exactly that, but that's the nickname it got.
It's a self-stabilizing platform. It doesn't matter the angle you put the lower platform in, the upper platform will ever stay in the horizontal position.
I used the method from this post, by Lauzsus, and adapted to my needs, including the servo motors.
retrolefty, Thanks for the advice, I will for sure do all the tests I can before start flying.
Frank, about my controller, I'm searching for a RC simulator to test on PC before flying the real Quad. Just if it looks acceptable I'll try for real. My controller I'll do myself.. I'll add analog sticks and the "motion sensitive flying" will be just a mode of operation that I plan to be switchable while in flight, but the main control setup will be by the sticks.