Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Germany
Asked — Edited
Resolved Resolved by Rich!

Wireless Cam On Ezb 4.0 Digital Port Question

#### update 02.11.15 ####
resolved by myself

How to programming ON/ OFF for the original EZB 3.0 2.4G Wireless Cam on EZB 4.0.

Step 1:

here ist DJ Sures video:

by the way! you don't need the usb-plug and push-button on camera. so you can remove this big parts from camera-board.

In this video DJ use the usb-plug for powering..
it's one way to do it.




Step 2:

I have fixed the scipt problem!

learning by doing:P

you can activate and deactivate the wireless cam now.

ON:

Code:

Set(D0, ON)


OFF:

Code:

Set(D0, on)
PWM(D0, 90)
sleep (5000)
set (D0, Off)


cheers
Smarty

AI Support Bot
Related Content
Synthiam
#1  
You can't power that camera from the ezb4's digital pins.... the signal pin can only supply 10mA of power, the camera needs way more than that... You may have blown the port attaching the camera to the digital pin. However, if you use a 5V voltage regulator you can use the power pin (red pin) to power the camera... Set (D0, ON) won't work either as it refers to the digital pin not the red power pin. You can use a relay to turn the camera on and off....
Germany
#2  
@Richard R

but it works fine for one hour ^^! I have a perfect video signal.
I activate the cam with D0 but I cannot deactivate it
#3  
I am just warning you that if you are using the white digital pin to power the camera you may blow the port... As mentioned it can only supply 10ma... The camera may need 100mA or more....
Germany
#4  
on EZB 3.0 its perfect running and on EZB 4 too..
my only question is: why I cannot turn off the power from the digital port ?

here ist DJ Sures own video:

User-inserted image

#5  
I just told you why... the digital pin (the white pin, not the red pin) can only supply 10mA of power... however the camera needs way more than that... The red pin has pretty much unlimited power (you still need to regulate however) but obviously can't be controlled using commands like set(D0,ON), etc....

The ezb3 may be able to supply more mA to the digital pins I an not sure, but even an Arduino can only supply about 40mA to it's digital pins if I recall....
#6  
Ok, in that picture the camera is being powered by the red pin... Are you using that same camera and same wiring for the ezb4? Meaning have you wired your camera the same way? Have you regulated the voltage to the camera to 5V?

****Sorry, I was under the impression you connected the camera's power to the signal pin... If you have it wired the same way as DJ did then I will have to let ez robot respond as to why it isn't responding to set(D0,ON) and set(D0,OFF) commands
Germany
#7  
I understand all of your words.. but!
ON/ OFF works on EZB 4.0 with this cam..
I can change the time from 100 to 1500 ml sec ON/ OFF
over 1500 mlsec the cam is always on.. but under 1500 mlsec not..

normally to activate the cam.. you have to push the "on-button" 2 seconds long..
for off - 5 secods.. I think this is the problem..
Germany
#8  
ok, Im just waiting haha:D
but thanks a lot
#9  
One thing to remember is the digital voltage pin of the ezb3 is 5v where as the digital pin voltage of the V4 is 3.3v.... Maybe this has something to do with your issues?...
#10  
You will need to dig through some forum posts to find it, but even with the V3 some people had trouble turning the camera back off using a digital pin. I can't recall the details, but I think there were some workarounds.

Alan
United Kingdom
#11  
The camera from the V3 EZ-B was difficult at the best of times. The on/off was very much time sensitive and varied not just between cameras but sometimes on the same camera.

If having the on/off feature is important then you will need to play around with the timings. We could advise you of our own timings but those would prove to be useless.

Workarounds would be to use a tip/relay circuit to enable/disable the power to the camera rather than to simulate the button being pressed/held. Once the camera is on it generally will remember it's on when the power is disconnected and reconnected. There may be the occasional issue where it will be off when the power is back on but these are rare.

Another workaround is to not use anything to turn the camera on and off, just rely on the Vcc to provide power to the camera whenever the EZ-B is powered. It may waste energy but it saves a lot of headaches.
Germany
#12  
HA!

I have fixed the problem

learning by doing ^^!

you can activate and deactivate the wireless cam now :-)

ON:

Code:

Set(D0, ON)


OFF:

Code:

Set(D0, on)
PWM(D0, 90)
sleep (5000)
set (D0, Off)


cheers
Smarty
United Kingdom
#13  
You may want to have D0 change to off after a period of time for your ON command. I'd guess at around 500ms should do it.

This will avoid issues turning off, since your off script also begins by setting D0 on, which is a redundant command, so the sleep of 5000ms is in effect much longer than 5000ms.

Or begin the Off command with setting D0 to off for a short period before setting on again.

Consider the Set command to be simulating your finger on the button. If you hold it on there while you want the camera to work your off command isn't actually saying "let go of the button before holding it for 5 seconds"

Hope that makes sense.
Germany
#14  
@Rich

the trick is.. you can shut-down the camera only, if you change the power to PWM(D0, 90-95%) and only If the first script entry is "set is on"..
I have two scripts now: one for "on" and one for "off"..
is the camera online and you activate "off".. the video goes offline immediately and after 5 seconds.. the blue lamp from the camera goes off. sleep (5000) is variable.
now, you can do what ever you want.. I activate/ deactivate the camera with voice recognition. all is working fine.

regards
United Kingdom
#15  
From previous experiences with that camera I would strongly advise this... If it's working, leave it well alone!

As I said earlier, that camera is a bit of a funny one at the best of times.

Glad it's working.