![]() Also what action do you want when the battery is above 14.4V ? The output is set LOW during setup, so it starts in OFF/LOW state. I'm not sure my solution is the most elegant, but it works OK as far as I've tested. I had to rewrite the if statements for determining voltage range. I've used a loop counter to generate that number, and every loop the number decrements by 1, as if the voltage is dropping every 500ms loop. The analogRead line is temporarily disabled, and instead vin is artificially set to a number between. Here's your code adapted for testing, even without using any hardware. I havent run the code I come in late at nights and do some reading and some reviews on machines to fix the next day at work I hardly have time for my hobby but ill test soon I would need a batter and I dont current have one at the home I am but surely by the weekend ill test it. Int battery = 8 // pin controlling relayĪnd the code looks Ok-ish that doesnt sound good to me, I think its because of all these if statements, I would add more but it seems weird to me also. No anger here just that I wasnt sure which other info was needed. Vin=0.0 //statement to quash undesired reading ! Int battery = 8 // pin controlling relay that turns on main Ic Here is where I am so far I have looked at some forums and took bits and pieces of what I could understand.įloat R1 = 100000.0 // resistance of R1 (100K) -see text!įloat R2 = 10000.0 // resistance of R2 (10K) - see text! I want to monitor the battery voltage and also shut down the inverter when battery voltage is too lowĪlso I would like a buzzer to sound a low voltage alarm before the batteires die without a constant anioying beep (on and off sound) ![]() I am building an inverter sadly I dont know how to use an arduino to do so, so I am using standard IC to do the job but I want to integrate some features.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |