I want to control a dc engine equipped with a comparator system (headlight leveling motor). It has three leads: power supply (12V), signal and ground. To set its position, I just put the appropriate resistor between +12V and ground (10 ohms: pin maximally extended, 150K ohms: pin maximally shortened).
I tried to use Arduino with 2N2222 transistor (NPN). Simplified circuit attached (ultimately a few transistors with different resistors).
Unfortunately, the motor does not respond to the output, although the output resistance varies depending on the active transistor. I would be very grateful for your help.
You tell about a 3 wire motor but to me it looks like a servo. Give us the designation of the motor and a link to the data sheet. The 2N2222 is an NPN transistor. The way You use it it just can't work in my opinion. Explain how You were thinking when You made this diagram. Maybe I'm missing something.
Thank you for your reply. I enclose a photo of the engine, but I can’t find his data sheet. I would like to control it without reworking it. Without going into the motor itself, I am looking for a solution that will allow me to simulate the position of the resistor between two pins. I modeled on the transistor circuit as a switch, I also attach.
flash999: To set its position, I just put the appropriate resistor between +12V and ground (10 ohms: pin maximally extended, 150K ohms: pin maximally shortened).
It does look like it is a servo motor an you are attempting to use transistors to switch in vastly different resistor values. I would say if you are trying to switch in resistor values, you will need logic-level switching FETs rather than bipolar transistors. :sunglasses:
The third diagram suggests some sort of PWM speed control for a brushed motor with no other electronics.
"Sorry, your description as such makes no sense. Purring a resistor between +12V and ground will do nothing. "
You’re right, I made a mistake, the diagram is ok, but I wrote it wrong . All the time I was thinking about the resistor between +12V and the control signal.
“It does look like it is a servo motor an you are attempting to use transistors to switch in vastly different resistor values”
Yes, that’s exactly what the system was supposed to do. I know that such engines can be used as a servo, but I would like to leave it as it is. I do not need exact adjustment, just a few previously defined.
I was thinking about using relays, but probably they will not work in this application.
I’ll read about mosfets.
I separated the motor from the control board. This is a regular DC motor with 12V. It will be much easier to simply control it, because after applying voltage it begins to rotate to one side and after changing the poles to the other. In that case I was thinking about using the L298N control module. However, I see a potential problem, the factory system has a protection that limits the engine only to a certain range of work. The problem is that when disconnecting the power supply, the transmission can be in different positions. The system would have to have a memory of initial and final value and at each start-up go back to the beginning and then start again. Returning to mosfets, I do not understand what such a system would look like, it only looks to me as a more efficient equivalent of transistors.
The memory is most likely the syncronized travel position and portentiometer position. Take a close look att those details!
I know that this visible potentiometer is responsible for the current position of the motor. However, as I mentioned, since it is impossible to use this factory driver in a simple way, I do not want to destroy it and only use the engine that was left with the transmission.
Maybe a good solution would be to use a different potentiometer, read the resistance and, depending on it, turn the motor left or right to the assumed position (until the resistance matches)