Community Question

So I've just been trying out a 5v relay (with 5v regulator) on port D0 but it's not working as expected. I first tried "Set(D0,on)" and it closed the relay switch. I then tried "Set(D0,off)" and it wouldn't open. I disconnect it from the EZ-B and it opens, plug it back in and it closes again but can't control it from then onwards. I even tried a combined script...

Code:


Set(D0,on)
Sleep(2000)
Set(D0,off)



but no change. I'm I missing something here or is there something else I can try?

Thanks.

User-inserted image

Steve G
Commented March 2015
@Richard.

I found out what the problem was. The regulator I was using (not an EZ-Robot one, but a UBEC one) was labeled incorrectly. Output was input, and visa versa. It works now I have it back to front.

Thanks anyway. An unrelated question, can an ADC port be set to On and Off, and if so, how?
Richard R
Commented March 2015
I made my own 5V regs using LM7805s and some servo extension wire that seem to drive the relay no problem... Maybe there is something different about the ez robot reg? Not sure...
Perhaps you'll be fine without the reg... Like I said the relay wasn't complaining or getting hot when I was using 8V with them.... Besides, they are not all that expensive, so won't be a big deal to replace them should they fail before their MFT (mean failure time).... They are probably good for a few 100,000 relay cycles....
Richard R
Commented March 2015
You can't control an adc port like you can a digital port.... ADC ports are more meant to measure analog voltage levels...
Steve G
Commented March 2015
I thought as much. Just wanted to make sure as I'm running a little short on Digital ports. I just emailed the company selling the UBEC regs telling them they were labeled incorrectly.

Thanks again.
Richard R
Commented March 2015
@Steve... no worries :)
Question
AvatarSteve G
Asked on Tuesday, March 24, 2015