Thursday, April 5, 2012

Keep on turning!

Hey guys!

I'm slowly approaching my goal, step by step.
Once I got the TRIAC to control the motor, I hooked it up to my ultra sophisticated test equipment and it worked! Almost out of the box, if only everything was so easy...
I say that because I had some serious problems with the relays.
They always worked like a charm, until I drove them under charge. Once a 230VAC load was connected, I was able to switch them on and off once or twice, and then everything hung.
The terminal app on my mac was hanging, I was not even able to quit my little serial program with ctrl-c, I had to kill it.
The arduino needed a hard reboot, which means de- and reconnect USB.
And sometimes even the fault current switch went off.
The idea that the relay board may suck to much current came relatively soon and I tried to feed the arduino with external power, up to 12VDC, but nothing went better.
I searched the internet for hours and finally found a manual for my relay board, which of course came without any description.
I have to supply the relay board with external power and now everything works fine.
Oh, and by the way I finally found out what to do to prevent the relays from switching on bootup.
The relays have normally open and normally closed connectors. So when I connected everything to the closed side and booted the arduino they opened. Or the other way. That would mean that I'd have to be super careful about switching on the 230VAC, otherwise I'd have everything going wild.
But thanks to the manual I know now, that I have to put all the digital outputs I use to HIGH in the setup() loop and initialize them after that. I than just needed to inverse the HIGH and LOW command in the arduino sketch, so that 1on switches on and not off...
Everything clear? :)
Well, I think if theres somebody having the same issues like me, he'll find help here and for the others, at least a little picture, where you can clearly see the motor spinning... ;)
Have a nice easter break and a lot of success in finding the eggs, cya soon!

No comments:

Post a Comment