FIT0381 and Arduino

Hello,

I am currently doing a project for school where I use a PIR Motion Sensor and a FIT0381 Super Bright LED to send a flash to nearby pedestrians when motion in a driveway (a car) is sensed (reversing).

I was wondering how to make the FIT0381 (10W Super Bright LED - RGB Australia) compatible with my Arduino Uno board as it is not as straightforward as the standard LED I was using to get the Motion Sensor part of the code up and running.

Any help is greatly appreciated as a standard LED will not be bright enough for my project.

Regards,
Kooper

3 Likes

Hi Kooper
Simple way out is to use a Mosfet switch. Core have one mounted on a little Freetronics board SKU CEO 4538. You will still need a suitable current limiting resistor. Connect Gate directly to Arduino I/O pin.
Cheers Bob

2 Likes

This super bright LED can damage your eyesight if looked at directly for long enough.
I have a 3W one that IMHO is too bright for indoor use, other than a simply flash.

As you are using it outdoors and only to flash it should be ok.
Just don’t look directly at the LED when testing your circuit.

Also the 5V pin on the Arduino UNO can only supply about 100mA. As Robert has said you will need a Mosfet switch connecting a voltage source external to the UNO to the Super Bright LED.

Cheers
Jim

2 Likes

Hey @James46717 and @Robert93820,

Appreciate the feedback so quickly. I have purchased a 1K OHM Resistor and some TIP120 Transistors - which I believe is the MOSFET you are referring to (please correct me if I am wrong as I am fairly new to Arduino) as per some research I undertook for the project.

My main concern, which I should have outlined more clearly in the original post, is how to connect the Super Bright LED to my Arduino as it does not have pins like a normal LED. Will I need a PCB for this or is there another way I can test this?

Regards, Kooper

1 Like

Firstly the TIP120 is not a mosfet, it is a Darlington transistor. What is wrong with my suggestion. Connect straight to Arduino pin, current from Arduino 0.5mA max at switch on then 0.3mA thereafter. Easy. The tip120 will require at least 5mA continuous and the saturation voltage drop is much larger and varies quite a bit depending on a few different factors. The power generated as heat will be much larger and may even require a heat sink. This would make it difficult to calculate the current limiting resistor whereas the mosfet on resistance is a few mΩ and the voltage drop can be largely ignored.

Where you connect to depends on what colour you want. You have not stipulated that. This is a RGB device so has 3 separate colours, I assume each with its own limit resistor. I don’t think they are built in. The Data sheet can be accessed via Core page for this product but is delightfully vague. Tells one a bit including connections but as the voltage drops for the 3 colours are quoted separately I am assuming they are not internal.

You now have to determine 3 things.
Intended colour.
supply voltage.
Switching device.
Then out with the slide rule, oops I meant calculator.
Cheers Bob

3 Likes

Simple way to test is to use alligator clips. (see below)
BUT, you cannot power it from the UNO. You need a separate power supply. !!!

Suggest using the following, as Bob suggested.

The G (gate) can be connected to a UNO digital pin (2 for instance).
The S (source) connects to GND of your power supply. Should also connect to GND of the UNO.
The D (drain) connects to the Super Bright LED through a resistor.

Power supply could be a 4 x AA cell battery pack. (6V).
Initially I would limit the current through the Super Bright LED to less than 50mA.
So the resistor should be 6 / 0.05 = 120 ohms, power 6 * 0.05 = 300 mW (1W resistor would be ok).

super bright LED

Just remember you are dealing with a high power device, you must be sure before you connect anything and turn it on. You could experiment with the alligator clips, Super Bright LED and battery pack before connecting the UNO. Work out how large a resistor you need, ohms and wattage for the brightness you need. You could connect the Freetronics Mosfet and see how it works. Use a 1K resistor connected to G. The other end of the resistor connect a alligator clip and tap the battery +ve.
The LED should turn on and off. When happy that it all works nicely, connect the UNO.

All the best
Jim

1 Like

Hi James
I don’t really think 4 AA batteries would be enough. The Data sheet is pretty vague as I said before but I suspect the diodes are in fact more than one in series. I may be wrong here but the forward voltage drops are quotes as 6V and 10V typically. Admittedly this is quoted at 400mA and 350mA or full current but with diodes (including LEDs) this voltage drop does not change radically until the current gets to a relatively low value and it is pretty stable. I have seen instances where LEDs have doubled up as an indicator and a cheap and cheerful voltage reference due to this stability. These situations have been where a high degree of accuracy are not mandatory but decent stability is required.
Your resistor calc did not consider diode voltage drop. Your choice of 120Ω and 50mA drops the whole battery across the resistor. But I agree that a trial should be carried out at a lower level. 50mA should be OK which would equate to 40Ω for the green and blue LED and 110Ω for red LED with a 12V supply. Of course a current limiting bench supply would be ideal but I doubt that is available.

Your method of testing in isolation is valid if you use the suggested board. If you use a Mosfet in isolation it will not turn off when you remove the switching voltage. This is due to the charge on the gate capacitance which has to be discharged to ground to turn the Mosfet off. The Mosfet will probably even stay on if you remove power and when power is reapplied this device will be still switched on. With some devices this cap can be quite large and represents a short to ground at switch on so a series resistor is used to limit current to a safe value. This can cause another problem as if this R is made too large the switching time will be extended far enough to cause heating of the Mosfet during this time. This switching input current can be Amps for a very short time (charge and discharge) so mostly I prefer to use a dedicated Mosfet driver or a PNP/NPN transistor combination to supply and sink this current and use a small series resistor.

The Mosfet used on that Freetronics board has a relative low value of Gate cap so uses a 1k series resistor which is on board. This cap is small enough to allow Arduino to drive directly with 1k series resistor. This is something to be aware of if attempting to switch large currents with Arduino directly as using a large value resistor to suit Arduino capability may slow down switching and cause overheating.

This may be a bit long winded but Kooper is obviously a student and if he used the simple method of testing he could be left scratching his head trying to figure out why the LED did not go out. Of course he may be aware of all of this but I/we have no way of knowing.
Cheers Bob

2 Likes

Agree with all you have said Bob.
With many of these posts you don’t know the level of skill or understanding a person has. So I try to pitch it at what I think is the right level. Sometimes I miss.

Using AA cells as a power supply is pretty simple and easy to achieve for a basic test. Along with the alligator clips you can confirm how components will behave. It is what I do now. Having a multi meter also helps. Final design would be much different and the values would be calculated more accurately.

I just hope that what I have said is of help to Kooper.

cheers
Jim

1 Like

Hi James
Definitely is the right way to go about it. Make sure everything is going to work before committing. I am just concerned that 6V and 120Ω is enough. I am trying to avoid the situation where an inexperienced experimenter does everything right then cannot understand why the LED does not light. It may well do so dimly but I doubt it and I haven’t got one to try. This is why I suggest something like 12V, a plug pack or even 8 AA cells. If 12V is not available a 9V one with 47Ω on the Red LED would allow 50mA and should light the LED. I was just trying to avoid confusion as I don’t think Kooper is terribly experienced (I may be wrong here, if so I apologise) and if possible he should be able to see a result when one is expected. That is another reason I included the bit about a stand alone Mosfet staying switched on and the ease of using the Freetronics board (which I think he is going to need anyway).
Cheers Bob

2 Likes

Hi Robert,

You are right with respect to 4 x AA cells, it should be 8 cells (12V).
And the resistor should be 45 ohms as you have said.

The 1W Super Bright LED I have, has a forward voltage of 3.3V but will light when directly connected to 2.5V, although very dim.

The 10W Super Bright has a forward voltage of 6.5V (Red), and 10V (Blue, Green). The Red may light with 4 cells the Blue and Green probably not.

I had not applied enough engineering in my previous post. Opps.
I could change my post but the thread would then be wrong.

Hi Kooper,

Apologies, please change the number of cells to 8 and resistor to 47 ohms, if you want to go that way.
Access to a bench top variable power supply would be good.
But a 12VDC plug pack as suggested by Bob would work.

Regards
Jim

3 Likes

HELLO AGAIN! @Robert93820 @James46717

Sorry I disappeared for a little while. The project was abandoned due to COVID-19 and I have recently decided to pick it up again. I have purchased all the supplies recommended. I also have a 12V power supply which plugs into the wall. I found the positive and negative points through testing.

I am at a bit of a stalemate and am not sure where to go from here as I am just a beginner.

Attached are some photos of my situation. I have a PIR blink setup on the Arduino and separately I have the Superbright LED connected to my power source through alligator clips.

From what I can gather, all I need to do is substitute the LED in the blink code for the superbright, however it does not seem as straightforward as that. Both work separately, just need them to work together to light up the LED after the motion is sensed.

The issue is I am not sure how to do this.

Thank you guys again, so so much!



Kooper

1 Like

Hi Kooper
I thought we had been over this in some detail previously. You need to do a fair bit of revision as I for one don’t feel like going through every tiny nitty gritty bit again.
Quickly in simple terms.
The Arduino WILL NOT operate that LED.
Connect 12V supply Positive to LED VCC.
Connect a 47Ω resistor to whatever colour pin you want.
Connect the other end of this resistor to “D” (Drain) point on that Mosfet breakout board described in an earlier post
Connect “S” (Source) of the Mosfet board to 12V supply negative, Also to Arduino Ground (Gnd) pin
Connect “G” (Gate) of the Mosfet board to whichever Arduino pin you are using to switch the LED. If you are running the “blink” sketch to test this this will be I/O 13.
That should get one colour on. You have never said what colour you want.
Cheers Bob
By the way what is the current capability of the 12V supply you have.

2 Likes

Thank you so much for the quick response. I’ll be sure to do my homework on the previous posts of this thread.

Ideally would like Red, and from memory I don’t believe that it would be safely possible, however the colour does not matter. When testing the colour came out as blue, I am fine with this.

The back of the power supply reads:
INPUT: 100-240V (approx) 55Hz 0.5A
OUTPUT: 12V 1.5A

1 Like

Hi Kooper

That should do.

I don’t know what you did to get the blue one on.

Why not.
The LED has 4 connections VCC or common, Red, Green, Blue. Take your pick. The proper mix will produce white. Each colour requires a separate dropping resistor.What you are basically doing is applying +12V to VCC and any colour connection via the current limiting resistor to the negative side of the supply using the Mosfet board as a switch.
Just to make sure the LED comes on just connect supply -ve to the end of the 47Ω resistor without the Mosfet. Whichever colour selected should light. Then introduce the Mosfet and Arduino.
I really cannot possibly make it any simpler than this. If you cannot understand what is going on now i would humbly suggest going away for a while and read up on some basics like Volts, Amperes, watts, Resistance etc. This would help you immensely. You cannot do an electronics course in a couple of days.
Don’t be offended by that last statement as I really don’t know how to make it simpler. There are some things that are very difficult to do remotely and this sort of thing is one of them when you have no idea of the expertise of the person at the other end or what facilities they have on hand.
Cheers Bob

3 Likes

Even once have covered it sometimes going back over the basics again can help cement knowledge. The crash course that Michael from Core did recently is perfect for the basics: https://core-electronics.com.au/tutorials/ohms-law-practical-examples-for-makers.html
Great Scott is also an excellent resource for getting up to speed: https://www.youtube.com/c/greatscottlab/featured
As Bob mentioned you cant do a whole course in a couple of days and the reasoning behind each part existing there will have a very good reason.

Definitely take a look at his other videos for future projects, and if you can spare a couple $$$ even breaking some parts to learn is worth it in the long run.

A video on MOSFETs :wink: Electronic Basics #23: Transistor (MOSFET) as a Switch - YouTube

As for the code, I find drawing up a flowchart helps immensely with figuring out how each decision will have to be written.

There are countless other educational Youtubers around especially EEV blog, if you want some recommendations for what anyone is looking for feel free to send me a personal message through the forum!

3 Likes

Well said Liam
But without some basics quite a few of the videos can be very confusing for the experienced never mind about the novice. On the other hand some videos should be compulsory viewing. The one by Michael for instance. That ohms law and power triangle have been around since Tesla days I think and are still used. The 555 timer cropped up a couple of weeks ago. There have been volumes written about this little chip, and still going. All good stuff.
Cheers Bob

3 Likes

If you want the Super bright LED to light when the PIR is triggered, you don’t need to use the Arduino. The output pin of the PIR can be used to trigger a transistor of mosfet. But if you want better control over the LED on and off time the Arduino would be ideal.

Note: Recently I tried to use a mosfet in a 5V circuit, it did not work. The reason was the Mosfet had a Vgs (voltage gate source) of 10V. At 5V it did not enter its saturation region and did not act like a switch. I solved the issue by using a 5V relay.

In selecting a mosfet to work with the 5V from the Arduino GPIO pin you would need one that has a Vgs of around 5v.

The following device might be worth considering. It is LOW active; GND from the GPIO pin will trigger it, HIGH will deactivate it. It completely isolates the Arduino from the LED. Wiring would be easier than using a mosfet, you would not need a separate circuit board to mount the mosfet and resistors. You could also use it to switch some hefty devices, 250VAC 10A, 30VDC 10A.

Anyway, all the best in your adventure.
Cheers
Jim

2 Likes

Hi James
The Mosfet on that Freetronics breakout board is a “logic level” device. It switches fully on at less than 5V.
The reason I suggest that unit is the other required bits like Gate series and Gate discharging resistors are all there and the connections are clearly marked. Could not be easier for a novice to use. Probably easier than a relay which will require a driver transistor (and a diode across the coil if not already fitted. That relay board you linked probably also has all the required extra bits.
Cheers Bob

3 Likes

Agree Robert.
Thought about how I would do this given the parts Kooper has and the Freetronics board would be the best solution. My main concern with the relay is how to power it. The 5V from the Arduino should NOT be used, it is only good up to a 50mA or less. Try to get too much out of it and the regulator on the Arduino would die. It is already dropping 12V to 5V.

The Mosfet solution is the better one.

Kooper,

If you like I can throw together a simple diagram of how to connect it all up. Let me know.

Cheers
Jim

2 Likes

I appreciate all the help from everyone. As I am just a novice, I have done some homework and read through this thread. All the help has been fantastic for this project and I have been able to familiarise myself with the equipment and terminology.

@James46717 - that would be fantastic.

Thanks to everyone again, your input has been immensely helpful.

Kooper

3 Likes