One of our projects was to design a pan and tilt device (Relatively old) using an OpenMV Cam and Arduino uno. The motors in the current pan and tilt uses voltage to trigger certain directions it has to move, it has a separate wire for each of the directions it can move. Our project was to interface the openMV cam so that it can track either IR light or colours. Any help for possible schematics or code i could use to actuate the pins of the arduino would help alot.

Ah, I see. So, for these DC motors... Can you tell me how you go about holding the pan and tilt device in one position with them? Do you have some type of feedback on the motor position to close a loop? If so, then you'll want an Arduino for the motor control.

As of right now, its just a normal dc motor. We were thinking of using an arduino chip because we arent allowed to use a development board. Only problem is reading the values for x and y in the face detection or colour detection program and outputing it to the motors. is there any way of maybe getting an output voltage on one of the pins of the OpenMV Cam? The voltage could tell the motor when to go high and low. I tried looking online for solutions, but ive only gotten servo motor examples. I have until the 27th to develope this systems and its tedious not having any guide towards solving the problem.

Thank you, looked at it.. I have another question; How do i send a 3.3V signal to a relay that's going to be used to actuate the pan and tilt(pan and tilt moves when 24VAC is sent to one of the 6 pins). I want to send a signal to the relay that triggers the pan and tilt device to move. Each pin moves the pan and tilt differently i.e Green(Up) White(Down) Red(Left) and Blue(Right). So depending on whats being tracked it'll move the device accordingly. We're also thinking about using AprilTags since it can track further without inteferences from light etc.
Some help on this would be appreciated.

Thank you so much.. do you maybe know what 4 pins i can use on the OpenMV Cam? Also how do i make the pins HIGH for framerate? Can you maybe give me an example.. Apriltag tracking is a success. Now i need to trigger the corresponding pin.

Wow didn't even think of getting a position using the difference in edge to the rectangle. Some clever thinking and then setting the pin HIGH according to those measurements. Thank you. Im going to try and connect a few Relays to pins. The Pan and Tilt will use the 24VAC from Transformer to move the motors accordingly. Im going to attemp some PID control to feedback information to the OpenMV Cam.

It works perfectly. I got 3.3V relays.. the open mv cam outputs 3.3 V which is correct, the relay should trigger, but the current is too small (0.6A). I need it at atleast 0.8A to make the relays trigger. I have to build a circuit that can boost the current of the input that goes to the 3.3V relay. Researching Transistors to maybe draw current from a source.Or even draw the circuit to ground and source it from there. Transistors seem like the best option. What do you think?

Very standard circuit. The diode is there to dealy with something called back EMF which is produced when the relay turns off. Coils of wire tend to dump a massive negative voltage onto the power rails when they switch off so the diode absorbs that.

Ive seen those examples online. Thats where i got the idea for Transistors. But does this example solve the problem of Current? I see the emitter of the Transistor goes straight to ground. and voltage is being dropped before the transistor. Since V = IR, wont I also become smaller because of the resistors? Just curious about how it switches a 3.3V

Okay Im going to have to Amplify the signal being sent from the OpenMV Cam (3.3V and 0.05A). Hoepfully I'll be able to get it to the desired 3.3V and 0.08A. Thanks. This is the last part of the project, then it should work 100%. Will upload a video as soon as its done.

I used the above circuit. With a 1k Resistor.. But for some reason when i rebuild the circuit. The relay switches once and not again, Im using a 7V battery as the VSS and 3.3 as the input at v1. I have the 2N2222 Transistor connected correctly, but im not sure why it only triggers the relay once and not again when i move the apriltag infront of it, because i am getting 3.3 at the output.

Some help would go a real long way since this is the last problem we're having.

Thank you so much for the assistance on the project. Will upload a video to youtube soon, if Im allowed to put OpenMV on the web. Full credit will be given to OpenMV. In the final testing stages and handling the fact that our circuit is drawing abit too much current.

Circuit is working, only problem we're having is the circuit is drawing too much current. ANY Ideas to how this can be solved? Our transformer gets hot and starts smoking, the rating on the transformer is 4A at 24VAC.

Okay i'll give that a go.. When the pan and tilt gets power, it moves.. but as soon as i hook up a normal closed Relay, it gets the transformer overheating. When i connect it in Normally Open, it does nothing, because i cant switch the coil of the relay, so the pan and tilt moves on its own, counter clockwise. Didnt know it might be a programming problem, thought maybe it was a hardware malfunction. What do you think would be an ideal deadzone?

Thank you very much for the help with this project, its giving me sleepless nights.

Okay i'll play around with the value. But I havent connected my OpenMV Cam to the pan and tilt yet. Im running the Pan and Tilt without the camera. First testing relays, but thats when the transformer gets hot. As soon as i can get the relays running in NC i'll hook up the OpenMV Cam.