Announcement

Collapse
No announcement yet.

Remote pump control ideas.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Re: Remote pump control ideas.

    instead of the optocoupler you could use a darlington driver like a ULN2803
    https://www.ti.com/product/ULN2803A

    these have been used in gambling machines for a couple of decades to link the computer i/o to things like stepper motors and relays.
    Last edited by stj; 11-02-2020, 05:36 AM.

    Comment


      Re: Remote pump control ideas.

      Interesting. Dumb question, but does it provide any isolation so the MCU doesn't get zapped in any way ? The optocoupler is straightforward: there's physically no way electricity can jump the gap between the phototransistor and the LED (unless it's ridiculously high and it arcs)...bare with me, I'm learning here
      Wattevah...

      Comment


        Re: Remote pump control ideas.

        i'm suggesting the 2803 for outputs

        Comment


          Re: Remote pump control ideas.

          Yes, outputs can still experience spikes feeding into them, can't they ? That's why I was asking about physically separating the power box from the control box.
          Wattevah...

          Comment


            Re: Remote pump control ideas.

            dont overthink it - a common ground will exist

            Comment


              Re: Remote pump control ideas.

              Originally posted by stj View Post
              dont overthink it - a common ground will exist
              Correct, but you know me....I like over-engineering stuff......which is why my projects take so long and I'm not a good designer
              Wattevah...

              Comment


                Re: Remote pump control ideas.

                I left the project running in the shop to see how it goes overnight...*insert jokes about fire and other disasters here*

                Putting this particular project aside for now, what are some (more or less) ready-made systems that one can use to get into industrial automation, particularly noobs like yours truly here ? I mean, what I did here was build my own system, my own way, the way I saw it in my little brain It's certainly not suitable for anything else and is far from being a "solution". When I think of a more ready-made solution I think of the many "home automation" platforms for the RaspberryPi. These might also work in a pinch and are a huge step up from writing your own "bare-metal" code like I did (plus it has a ton of other features, like a GUI which my system lacks entirely and I AM aware of it) but even those can't really be taken seriously in an industrial setting, can they ?

                Proper industrial automation probably involves special hardware and software which costs thousands, so let's exclude those entirely and focus on the more affordable solutions which a small company wishing to enter this field could invest in...

                I suppose the general consensus is that it depends on the application....
                Wattevah...

                Comment


                  Re: Remote pump control ideas.

                  Well, just in case someone is curious about the status of this project and how it turned out in the end, last week I managed to install the end product at the actual site and I'm happy to say it works as I planned it, but there are still a few quirks I'm working on...

                  At the moment, the chaps over there informed me the setup works, but the board located at the tank up on the hill keeps going offline. This is the end which is solar-powered.....not a lot of sun in the past weeks over there, only rain and clouds, so I was seeing it coming to a degree and warned them about it. To solve this, they're going to have utility power ran to that shack, but in a pretty unorthodox way, which itself gives me another problem to solve instead of relieving me of it: instead of connecting to the grid like a regular consumer, they're going to cut some corners and expenses by grabbing electricity from the street lights system instead....even though these guys ARE the officials and such a decision doesn't make much sense to the common layman who's not into how politics and official stuff works Of course, this means that power to my shack will continue to go out and come back on, but at known intervals, along with the lamp posts in the village which also turn on and off at dusk and dawn respectively. So I still need that battery in there, but at least now I can charge it.....how ?

                  This is where I'd need some pointers, since I'm not sure how I should deal with this situation and what power supply to get for the job.

                  Our first candidate is the same I installed down at the pump shack: a Meanwell ADD-55A - a 12v+5v supply with battery backup. I was going to go with this one up here as well, but then I realised it would not be able to charge that 20Ah battery enough to last over the course of a day when the street lights go out. The charge current is only 0.23A. It may be enough for small outages, but I doubt it'd last more than a few hours...

                  This lead me to our second candidate, which is this Meanwell SCP-75-12: a 12v only supply, which also has battery support. The reason I put these two head to head in terms of how they handle battery backup is because the first one appears to have (as the datasheet claims) a dedicated battery charger circuit, while the second one puts the battery straight on the main output, with just a diode in between. This would allow me to push more current into the battery by simply increasing the output voltage. This leads to problems with the STM32 and GPON which may not like the 14-15v the battery requires to charge, so I'd need a step-down converter in there to limit to 12v for my devices. When on battery, this may not run correctly because the voltage drops too low.....

                  I must admit I haven't measured the current draw of the STM32 board, but I know for sure that ZTE GPON draws 0.2A, that's what the label says anyway. Even if this setup were to draw a whole amp, let's say, which I doubt is the case, it should in theory last a good day with a 20Ah battery. Charging the battery is another story, which is why I'm concerned about the choice of PSU. I only have one shot to get it right, so instead of jumping in, I thought I'd ask for help
                  Last edited by Dannyx; 12-15-2020, 10:49 AM.
                  Wattevah...

                  Comment


                    Re: Remote pump control ideas.

                    use a 12v psu - easy to get.
                    then add a 5v regulator for the electronics.
                    ideally a linear one using a 7805 for long term reliability.
                    not that i dont trust buck convertors - but they do have more to fail.

                    btw, how much watch flow is there?
                    because a small water powered turbine generator would be a sneaky solution.

                    Comment


                      Re: Remote pump control ideas.

                      Originally posted by stj View Post
                      use a 12v psu - easy to get.
                      then add a 5v regulator for the electronics.
                      ideally a linear one using a 7805 for long term reliability.
                      not that i dont trust buck convertors - but they do have more to fail.
                      7805 is too low for the GPON though - only the STM board may run at that. I'm currently running both boards (pump and tank) on 12v using their onboard regs. I also made a mistake regarding the power draw of the GPON - it's 0.5A, not 0.2A, so a bit more than I originally had planned.

                      Originally posted by stj View Post
                      btw, how much watch flow is there?
                      because a small water powered turbine generator would be a sneaky solution.
                      None actually - it's a tank dug underground, so I only ever see the calm water through a hatch at the top. I have no idea how it's transported there or where the pipework even is, plus such a project would take too long to pull off and requires too many parts.
                      Wattevah...

                      Comment


                        Re: Remote pump control ideas.

                        78s05 can supply 1.5-2A

                        so how much current at 5v do you actually need?

                        Comment


                          Re: Remote pump control ideas.

                          Originally posted by stj View Post
                          78s05 can supply 1.5-2A

                          so how much current at 5v do you actually need?
                          Realistically speaking, none - unless I switch the jumper on the STM32 to run on 5v instead of 12v....
                          Wattevah...

                          Comment


                            Re: Remote pump control ideas.

                            Originally posted by Dannyx View Post
                            Of course, this means that power to my shack will continue to go out and come back on, but at known intervals, along with the lamp posts in the village which also turn on and off at dusk and dawn respectively. So I still need that battery in there, but at least now I can charge it.....how ?
                            Have you confirmed the power will be on and off with the lights ?
                            UK street lights are switched inside the lamp post.

                            Comment


                              Re: Remote pump control ideas.

                              Originally posted by diif View Post
                              Have you confirmed the power will be on and off with the lights ?
                              Yes, the chap called me yesterday to let me know of this project and said the power would indeed cycle on and off with the lights, plus these are some simple light fixtures perched on top of some concrete posts, on the outskirts of a village, not some proper lamp posts (which may house a contactor for switching, or however it's done), so I don't think they've got anything more than 2 simple wires running to each of them, so they'll just tap into these and run a pair to the shack too.
                              Wattevah...

                              Comment


                                Re: Remote pump control ideas.

                                Back on this project, it just dawned on me that I can leave the solar system in place as it is as well, since it doesn't hurt to have an additional backup system in there....not sure where I should drop my mains power supply though.

                                I was thinking of wiring its output in parallel to the existing battery directly (first doodle), though I'm not sure the solar charge controller likes the voltage from the AC supply feeding back into its battery output. One of the power supplies I linked to apparently has a diode for the "battery" output already built into it, which is why I added one in red inside my "power supply" there. I'd set the output voltage of the supply slightly higher, to around 15v, and this would eliminate the need for a 12v regulator, since I'd be using the charge controller itself as a DC-DC converter.

                                There will obviously be a time of the day when BOTH the supplies would be "on" and try to pump current into my battery there....not sure if that's a good or a bad thing and whether I should use a small-ish value resistor in series with one of them to prevent killing the battery in some way.

                                Other examples even show the mains supply being fed into the solar cell input of the charge controller and toggling between which is being used via a relay (second doodle). The upshot of this is that the charge controller now also handles the charging of the battery when "on mains" too. The downside is that DC arcing may be an issue + the beefy wires coming from the solar cell in this particular case would be a nightmare to shove into a relay socket
                                Attached Files
                                Last edited by Dannyx; 12-24-2020, 07:15 AM.
                                Wattevah...

                                Comment


                                  Re: Remote pump control ideas.

                                  I also fixed the STM board which had died. I replaced the main IC and it works, so I now have my own board I can mess around with
                                  Wattevah...

                                  Comment


                                    Re: Remote pump control ideas.

                                    nice - getting the pins aligned must have been a bitch!

                                    Comment


                                      Re: Remote pump control ideas.

                                      Originally posted by stj View Post
                                      nice - getting the pins aligned must have been a bitch!
                                      No - it wasn't nearly as bad as I was expecting it to be (especially since I'm recently coming from a failed ITE chip replacement on a laptop board). I'd call the pitch "generous", as opposed to that ITE chip which is way finer. The tool which helped the most was a vacuum IC picker which I recently acquired, which made sure I wouldn't drive the chip sideways into any components when attempting to pull it off - it happened on that laptop board and I pulled my hair out !
                                      Wattevah...

                                      Comment


                                        Re: Remote pump control ideas.

                                        lol
                                        yea, been there - done that!
                                        nothing better than having to put loads of caps and resistors back!

                                        Comment


                                          Re: Remote pump control ideas.

                                          Ok folks, here's the situation with this project: I thought I was all done with it, but then I started having a lot of issues where the "client" board (at the pump end) would just stop responding and freeze entirely ! I enlisted the help of a friend of mine who's way better at programming than I am and we managed to - in a kinda-sorta way - isolate the issue, at least partially: we noticed the "client" board likes to freeze right after it receives a reply from the server.......but not always ! It's very sporadic and hard to pinpoint ! At this point we concluded it's probably a library issue and I'll try getting in touch with the creator....

                                          Long story short: board freezes sometimes, but NEVER before actually getting a reply back from the server, so the problem workflow is like this: client starts up > client obtains DHCP address > client connects to server > client sends out a "POLL" message > server gets "POLL" message and sends a reply with the state of the switch (ON/OFF) > client gets the ON/OFF message > client GPIO pins act accordingly > client board freezes.

                                          Other times it does it several times, but still ends up freezing ! The lock-up is so bad that the client board can't even be pinged from a command prompt at this point ! It's like the ethernet stack quits or gets stuck somewhere in the background. Not even the main loop runs ! NOTHING ! It just sits there mocking us ! It's not a hardware fault - I swapped the boards around
                                          Wattevah...

                                          Comment

                                          Working...
                                          X