GoeHaarden
The best advice is unsolicited
- Joined
- Feb 1, 2017
- Messages
- 1,324
- Reaction score
- 738
I'm going to preface this with the fact that I work in medicine, and my programming background consists of googlefoo. I'm have learned a lot here and other forums, but I know my programming is not near as efficient as the pros out there...so I need help.
So, I'm currently trying to expand my arduino RIMS controller to incorporate a flow meter(s) to eventually automate sparging speed/control. As well as add a low flow safety to my RIMS element. My setup currently consists of an Ardunio MEGA running a PID algorithm with DS18B20 temp sensors. I have a serial touch screen as well. My PID algorithm calls an interrupt every 15ms, and the hall effect flowmeter uses interrupt pulses to count flow. You can probably already predict my dilemma. When the PID is running, the interrupts interferes with the flowmeter count and my flow calculations are skewed. Now I haven't hardwired anything yet, and I've just been doing breadboard testing. I can clearly see the inconsistencies in flow when the PID is running.
I have thought about adding an arduino MINI to control the flowmeters, and send the data to MEGA via serial communication. I've only been able to send integers and not doubles via serial, but I save accuracy by multiplying by 10 on the slave then dividing by 10 on the master. However, I have noticed that the serial data can get backed up which causes errors. So, I kind of abandoned this approach for now....
So, my question is has anyone else implemented something like this? There has to be a better way to do this other than serial communication. Or should I keep trying to perfect it with serial data? It just doesn't seem like the best way...
Thanks for any and all help...
So, I'm currently trying to expand my arduino RIMS controller to incorporate a flow meter(s) to eventually automate sparging speed/control. As well as add a low flow safety to my RIMS element. My setup currently consists of an Ardunio MEGA running a PID algorithm with DS18B20 temp sensors. I have a serial touch screen as well. My PID algorithm calls an interrupt every 15ms, and the hall effect flowmeter uses interrupt pulses to count flow. You can probably already predict my dilemma. When the PID is running, the interrupts interferes with the flowmeter count and my flow calculations are skewed. Now I haven't hardwired anything yet, and I've just been doing breadboard testing. I can clearly see the inconsistencies in flow when the PID is running.
I have thought about adding an arduino MINI to control the flowmeters, and send the data to MEGA via serial communication. I've only been able to send integers and not doubles via serial, but I save accuracy by multiplying by 10 on the slave then dividing by 10 on the master. However, I have noticed that the serial data can get backed up which causes errors. So, I kind of abandoned this approach for now....
So, my question is has anyone else implemented something like this? There has to be a better way to do this other than serial communication. Or should I keep trying to perfect it with serial data? It just doesn't seem like the best way...
Thanks for any and all help...