Getting an Opticoupler to work.

Thread Starter

MB107

Joined Jul 24, 2016
400
Or leave it at 5 volts. The Nano33 has a 5 volt output pin. Your choice.
It does but apparently in order to use it, it needs to be powered up by the USB port. Its for an automotive application so I would prefer to use automotive type connectors. If I left the usb accessible someone would surly try to plug there phone into it.:)
 

djsfantasi

Joined Apr 11, 2010
9,237
That certainly simplifies it.
Thanks
The upper supply voltage is 20V, not 21V. In an automotive application, you should design for 13.8V which is less than 20V and it is regulated down to 5V by an onboard regulator which should handle that maximum voltage.

So any pre-regulation is overkill.
 

sghioto

Joined Dec 31, 2017
8,634
The upper supply voltage is 20V, not 21V
According to the Tech specs for the Nano 33 IoT or the Nano 33 BLE it's 21 volts.
The Nano regulator uses a MPM3610 step down converter module which specifies a 21V limit.
I noticed the output pins are only rated for 7ma but the Nano 33 BLE is rated 15 ma. Either should have no problem driving the two transistor inverter circuit.

Arduino Nano 33 IoT specifications
MicrocontrollerSAMD21 Cortex®-M0+ 32bit low power ARM MCU
Operating voltage3.3 V
Input voltage (VIN)5-21 V
DC current per I/O pin7 mA
CPU flash memory256 KB
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
According to the Tech specs for the Nano 33 IoT or the Nano 33 BLE it's 21 volts.
The Nano regulator uses a MPM3610 step down converter module which specifies a 21V limit.
I noticed the output pins are only rated for 7ma but the Nano 33 BLE is rated 15 ma. Either should have no problem driving the two transistor inverter circuit.

Arduino Nano 33 IoT specifications
MicrocontrollerSAMD21 Cortex®-M0+ 32bit low power ARM MCU
Operating voltage3.3 V
Input voltage (VIN)5-21 V
DC current per I/O pin7 mA
CPU flash memory256 KB
Sorry, I checked the wrong model.

Absolutely correct!
 

Thread Starter

MB107

Joined Jul 24, 2016
400
The opto requires more current to operate efficiently. The transistors can handle more current and much less load on the Arduino.
So I'm starting to learn quite a bit here and I see your point. With the circuit you provided using the 10K resistor the Arudino is only putting out about 1/2ma vs 10ma with the opticoupler. But I was successfully able to replace transistor Q2 with the opticoupler and reduce R2 to 330Ω, which left the Arduino IO pin 9 still at 1/2 ma and placed the 10ma for the opti on the 5V pin, which if its like the Uno is rated at 500ma. For the RoboRed I'm currently using the 5V pin is rated at 2000ma. I cant find the 5 or 3.3V pin currnet limits for the Nano. I'm all about reliability so I'm wondering what your thought are in using the opticoupler in place of Q2. I also found that I can switch the sense of direction by replacing Q1 with a 2N3096 PNP transistor.
 

sghioto

Joined Dec 31, 2017
8,634
I really do not understand why you seemed determined to use an opto in this application. It doesn't provide any additional benefit and is not near as efficient as the transistor circuit. An opto is generally used for isolation between circuits but sense the Arduino is powered by the same source as the fan there's no need for it. Now if the Arduino was powered by a separate power source that required isolation then YES but this is not the case.
You said in post #1 " However I am concerned about the power being pulled directly from the PWM output pins. " which is the whole subject of this thread.
The transistor circuit has reduced the current draw on the PWM output to less then a milliamp so mission accomplished.
I don't see how I can assist any further or improve on this simple circuit, others may disagree. If this was my project this is how I would go about it but it's your project and you can do it however you like I'm certainly not offended and good luck.
 
Last edited:

Thread Starter

MB107

Joined Jul 24, 2016
400
I really do not understand why you seemed determined to use an opto in this application. It doesn't provide any additional benefit and is not near as efficient as the transistor circuit. An opto is generally used for isolation between circuits but sense the Arduino is powered by the same source as the fan there's no need for it. Now if the Arduino was powered by a separate power source that required isolation then YES but this is not the case.
You said in post #1 " However I am concerned about the power being pulled directly from the PWM output pins. " which is the whole subject of this thread.
The transistor circuit has reduced the current draw on the PWM output to less then a milliamp so mission accomplished.
I don't see how I can assist any further or improve on this simple circuit, others may disagree. If this was my project this is how I would go about it but it's your project and you can do it however you like I'm certainly not offended and good luck.
The only this I am really concerned with is 20 year old fans leaking transient high current back up the control wire. The fans are known to not be reliable and the fan controller resides inside a motor on a 125 amp fuse.

I thought I was on two separate power sources 5V for Arduino and 13.8V for the fan. I understand that further up stream they are all running off the car battery. But I thought that was the case for most electronics. The first transistor eliminates the high current at the PWM output pins in both cases.
 

sghioto

Joined Dec 31, 2017
8,634
The fans are known to not be reliable.
In what way? Is it the control circuit, the motor or both? Probably not much you can do about that. I'm curious, if you use the Nano to control the Fan what tells the Nano what speed to operate the Fan?
 

Thread Starter

MB107

Joined Jul 24, 2016
400
In what way? Is it the control circuit, the motor or both? Probably not much you can do about that. I'm curious, if you use the Nano to control the Fan what tells the Nano what speed to operate the Fan?
Not sure what causes it, but they are packing about 3/4 HP into a small lightweight motor/controller assembly. The controller which is the main engine computer very rarely fails. That is what I'm trying to replace with the Nano. Essentially make a stand alone fan controller for older cars that don't have an electric fan. The controller withing the motor, the one I have been feeding signal to with the Arduino is integrated into the motor itself. I'm not sure if the motor itself fails or the controller within the motor. But when it fails the repair is to replace the whole motor controller fan assembly.

The main engine computer which will be replaced by the nano receives signals from a thermister in the engine block and a pressure sensor in the AC high pressure refrigerant line. These signals will now be fed to the nano in place of the pot shown in my original diagram.

There is not much I can do to help the reliability of the MB fan assembly. But the intent is to make sure the MB fan doesn't take out the controller with it.
 

Thread Starter

MB107

Joined Jul 24, 2016
400
Worst case scenario it might take out the transistor circuit, the Nano should be isolated enough.
The end product will be a Nano or something similar soldered to a PCB along with all the other components. To a hobbyist replacing a $0.25 transistor is not a big deal but to the average end user, for a part < $200 this would mean working under a dash to remove and replace the whole unit, Nano and all. Its easy for an end user to replace an MB fan with a world wide dealer parts network. But this product will be made and install by me, in maybe 5 cars or so and possibly offered as a controller for people who want to put the newer electrical fans in any other older car. They will not be readily available so a transistor failure would put a vehicle down for some time. Limiting failure modes to the MB fan itself has very big logistical benefits.
 
Top