So I'm doing a school project which uses Arduino and a rain contact sensor to adjust the speed of a wiper motor depending on the amount of rain in the sensor. I have posted on Reddit with a more detailed explaination.
Thanks in advance.
So I'm doing a school project which uses Arduino and a rain contact sensor to adjust the speed of a wiper motor depending on the amount of rain in the sensor. I have posted on Reddit with a more detailed explaination.
Thanks in advance.
Rather than sending us to another forum site to read about your problem, can't you copy and paste the text here?
And please place the code between code tags when you do so.
Then, while you're at it, also let us know which PWM controller you aim to use. A link to it's documentation would help as well.
Thanks.
So I want to be able to use a rain contact sensor and use it to control the speed of the motor when it reaches a certain variable.
Here are the components I have been given by my school:
The PWM motor I'm using is in the URL below:
I want to know how to connect these together for it to work.
We currently have this code which allows the rain sensor to work with Uno:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
delay(100);
Thank you. You got half-way there.
But you forgot this part:-
OldSteve:
And please place the code between code tags when you do so.
At the bottom right of your post you'll see "More". It opens a menu. Click on modify, then you'll find code tags at the top left of the edit window. ie Select your code, then click on </>
This will place your code into a code block, where it's easier to read or copy.
Not too critical for such short pieces of code, but it's still a rule.
Meantime I'm just checking out the motor controller now.
Sorry, new to the website. But I did what you asked.
pro_aimer:
Sorry, new to the website. But I did what you asked.
No problem, and thank you for that. Much appreciated.
So I've been looking at the PWM controller. Is that really the one your teacher wants you to use? It's made for speed control by turning a pot, not for digital control using a microcontroller.
Also, were you given any other information, like the current draw of the wiper motor?
We were meant to use a MOSFET controller but that's the only one available that they had in-store.
The current draw of the motor is 1.33 amps.
pro_aimer:
We were meant to use a MOSFET controller but that's the only one available that they had in-store.
Not suitable, I'm afraid. You really do need a MOSFET. To drive the motor in one direction only, you don't really need a MOSFET PWM motor controller. (Were you told "MOSFET PWM Controller", or just "MOSFET"?
The Arduino generates PWM on one of the PWM pins with analogWrite(), so that PWM signal can drive the gate of a MOSFET directly. The 1N4004 diode could be used across the motor terminals to suppress any spikes.
I've no idea what the BD682 is supposed to be used for. It could almost be used instead of a MOSFET, driven by the arduino to switch the motor, but it would probably get pretty warm. A MOSFET would still be a better choice.
The current draw of the motor is 1.33 amps.
That will be no load. Does the motor just have to spin on it's own, or will it be driving some sort of load?
I see a use for everything except the PWM controller, and the BD682 if a MOSFET is used for switching.
It's hard to believe that your school/teacher asked you to do this if you hadn't already been taught how.
Another point is that no one here is going to want to just do the whole design for you. That would defeat the purpose, making it our design rather than your's.
Anyway, read over this reply, answer the questions in purple, along with anything else you feel is relevant, and we'll see where we go from there...
I will try to get a MOSFET controller tomorrow and I'll see if that's more suitable. The maximum load will be 4 amps but it will just spin by itself.
Maybe you can contact this bloke and work on it together
http://forum.arduino.cc/index.php?topic=358502.0
Weedpharma
weedpharma:
Maybe you can contact this bloke and work on it togetherAutomatic Windshield Wiper - Motors, Mechanics, Power and CNC - Arduino Forum
Weedpharma
Good idea. I knew I'd seen a similar thread somewhere.
Sounds like they're doing the same subject or going to the same school or the same person.