Hello all. i've been playing around with arduinos for some years now and i regularly use this forum as troubleshhoting all ssrts of problems i've been facinng. But this project revealed way more complicated than i thought and wished.
I built a machine for the rice fields, similar to a sprayer. my aim was to self level the spray bar and later to level the height wth a laser level (not yet installed)
i used an arduino nano to control everything,
A DC-DC Step Down Voltage Regulator as power supply to arduino, mpu and relays
MPU6050 as a gyroscope
4 relay module to control the solenoid valves
An arcade joystick as controller
The solenoid valves coil is 12V30W with math applied gives me 2.5amp consumption.
Knowing that all coils give back loads of voltage i placed correctly one diode on each coil. i dont know the diode reference but they supporrt about 12amp
in a later attempt i even tried to isolate the supply from the arduino, relays and mpu to the other system.
in all the different setups the solenoid valves keep shutting arduino down and after sometimes frying it.
the code is running good.
Any ideas where the damn problem is?
i didn't intend to be rude to anyone except the problems i'm facing. after 2 weeks of trying to sort out the problem working with a passed deadline its just another word for me. but if i can't use minor swearing language i wont use it again...
Are you using a pull-up resistor on your buttons? Wiring looks atypical. Normally 1 side connected to arduino with pull-up resistor and other side to ground. Press equals low on arduino pin.
Look at data sheet to provide regulated power to arduino bypassing onboard regulator. It is hard to make out on the fritzing diagram. A schematic is better. Use online free software like easyEDA or kicad. Alternatively draw it and post a picture
a10k pullup resistor to each button. sorry about the drawing. as i saud before its my first time on fritzing... everything works really fine before i attach the solenoids. i guess the problem is there. after a number of times the whole thing stops, serial monitor stops.... i guess i even fried one of my laptom usb ports while reading serial monitos
Most relay boards allow isolation. I cant make out on the diagram what yours is like but there appears to be a jumper which should be removed. Then you supply logic level from the arduino and relay level from main power supply. Don’t bother getting used to fritzing start learning something better. Fritzing is not useful
So without the solenoids on the switched side of the relays, the relays were working properly, ie the leds on the relay module were behaving and the relays were clicking nicely?