Can I use this to dim a 10w LED with an Arduino? - arduino

Currently I have this and a 12v power supply: http://www.ebay.com.au/itm/High-Power-10W-LED-Driver-MBI6651-PWM-DIM-
I want to dim a 12v 10w LED with PWM. Is there any way I can do this with an Arduino?
The pin description says this:
PWM terminal. When applied with +5v or suspended, full amount of current will be output and when connected with ground, output current will be 0.
So, as the Arduino runs off 5v, does that mean I can use the Arduino PWM to tell this board to DIM? Or I am I getting that totally wrong?
I'm a bit of an electronics noob, so forgive me if these questions are simple.

You can generate an PWM signal in the Arduino and link it to the PWM pin in the power supply, it should work as specified in the link.
PWM terminal. When applied with +5v or suspended, full amount of
current will be output and when connected with ground, output current
will be 0.
So if you generate a full signal, you will have the full power in the power supply, 100% light, 50% PWM will generate 50% power to the LED and so on...
You can check Arduino documentation for more information about how to use the PWM using analogWrite()
https://www.arduino.cc/en/Tutorial/PWM

Related

How many amp can arduino take

Im currently trying to get an electric signal from arduino, its 5v and 1amp that i get from a powersupply.
I want to input that signal into an arduino pin, lets say pin 4.
The main powersource from my arduino is via usb, but the 5v signal is from an external device.
I just want to know the number of time that signal became active, like a switch.
As far as i know arduino can take only .04amp from 5v.
Is there anyway i can reduce the current?
Anyway to obtain the value of a resistor to make it less dangerous for my arduino?
Your question is a very common application for Arduino!
You can give your Arduino some additional protection by placing a 10kOhm resistor between the Arduino analog pin you wish to use and the positive voltage output of the power supply.
If you're worried that the voltage could increase above 5V, you can protect your arduino with a simple voltage divider using two resistors. There's a detailed tutorial for this approach here: https://startingelectronics.org/articles/arduino/measuring-voltage-with-arduino/ Here's a simplified circuit diagram with a voltage divider that reduces voltage 11 fold - making voltages up to 55V safe to measure (where the battery could be replaced by your power supply):
For your code, you can use analogread() to read the voltage of the pin. If you wired it correctly, it should return near 0 when the powersupply is at 0, and 1026 or thereabouts if it is at 5v (or whatever the maximum value your voltage divider is designed for). Here is an example to get you started :
https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/
If you need any support with your code to count the number of times the voltage goes high, post that as a separate question along with the code you have so far.

STM32F4 - External input source is not detected in GPIO.pulldown mode

I am currently working on a project that involves an STM32 F4 Discovery board where I am trying to use an external input source as the input to the GPIO pin. The external input source is a power supply set to 3.3V. The pins are set to mode GPIO_PULLDOWN such that the input is grounded when no particular value is assigned. However, I am unable to change the input value once it is grounded. When I set the power supply to give 3.3V to the input pin, it still stays grounded. But when I connect a 3.3V pin on the board to the input pin, it gets 3.3V as input. I have noticed one thing, which I find a bit strange: when I use a multimeter to measure the input pin, the multimeter measures 3.3V on the input pin when I use GND from the power supply and the VCC from the input pin. But when I use the GND pin from microcontroller and VCC from the input pin, it outputs 0V.
Any idea how I can solve this? I am quite fresh on this topic, so all advice would be appreciated. Thank you in advance.
Figured it out. The ground on the power supply is isolated, thus I needed to connect the ground on power supply with the microcontroller.

Sim 900 GPRS shield pinout

I'm currently working on a project involving a GPRS Shield based on Sim 900 Chip
I was wondering if anyone would know which ones are the VIN Pin and the RING pin ?
It doesn't say on the board itself and all other searches have lead me to a dead end.
Also if you have a detailed pin layout it would be much appreciated.
Thank you
The GPRS shield is the one in the link below
http://imgur.com/a/1a2gx
Ring Pin
If you have a Multimeter with continuity testing, check where the RI pin (#4) on the Sim 900 chip is broken out to. Here is an overview of the pins:
If it isn't (some shields don't have them broken out) you could solder a wire to the RI pin with an LED and resistor to Ground, something like this:
[RI Pin]--------[wire]--------[LED]--------[Resistor (330Ohms?)]--------[Ground]
The ring indicator is HIGH by default and LOW when there is an incoming call. So, when there is no call the LED is on and off when there is an incoming call.
VIN
When the position of the switch (middle left in the image below) is set to "extern" (right), you have to supply power to the barrel connector. When you set the switch to the left position, the module takes power from the 5V pin of the arduino OR (dont attach both!) an external power supply you attach to that pin.
Hope it helps :)
PS: These SIM modules can have current peaks up to 2 Amps. I recommend you to use an external power source that can provide minimum 2A at 5V.
Edit:
This might be helpful:
http://wiki.seeed.cc/GPRS_Shield_v1.0/. I think its the same module as yours. Have a look at the "GPRS Shield v1.4 Schematic" at the bottom of the page.
Edit 2:
Comparing the board from the link and yours, i'm very certain that the ring pin is the one marked in red in the image above. Checking with a multimeter doesnt hurt though. You can add the same circuit i described above to that pin to add an LED indicator.

Turn on light (bulb) with Arduino UNO and PIR Sensor

im trying to turn on the light (bulb) with my arduino UNO and one module with 4 relays. I can do it with one LED but with an bulb i can't. I have connected the wires like in the photo:
http://i.stack.imgur.com/GUuAS.jpg
I need a 1k ohm resistor or the module include it??
Here the bulb that I have:
http://i57.tinypic.com/10dbp90.jpg
Thanks!!!
In your wiring picture it appears that the only source of power is what the Arduino is getting from the USB cable. The purpose of a relay is typically to control the flow of a higher voltage source (such as multiple small batteries in series, a larger battery, or a wall outlet) using a lower voltage control signal (e.g. one of your Arduino's GPIO pins). The maximum current from VCC to ground that can be draw without damaging your Arduino is 200 mA (source). Power = voltage * current (p = i * v) and VCC is 5V. This means the total amount of power your Arduino can supply is 1 watt. This is likely significantly less than the amount of power required to turn on your light bulb.
The purpose of the resistor in the LED circuit is to limit the current going through the LED. This is more commonly done when the LED is connected directly to a GPIO pin in order to prevent more current from being drawn from a pin than the amount that will damage that pin. From the same source as the current limit from VCC, the limit for a GPIO pin is only 40 mA. I would recommend seeing if you can power your light bulb with a battery. You could then use this same size battery as the power source for your relay board.

Checking arduino code with multimeter

When we upload the code on arduino ,sometimes we do not get the desired results.
I saw a friend of mine doing the test on arduino using a multimeter to make sure that the code is right.
He said that we can make sure the code is right by checking the voltages on carious i/o pins on arduino. Like if the voltage on i/o pins is less than 5 V then the code is having some error,and also if we chckt the voltage on RX and Tx pins it should be 0.29 V.
I know question posted by me is not clear, but this is something which worked but i was not able to understand it properly.
So if anybody can deduce what this means and how it is done so, please proide an answer?
There are two main things to test with your multimeter: the voltage of the power to the Arduino (between 5v and Gnd), and the voltage of the IO pins (between them and Gnd).
Voltage of the power supply simply tells you if the Arduino is powered up correctly, if its power management circuits or power supply have failed, you'll be able to pick it up here.
Voltage of the outputs should be either 5v or 0v, relative to ground. By testing the voltage on a pin you can tell whether it is being written high (5v) or low (0v) by the Arduino, hence seeing what the code is doing to the pins.
I should make it clear that there is no right or wrong way to tell if the code in general is working based on the voltage of the pins.

Resources