I am recently tried connecting 5 sharp dust sensors on one arduino mega. arduino 5v connecting to breadboard and each sensor get power supply from breadboard, I also use a resister to scale down voltage to 3.3v.
I attached my code of how I get the data from sensor. From the output file of sensor, not all sensor are working correctly. Some of them have really low readings(just giving noise). I wonder if there will be a power supply issue providing 5v to each sensor at the same time. or there is something wrong with my code.
I am not a expert of electronic, I wonder if some one could help me understand this problem.
Many thanks!
There are several variations of the Sharp dust sensor. Which one are you using? The most common one is very sensitive to the timing of the pulse that controls the led within the sensor and you can’t get this right using analogread() even with one sensor; you have to use an ISR.
A resistor is not a voltage regulator, nor can it be used as a replacement. It sounds like that's what you're doing. Anyway, complete schematic diagram (so no Fritzing-created mess) and specifics of the sensor please.