How to get correct values from Arduino sensors - arduino

I am using 6 different sensors which are working simultaneously, but I got a problem in the readings from LM35 temperature sensor and MQ-7 Carbon Monoxide sensor. The values are changing depending on the power source.
How can I fix this problem? I'm planning to use a Sony power bank to feed my system but I am getting the wrong values especially from the temperature sensor.

Make sure that your power source is stable and continuous (i.e. make sure that your power bank is working fine and check its current output if its compatible with Arduino)
Make sure that your sensors are wired correct and working fine, try with different LM35 and MQ-7 sensors, if you have that chance.
Make sure that you are supplying your circuit with correct voltage and current, sensors may work unstable if you are supplying them directly from Arduino pins (because maximum current limit of the pins onboard may not be enough for your circuit), try an external power source such as MB102 power module.

Although, it's not a coding problem my suggestion is you can use signal conditioning to solved this. Search about low pass filter and high pass filter to filtering frequency in output sensor.
The simple method is using voltage divider, like this:
Vout = (R1/R1+R2) * Vin
R1 is your sensor, and R2 is resistor.

Related

Is it possible to connect many (20+) SPI sensors to an Arduino Mega?

I am making a system for measuring whether or not there is vacuum present in big steel containers. They are located up to 100 meters from the control cabinet.
The question is, how many SPI sensors can I successfully use at the same time with an Arduino Mega?
I have two main concerns, and there are probably more things I didn't think about.
Signal strength
The shared lines for CLK, MOSI and MISO will need to be split up at several junction boxes and led to the different sensors. Since the voltage out from the Arduino is fixed, I'm fearing instability because the signal is weaker for some sensors, has someone done something similar? What is the greatest acceptable voltage loss for these lines to an ordinary sensor?
Processing
Will the SPI library be fine coping with this many sensors?
The refresh rate can be set to extremely low, thinking 0.3Hz.
The alternative to all this is to go for 4-20mA sensors and have a 0-5V converter circuit for each sensor, near the controller.
Any inputs would be greatly appreciated!

Using an Arduino as EMG sensor

When I search online for EMG sensors, I often see these sensors are just made of a few transistors, resistors and sometimes diodes. Also I once read on a site that EMG sensors are some kind of modified voltmeters. But while I managed to make a voltmeter from an Arduino, I haven't been able to make an EMG sensor from an Arduino.
Does someone know whether it is possible to make an EMG sensor from an Arduino and how they did achieve this?
I think the biggest problem here is that of dynamic range. EMG signals are AC voltages typically in the low mV range and would need a gain of 100 or so to get them up to +/-2.5V, then a simple offset circuit to convert that to 0-5V for the Arduino analog inputs. However, that's not the whole story, since the small EMG signals can ride up and down on large low-frequency background voltages. Your AC amplifier would need a high-pass filter to remove those, or they could drive it off-scale which would prevent the EMG from getting through. If you reduce the gain to keep things in range, the EMG will be a rather small part of the 10-bit ADC range on the Arduino.
So the thing to ask is what is the point of using the Arduino in the first place? If you are going to connect it to a computer in order to look at the EMG signals, then why not just skip the Arduino and use the computer's sound card? The Mic input probably has enough gain already, and you get at least 16-bit resolution to handle any large non-EMG background that wasn't filtered out.
IMPORTANT! EMG measurements require direct electrical connection to the body. For safety, you should make certain that your recording equipment is electrically isolated. If you use only a standalone Arduino, you should power it from batteries. If you use a computer, it should be a laptop running on batteries, with no other connections to ground.
I often see these sensors are just made of a few transistors,
resistors and sometimes diodes.
That's true for pretty much all electronics devices...
Does someone know whether it is possible to make an EMG sensor from an
Arduino and how they did achieve this?
You cannot build an EMG sensor from an Arduino. But you read sensor values with an Arduino either through serial interfaces or by measuring voltages.
With a bare Arduino you can neither measure negative voltages nor can you amplify small signals. (we're in the µV range here...)
Just buy something ready or learn more on electronics

Using an arduino board to control a atercooling loop within a pc

This is an exploratory question really (I am new to arduino / programing ) but I am curious as to weather an arduino board could be programmed with C++ to automatically control the rate of flow of the pump or fan speed ect. to dynamically control and hopefully improve cooling. In addition to this could the Arduino board support a small LCD screen so that real time temperature readouts could be given (I plan to have numerous temperature sensors placed on components?
Thanks.
Yes this does seem feasible. The challenge here might be the temperature measurement. Many of the cheap temperature/humidity sensors that are used with the arduino are actually very slow to register changes in temperature. You may want to do some research on this. Luckily you can do some experiments with temperature measurement and an arduino pretty simply, taking the output of the temperature measurement on the arduino IDE serial console.
The LCD, pump and the fan control is a are pretty widespread and it should be easy to find documentation on those.

5 volt output max current for Arduino Mega 2560 rev3

Well I've looked and looked and just cant find data on the max current of the 5 v output (or even a suggested reasonable max)
They all mention 50 mA for the 3.3v output.
Looking at the chip it's a smaller board than the Arduino Uno so I don't want to pop it.
I assume someone will know the max current that the regulator on this board can handle and surmise what the 5v current out could be? Thanks in advance!
EDIT: The regulator / board 5v pin out, not chip related.
EDIT: Assuming supply is from the 12v power adapter.
The schematic shows a NCP1117ST50T3G. The datasheet shows 1500mA (typical).
Note that you may not actually be able to draw that at the higher end of the input voltage range since the Arduino may not provide sufficient heatsinking, needed since the regulator will shut down if it gets too hot (and the regulator will melt down if it doesn't shut down).
Also note that the traces on the board may not be designed to allow that much current to flow safely, and you could end up damaging the board itself regardless.
I'm going on record that you can put any amperage as input as long as the voltage in within range. So, if you have a 5V 200A high power input you are still fine. Now, If you have a short, you're cooked. But a properly designed circuit will draw what it needs and nothing more.
Hyperbole. I know absolutely nothing about this topic. I'm hoping a lot of people will call me names and one of those will correct me with a correct electrical engineering based answer. Either my view is correct or it isn't.

Arduino TinyGPS no data

I am using the TinyGPS library and am trying to display information to get to a specific latitude/longitude via an LCD screen.
I am not getting any data. The output of directionto is "broke" and distanceto and bearingto is 0.
Code redacted
And here is what my pins/hardware look like: http://i.imgur.com/7iDBwxm.jpg
I am using an Arduino Uno, LCD shield and GPS shield by ITead Studio.
I am hoping it is either the pins or not having a GPS signal.
Reddit post: Arduino TinyGPS help
The baud rate for SoftSerial should be 9600.
You need to debug the system step by step to understand where the problem is.
I would start using only the serial monitor and no display.
Please note that when you switch on a GPS that has been moved for several hundred km, and the same is when you switch it on for the first time, may take a while to get the satellites and start giving out some data. Make sure you are in a open area and wait for 5 to 10 minutes before you declare it as "not working". The next time you will switch it on will be much quicker.
I have checked the documentation of your shield and what they also say is to make sure the Micro SD card you use is support SPI mode but not just the SD mode, also don’t forget to format it into FAT16 , and add a “datalog.txt” file on your card for Arduino to log the information.
Try that and then read the data on the sd card to make sure that is logging.
Come back with the outcome of the above tests and we will try to support you further.

Resources