|
Post by Admin on May 24, 2016 12:35:29 GMT
Post 3- This is going further on to use other devices like relays ( I think most of you wont have this with you ) ,transistors. Okhay. Mostly we need the above mentioned ones to USE DEVICES THAT REQUIRE A HIGH current flow. I might have mentioned earlier that an arduino can only take up current to a maximum of 250ma (MAX) .Which is NOT enough to power a MOTOR, ( Be it any motor) Okhay , Heres the deal, IF any one bricks their ARDUINO. [Its not my fault], get a warranty and Use appropriate devices and transistors for the same.As most of you have different power requirements. So, what we use here, IS a transistors or power transistors. As you all know the working of transistor as switch. Connect the BASE to the GPIO and THE VCC along E to C . Basically, Thats how its done. So, what does that make of this. Okhay, Whenever we give a high to the base, there will reach a threshold and the C-E current flow occurs. More can looked upon in GOOGLE >.< . So, we have thus made a "digital SWITCH" I have already EXPLAINED HOW TO USE RESISTORS AND STUFF IN AN ARDUINO. Try to accomplish a working digital SWITCH version of a motor you people have connect it to a Q) Make a Digital OHMmeter. Device a Circuit. To measure any resitance of various objects between two wires. Print the resistance on the Serial Monitor. DO the MATH according to your own CIRCUITARY.
|
|
|
Post by utkarsh on May 24, 2016 23:42:26 GMT
int reading = 0 ; int resistance = 0 ; int reference = 1000 ; // for refernce resistance of 1 kohm in voltage divider int voltremaining , voltdissipated ;
void setup() { // put your setup code here, to run once: Serial.begin(9600); }
void loop() { // put your main code here, to run repeatedly: reading = analogRead(A0) ; voltremaining = 5 * reading / 1024 ; voltdissipated = 5 - voltremaining ; resistance = reference * ( voltdissipated / voltremaining ) ; Serial.print("Resistance is "); Serial.println(resistance); Serial.print(" Ohms."); delay(1000); }
/* Voltage divider circuit concept: unknown resistance connected between 5V and A0, reference resistance (i used 1 kohm) connected between A0 and GND. */
|
|