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.
Related
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.
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.
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
I have a device running off a different power supply, that I'm trying to talk to serially, it has TX and RX lines, GND and 2.7+ line, its quite grunty so It has its own PS.
I'm getting some odd results at the moment, so wondering if I need to use a common GND between the Arduino GND and the PS GND and the device GND.
Does serial require a common voltage reference point?
Its a mega 2560 R3
All signals require a reference voltage. Ground is what provides this reference for single-ended signals such as those used by a UART.
UART signals are composed of low-level and high-level signals.
The receptor, at the other end, to be able to understand your UART signal, must be aware of what is that low-level and high-level signals.
So you must put your UART GND to the GND of the receptor, and the high-level voltage must correspond to the TTL input level of your receptor.
For example, if the high-level of your UART is 2.7v, and your receptor input-level is 5v, you could encounter bad level detections sometime, because 2.7v could be detected as a low-level input.
For the low-level inputs, this is no problem because 0v is always 0v.
Sorry but... didn't you break your 2.7V device? Besides using a common ground, like Ignacio pointed out, when you have to interface something to something else you should ALWAYS check what are the correct voltage levels expected.
So did you check that the high voltage levels and low voltage levels are fulfilled? I think not. Because:
Arduino Uno (i just have the 328P datasheet on hand, so i'll use this) has an Atmega328P powered at 5V. The datasheet says that the Vih parameter (the minimum voltage sensed as a "high" value) is 0.6Vcc, which means 3V. So if you send him a 2.7V signal.... You are doing something wrong.
The 2.7V device has probably an absolute maximum voltage allowed on any pin of Vcc+0.3V. This means that the maximum voltage for each pin is 3V; if you go above this current starts flowing through the protection diode and... you blow your device. Now you are giving it 5V, so.... Puff...
If the above criteria are not fulfilled you have to put between the two circuits something. Which is
a resistor divider if you have to make the voltage lower (just two resistors) and a couple of transistors to make it higher
Opto-isolators (and you can keep the grounds separated)
Voltage translators (such as TXS0102)
other...
I have a CO2 sensor with 4 pins. VCC, DOUT,AOUT, GND. Where does the VCC, AOUT, and DOUT wire to? I found no wiring manual when I purchased this sensor off of ebay. I have gone to this link where someone is using the same sensor. However, I don't follow his path considering the third pin (red) isnt going anywhere. It just leads out and stops. http://middlewaresensing.files.wordpress.com/2010/08/100708144455.png
Can anyone spell it out for me clearly for me please?
GND - wires to GROUND
Vcc - Wires to ?
AOUT - Wires to?
DOUT - Wires to?
GND -> negative
VCC -> positive (voltage/current depends on sensor)
AOUT -> analogOut, goes to a analogInput if you want to read the sensor that way. Pay attention that arduino can read at max AREF volt, by default AREF = AVCC = VCC = 5V (please note, taht is vcc of arduino, not of the sensor)
DOUT -> digitalOut, goes to a pin depending on protocol used, because it is one wire, it can be something like "OneWire",
Voltage and current needed by VCC, and voltage/current ouputted by AOUT and protocol used by DOUT can be extrapolated only by datasheet.
Please note on image he use a arduino nano that exista at 3.3V and 5V, also seems wrong as these kind of sensor normally use a lot of current, witch arduino alone cannot supply
Since it is a MG811, a bit of google search give that tutorial: http://sandboxelectronics.com/?p=147