Re: Remote pump control ideas.
I tried my separate supply idea on the breadboard today and it seems to work - nothing went up in smoke and the thing runs fine.
I also realized I may not be doing the right thing when it comes to driving the piezo buzzer I threw on there when I originally designed that "interface" board: I just wired it up straight to one of the Nucleo's pins, which may not be a wise thing to do ! Most of the tutorials on driving a buzzer with the Arduino (I'm sure it applies to the STM too) show a resistor in series with it too !
What I tried today was using a 2n2222 transistor to drive the buzzer from 5v like this, except the 5v is straight off the Meanwell supply, not the regulator of the Nucleo: collector to one of the buzzer's legs, emitter to GND, 5v from the power supply to the other leg of the buzzer, base to the Nucleo's pin via 220ohm resistor. It beeps nice and loud and thankfully didn't kill the pin. I learned these buzzers have a "kickback" like relays and coils, so it's apparently not a good idea to drive them directly with a micro...
Remote pump control ideas.
Collapse
X
-
Re: Remote pump control ideas.
A quick mod of the snippet I posted earlier: THIS is what I had in mind with those two separate supplies. The suffix _CON is for the "dirty, noisy, nasty" control side of things and _MCU is for the "clean" side where my Nucleo sits.
I realize now I probably made a mistake when choosing those 220ohm resistors for the opto's LED on the Nucleo's side: running the numbers again with the datasheet for the PC817 would make 220ohms more appropriate if the input were 5v instead of the 3.3v the Nucleo puts out on its pins. I can't remember if I dropped the value down to 100ohms in the final design and forgot to update the schematic, or I rolled with 220ohms indeed.
I THINK 100ohms would be more suitable for 3.3v input for a PC817. Correct me if I'm wrong:
(Vsup - VfMAX)/ If = R, so (3.3v-1.4v) / 0.02A = 95ohms....provided we take the MAXIMUM value of Vf in the datasheet.
On the transistor side, I again went with 220ohms, but I think this one can stay as it is even if I'm planning to have two separate supplies like this. If you compare the original snippet with this one, the collector was also connected to 3.3v there, which came from the Nucleo's own regulator. Since I'm planning to separate stuff, I don't have another 3.3v supply I can use on the "control" side, but I DO have the 5v output of the Meanwell. Once again, I ran the numbers like this and I think 220ohms is fine:
(Vsup - VbeMAX) / Rbase= Ib
Ib * hFeMin = Ic
So (5v-1.2v) / 220ohm = 0.018A
0.018A * 35 = 0.6A of collector current to drive lamps and my relay with.
This is taking the worst possible Vbe drop of 1.2v and the worst possible gain of 35, so in reality I'm expecting the collector current to be even better than this, as the gain will be closer to 100. The most power-hungry component I'd need to drive is the 12v relay, which sadly I can't remember the holding current of. The pull-in current is higher anyway, but shorter. The rest of the outputs are 12v LED indicators which draw like 60mA each. There's 4 of these, so 5 pairs of optos+transistors in this configuration.Leave a comment:
-
Re: Remote pump control ideas.
we just experimenting
and the nucleo isnt going to be pulling several amps - so size isnt a thing.Leave a comment:
-
Leave a comment:
-
Re: Remote pump control ideas.
yes, the thing like a 4pin transformer on any switching psu - like dvd players etc.
near the mains inputLeave a comment:
-
-
Re: Remote pump control ideas.
maybe you need a common-mode choke on the dc between the meanwell and nucleo - to kill any parasitic shit the wiring collectsLeave a comment:
-
Re: Remote pump control ideas.
Ok, more things we tried today, to little success.
I first measured the green PE conductor and it appears to be connected indeed - I get little resistance between it and the blue neutral wire and also get 240v between it and each of the 3 phases, so this makes the metal back and the chassis of the Meanwell PSU earthed. I measured the COM terminal of the Meanwell PSU and it's not main-earth referenced indeed, as the datasheet for the supply would indicate - it's capacitively coupled to earth, not a dead-short.
I took the risk and attempted a snubber across the small relay's contacts as well. I used the setup in the picture (wrapped in heat-shrink of course): a 0.1uF cap in series with a 47ohm resistor, following the discussion on this topic I had with the shop owner of the electronics store I got these parts from - he's a tech himself and we're close buds and he suggested a slightly higher 47ohm resistor, as opposed to the 33ohm one suggested. Thankfully nothing popped, but I'm not sure it's beneficial either....either way, it can't do WORSE I reckon, can it ?
None of these stopped the "client" from eventually going offline though. Not immediately, but about half an hour of being "OK"...
Another thing currently on my mind - actually several: moving my "brains" as far away from the power box as possible, despite this shack being pretty small - less than 3 meters wall to wall, so that's my maximum. I'm not sure if I should use the current plastic box or invest in a metal one. If metal, should I earth it or GROUND it ? I'd say earth it...
Also: using a second power supply JUST for the Nucleo board and the "LED" side of the optocouplers. I figured despite my best efforts, the GND wire running to the 12v relay, as well as to the various indicators I installed on the door of the power box, will always be in close proximity to high power stuff, possibly nullifying all other attempts at figuring out where the problem is, since I'm injecting noise into my GND wire...maybe. The idea actually came from my boss and I think it's not as crazy as it seems: if you think about it, an optocoupler doesn't have to use the same ground on both sides - they can come from different supplies. I figured I'd have one supply run the indicators and the 12v relay: I'd pass its GND through the 2n2222a transistors which are in turn driven by the transistor side of the optocouplers from the second voltage rail of my Meanwell PSU - 5v.
The current setup in the picture uses a 220ohm resistor in series with the optocoupler's transistor to the 2n2222a's base and 3.3v from the Nucleo's own regulator. I'm not sure if the 2n2222a can handle 5v instead of 3.3v with this 220ohm base resistor or if it needs to be bumped up some more - haven't done the math yet.
On the "MCU" side of things it's even easier, since I only have to worry about the 12v input to the Nucleo - the optocoupler's LED side is already working on 3.3v supplied from each digital pin of the MCU...
In other words, I'd cut that GND trace where the emitter meets the LED in my little schematic there and have two separate GNDs: a "clean" one for the box (which would also get relocated) and a "dirty" one in my power box...hope this is remotely close to feasibleLeave a comment:
-
Re: Remote pump control ideas.
I guess I could also measure between one of the 3 phases and the back plane - if I get 230v, would that make the back plane earthed ??
What is the antenna? Sometimes I have seen a grounding problem with the antenna bolted to equipment metal, so the antenna is grounded to the frame and thus the coax and GMS module and maybe everything get grounded that way.
It's not good to have the module+antenna grounding everything. I've even seen melted PCB traces.
I connected the earth screw terminal of the supply to the metal chassis which in turn connects it to the fat green PE lead....(whatever that might be, as I'm not sure), so I don't think it should be necessarily touching the metal back as long as I have its earth terminal connected to the metal back, provided it IS earthed.
Looking at the block diagram of this supply, it seems the GND (COM terminal or whatever) is not mains-earth referenced, because I see a capacitor there. In layman terms, if I put my meter across the PE screw and the COM screw there will be high impedance. I'm not sure if I should indeed tie COM to earth or if it would make it worse by making the whole backplane act like a huge antenna, coupling all that noise and crap straight into my board's GND...
This contrasts to how I know most TVs with a PE terminal: the PE terminal of the IEC13 lead IS connected directly to chassis GND, (cold negative).Leave a comment:
-
Re: Remote pump control ideas.
You can measure ACV between the backpan and some known earth-ground, such as the motor frame or tank etc.
If it's a low ACV reading, then proceed to measure ohms to see if the panel is actually grounded or it's going to Neutral.
GSM modules do make a lot of RF. Easily 2A pulses on power.
What is the antenna? Sometimes I have seen a grounding problem with the antenna bolted to equipment metal, so the antenna is grounded to the frame and thus the coax and GMS module and maybe everything get grounded that way.
It's not good to have the module+antenna grounding everything. I've even seen melted PCB traces.
There is a chance you've saved too much money stuffing all the low V and high V into a rat's nest.
The Meanwell PSU should have been bolted to the metal backpan so the case is grounded, not the top of the box so water can get in when it rains. Usually you have no holes on the top of an outdoor enclosure.Leave a comment:
-
Re: Remote pump control ideas.
Ok, time for more details, since it's getting interestingHere's a picture of the box holding all the high power parts, including the contactor. In the original setup, their power supply was in here too, so I kinda rolled with it and put it in the corner there myself. Looking at it now, I realize all my wires going back and forth in there are a bit too close for comfort to those big three phase wires sticking out the top of the contactor, and to the contactor itself for that matter, so that's one aspect which may be a no-no, despite most of them you see being outputs to the LED indicators on the door and these are GNDs which are "behind" optocouplers.
The only "direct" connection to my Nucleo144 is the GND wire and the 12v wire - the rest seem to be isolated, the way I see it, of course. There IS one other wire which is connected directly to the perfboard, which is a 5v wire coming from the PSU (12+5v output supply) which I send to the transistor sides of each of the optocouplers to drive the bases of the 2n2222a transistors which in turn provide the LEDs (and small control relay) with their GND, allowing them to switch on. I didn't want to use the Nucleo's built-in 5v regulator for fear I may overload it - since I have a 5v-capable supply, I figured I should use that.
My "brains" sit in a box right above this one, with the Nucleo at the very top, that brown perfboard in the middle and a GSM dialer module at the bottom. I realize now, after testing it some more today, that this GSM module may be causing interference of its own - more on this later, as it can easily be removed and it's not mission-critical ATM. I just found it there and decided to keep it...
The contactor is this one, in case someone's curious, plus it also allows me to look up the actual current draw of the coil, which the datasheet gives as 190VA at pull-in which then drops to 16VA holding (if I'm not mistaken by the numbers on pages 3 to 4). I was thinking these figures may be relevant when trying to design some sort of snubber for it.
About this: varistor vs. snubber. I read about varistors and know what they are in general, having worked with power supplies in consumer electronics before which all have them, but reading more closely about their performance over time and also the possible fires they can start concerns me. This is out in the middle of nowhere, where power is anything BUT stable....so there's that. I'm not sure how an RC snubber would perform by comparison, what its strengths and weaknesses are and whether that formula I found holds true for AC as well...
This would mean the PE of my Meanwell supply up there is floating and not dissipating anything. Construction-wise, I'm expecting the supply itself to have a blue Y cap between the PE screw terminal and the the 12v GND terminal (our negative 12v, or "return" as I've seen it written on some supplies when talking about the SECONDARY side)...
Oh and don't worry about that junction box at the far left - that's just something I threw in there to allow me connect multiple wires to GND or 12v more easily, since I knew I'd wouldn't be able to stuff all of that directly onto the screw terminals of the power supply, so I added those pre-assembled busbars to give me more screws to work withLast edited by Dannyx; 03-04-2021, 01:06 PM.Leave a comment:
-
Re: Remote pump control ideas.
I think you have to chisel away and deal with each EMI source/problem one by one.
The contactor's coil does have a huge back EMF which would make the little relay contacts arc.
The relay's contacts are high voltage and dirty (EMI) - and that wiring must be kept as far away from all the low voltage wiring.
The arc at the contacts can radiate EMI and capacitively-couple it to the coil's 12V connection. This path gets it into your 12V system.
What is usually done is either a MOV (i.e. 275VAC) across the contactor's coil (limits back EMF) OR an RC snubber across the little relay's contacts like 0.1uF X2 275VAC and say 33R 1/2W.
Suppressing arcing at the motor contactor is expensive and hard to do. It's a big motor and nasty high voltages there. Not really feasible. Best is to keep the MCU away from it, or in a metal box.
The opto-board looks OK. How is the earth-grounding to the 12V side done? Or is it floating? You can add a 0.1uF cap from 12VDC(-) to earth ground and that usually helps, if the EMI is present there.Leave a comment:
-
Re: Remote pump control ideas.
they cant really blow up because while the cap can short, it has the series resistor to limit the current.Leave a comment:
-
Re: Remote pump control ideas.
The three phase Siemens bastard is a 230v coil and the smaller one driving it is a 12v coil. I'm always afraid something in that R-C snubber may go poof and f*ck up something else....possibly injuring me in the process, tripping breakers, etc....
For instance, I found THIS, but I'm not sure about the diagram: which one is it ? Is it showing two ways in which this snubber can be "deployed" (across the contacts OR across the load), or is it case-specific ?Last edited by Dannyx; 03-03-2021, 02:58 PM.Leave a comment:
-
Re: Remote pump control ideas.
you can put snubbers across the relay contacts or maybe even the contactor.Leave a comment:
-
Re: Remote pump control ideas.
So: replacement board arrived, we messed with it some more on the bench and my programmer buddy managed to comb through my original code and mix and match stuff to make it a bit better, both in terms of formatting and functionality. It now "waltzed" back and forth no problem and recovered from any network drops we threw at it - both on the "client" side (pump) and the "server" side (tank). We stress-tested it as much as we could on the bench and thought we were done with it, BUT:
When we went to test this out on the real deal, we ran into more problems once again. I REALLY need to redesign the power section, I think. It appears the three phase contactor is causing enough EMI to freeze my "client" board, since although the boards never froze once back at the shop, now the client is VERY unstable and would often crash following the contactor opening, though not always. Either the main loop freezes, so it never even attempts to re-connect to the "server" over at the tank side, OR something happens to the LAN chip and the link drops altogether (LEDs go off on the RJ45 jack and the GPON it's connected to) ! I have no idea how to deal with this, sadlyThe contactor is roughly 70cm away from the Nucleo board and they're both in separate boxes !
To recap what my setup is: I'm powering the Nucleo via its VIN pin with 12v and I set the selection jumper accordingly. The 12v comes from a Meanwell power supply which sits in the same box as the contactor, quite close in fact. I tried to separate the board from the "power" side as much as possible, so I used optocuplers and transistors to drive any 12v indicator lamps and also the 12v relay which in turn controls the big 230v contactor. To hold all these, I build the PCB in the picture. It's a perf-board, since it's all quick and dirty - no money spent of printing PCBs, plus I am clearly not a pro at designing PCBs either. Still: I added a diode in series with the 12v input and dropped a cap on it as well. The wires on the left where the screw terminals are go to the various components of this system, including the GND and 12v input. From there, I go through a diode and I also threw a cap there. From there, we go to those IDC connectors which I used to make my own "harness". The one on the left is mostly for power: 12v, GND, 3.3v and the reset pin (since I have a big reset button on the front panel). The plug on the right is for indicators and the relay. All have a resistor>optocoupler>transistor.
The latest thing I tried was sticking a Schottky diode 1n5819 between the 3.3v pin of the Nucleo itself and its GND. Not having an oscilloscope to actually test all of this hodge-podge the idea behind this was to clamp any negative spikes the chip itself might experience on the 3.3v supply pin....it's not the end of my concerns though.....clearly. It could very well be a bad choice of diode entirely and the least of my worries.
I am not sure what is generating the interference to begin with and what part of my board picks it up: is it the three phase power arcing in the main contactor, or perhaps the small 12v relay itself arcs when it cuts the power to the contactor, since it's pretty big and runs on 230v, so that may also be it. Is it picked up by the power pins, all those exposed pins the Nucleo has, the network cable itself ??? Who knows......there's so many variables here that I can't test and I admit I bit off more than I can chew...
Guys, please bare with me as I am NOT an expert - just wanting to learn from my mistakes for future projects.Leave a comment:
-
Re: Remote pump control ideas.
We hit a snag yet again (this project's just not meant to be): the board which had died the first time which I fixed, died again today
This time, the chip appears to have shorted out, because I get the "overcurrent" LED come on and sure enough, the resistance is very low on the 3.3v pin. I will proceed to inject some voltage to blow out whatever's busted - maybe I get lucky and it's a ceramic cap...I've seen it happen on laptops before.Leave a comment:
-
Re: Remote pump control ideas.
I can now definitely confirm there's a power issue messing us up. There's some situations in which the client board locks up and no longer loops and these can be replicated each time, so they're too much to be coincidences
Case no.1: both boards are connected via USB to the same computer host. In this case, the client connects to the server, but they only manage to exchange 1-2 messages before the entire thing breaks down and the client freezes...
Case no.2: that thing I described where the server is unplugged from mains together with the USB power adapter that powers it - not just from its USB connector. Plug it back in and, annoyingly enough, it's the CLIENT loop that freezes ! I say "annoyingly" because the client isn't even powered off to begin with - instead, it just telepathically knows the entire brick got unplugged....HOW ??? EMI most likely, though I WILL try moving the boards farther apart. However, try the same exact thing, but by unplugging just the USB cord from either the charger or the board end and leave the brick plugged in and the code resumes just fine (and also keeps looping if there's a connection error, as it should)...WTF ?
From a factual standpoint, I installed the "client" board in its own enclosure, what I consider to be a pretty good distance from the three phase contactor at the actual site where the pump is, so I'm hoping this doesn't turn out to be a problem there, though as far as I remember, I could still hear the buzzer buzzing away when the connection was "dead", so the loop was not stuck - there was still a code bug at that stage...If we get that out of the way, we should be good. My programmer buddy made some mods to the code here and there and it starts to look a whole lot nicer now. He stress-tested it all day while I was away, but when I came back I wanted to do the all-important power-cut test and did it by unplugging the wall-wart, letting the client board go into its comErr condition and lo and behold, nothing else happened when I plugged the server back in - the loop had frozen and we had a "uuughhh....f*ck" moments :|Leave a comment:
-
Re: Remote pump control ideas.
I will not even run the relay through my "filter" here - just the Nucleo. I sure hope my changeover idea is "decent" enoughLeave a comment:
-
Re: Remote pump control ideas.
probably 470uf is enough - your relay coil will draw far more than the nucleo!!Leave a comment:
Related Topics
Collapse
-
by tmhobadcapI have this receiver for at least 10 years. Usually, we just use the remote for turning on/off and adjusting the volume. Recently, the remote control started not able to turn the receiver on. Later, the volume also could not be adjusted by the remote control.
At first, I thought that it was the usual problem which can be fixed by cleaning the contacts on the switches and the pcb. I opened the remote and clean it with alcohol. The remote did work again after that. But after one day, it did not work again. I opened it again and clean with alcohol and contact cleaner. Again it worked... -
This specification for the HP Mobile Thin Client mt44 Mobile Thin Client 3JG86EA Mobile thin client can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the mt44 Mobile Thin Client 3JG86EA boardview and mt44 Mobile Thin Client 3JG86EA schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note...09-06-2024, 06:50 AM
-
by piipoHi, I have an old Privileg brand 5.1 speakers. I have lost the remote control. I have an universal Harmony remote but there is no Privileg brand in it's software to add. Does anybody have an idea what alternative brand for a remote can I try instead? I'm attaching an image of what the speakers looks like. The image shows 2 main speakers, they are 5 + 1 in total. Thank you very much1 Photo
-
Channel: Troubleshooting Audio Equipment
09-18-2024, 01:55 AM -
-
This specification for the HP mt44 Mobile Thin Client Mobile thin client can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the mt44 Mobile Thin Client boardview and mt44 Mobile Thin Client schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no warranties that any specification,...09-06-2024, 06:50 AM
-
This specification for the HP mt44 Mobile Thin Client Mobile thin client can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the mt44 Mobile Thin Client boardview and mt44 Mobile Thin Client schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no warranties that any specification,...09-06-2024, 06:50 AM
- Loading...
- No more items.
Leave a comment: