You are using PIN1 to control a relay, this is a programming pin, so it may be causing what ever your problem is. It will be formatted in a scrolling window that makes it easier to read.Ĭan you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png? Then look down to item #7 about how to post your code. Please read the post at the start of any forum, entitled "How to use this Forum". Void relay_SetStatus( unsigned char status_1, unsigned char status_2) Relay_SetStatus(OFF,OFF) //turn off all the relay Void relay_init(void)//initialize the relay Relay_SetStatus(OFF, ON) //turn on RELAY_8 Relay_SetStatus(OFF, ON) //turn on RELAY_7 When inputs a logic voltage, the relay will. Relay_SetStatus(OFF, ON) //turn on RELAY_6 A Relay is a digital switch to control much higher voltages and currents than your normal Arduino boards does. Relay_SetStatus(OFF, ON) //turn on RELAY_5 Relay_SetStatus(OFF, ON) //turn on RELAY_4 Relay_SetStatus(OFF, ON) //turn on RELAY_3 Relay_SetStatus(OFF, ON) //turn on RELAY_2 ![]() Relay_SetStatus(ON, OFF) //turn on RELAY_1 You have not shown code, but presumably realise the Arduino outputs must pull LOW to operate the relay. If you want to use all eight relays, you must (remove the link,) connect "JD-VCC" and "GND" to plus and minus of a 5 V supply capable of one Amp, connect the INs and VCC but not GND to the Arduino. Note this will only work for two or three relays as you are using USB power. Put the link back from "VCC" to "JD-VCC" and connect your Vcc and GND to the 10 pin header. No, more careful inspection indicates that the LED is on the input side of the opto-coupler and you have apparently removed the link from "VCC" to "JD-VCC" so there is no power to the relay itself, therefore while the LED is on, the relay is not. Again that is hard to see as it appears only one of the terminals has been screwed down. This 1-channel 5V control Single-Pole Double-Throw (SPDT) High-level trigger AC power relay board can be controlled directly via a microcontroller and. Presuming this is a 5 V relay board and not a 12 V, the fact that there is an indicator light on does suggest that the relay has actuated and it may be that you have connected the light to the "NC" and "NO" contacts instead of "NO" and "C". Harga: Module Relay 1 Channel 12V Modul Relai 1Ch without OptocouplerRp9.000: Harga: Relay modul module 12V 1 channel arduino raspberryRp9.400: Harga: Modul Relay 1 Channel 5V 10A Non-isolated Relay Module ArduinoRp5.900: Harga: Modul Relay 1ch 1 ch channel 5V 12V 24V 30A Isolation Aktif High LowRp31. ![]() That unfocused picture taken in semi-darkness doesn't give much information and you have not posted your code. ![]() Well, the most blatantly obvious is playing with the power mains in an incredibly foolhardy fashion! Can anyone have suggestions on what I might be doing wrong?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |