Please evaluate and educate. First post

I have a small vibrating conveyor that feeds a load cell. The conveyor is vibrated by a solenoid (looks like half a transformer with other half being the conveyor bed) controlled by a variac off the mains supply. When load cell reaches set value, conveyor stops, relay closes, drops contents of load cell, start again.
I want to controll the conveyor speed. Fast for 90% of cycle then log scale slower for last 10%. (I would also like to adjust for discrepancy between scale set and scale value, something's are still falling when conveyor stops, but that is icing on my cake). Pretty sure I have the load cell part sorted.
My plan it to use half an H bridge to to control 24v pulses with the PWM on arduino. Put the 24v thru a 24/240v transformer (I have massive transformer) and feed it to conveyor. Run at set speed and them something like the "dim" sketch to slow it down. Have it controlled by the adc converted value from analogue load cell.
A: am I on the right track?
B: do I need to isolate the mostest in the bridge from arduino? Optocoupler etc?
The voltage and frequency I suspect is not critical, at present 160v is flat out. I also will have to sort the code. But am I am I at least pointing in the right direction?
It's for packing caramel macadamias. If u r in OZ I can send some in exchange for code :slight_smile:
First post , pls be nice

I don't get the whole picture.
There are three things going on:

The solenoid for the vibration is okay ? You could switch that on and off with a relay or perhaps a SSR (Solid State Relay).

Do you want to measure the weight with the load cell ?
The Arduino has only 10-bit accuracy, so perhaps you need an extra ADC chip of 16-bit accuracy.

What kind of motor is the conveyor belt ? What is its voltage and current ?
Is it a 240V AC motor ?
I don't think you can create pulses to make that motor run.
You need a triac control, but a triac control for motors is more complicated because it is an inductive load.
Using a optocoupler would be the first thing to do. Large voltages and large currents don't mix very well with very small signals such as the load cell. With an optocoupler that problem is solved.

I get the impression you already have a working solution, but there's a lot about that which you haven't described. If possible, I'd try to integrate the new 'variable speed' feature into a single solution and not have one system to control speed and another one to control the switching and relays etc.

What you're describing seems basically feasible. I'd look for a solution that switched the mains supply on and off under Arduino control, using something like a power tail switch.

You will need to find a suitable control algorithm. Since you can only add material (you can't take it away) you will want to creep up on the final weight but need to ensure that you don't get stuck in a situation where the amplitude you provide isn't enough to move that last little bit - or not in a sensible time frame. A PID feedback algorithm would be the most obvious solution - you can configure it so that the speed drops as you approach the target but it will still ramp the output up and down as necessary to achieve the target speed until you hit the target. A cruder approach without using PID would be to output a sawtooth wave form for low speeds and chop the output when the speed is right. You'll still have to play around with the parameters to get the right trade-off between speed and accuracy.

Generating 24V pulses and feeding them through a transformer is not a good way to control the motor speed. However, if it is a brushed AC motor, then you can use phase control with a triac, just like a light dimmer. See Arduino Playground - ACPhaseControl for an example. For 240V mains, you should increase the two 15K resistors to at least 30K. You may need to connect a snubber network across the motor.

If it is an induction motor (no brushes, and probably either 3-phase or with a large capacitor for starting), then you're out of luck.

Is there even a motor on your conveyor? Does the solenoid actually move the belt, besides vibrating it?

You probably don't NEED to isolate the high voltage circuitry from the Arduino--you could probably get it to work without that. However, optoisolators are cheap and fast and would protect your circuit. Highly recommended.

Sorry, bad description. This machine feeds ( edible) nuts down a vibrating conveyor. The pulses of voltage make the conveyor vibrate. The drive is best explained as an EI transformer with one side attached to base and the other to conveyor bed. 50/60 hz makes it vibrate.It already works of the main supply thru a variac, but only full on full off. Like a variable frequency drive, but not a very smart!
This makes the weight measured by load cell very inacurate because to run conveyor fast enough lots of nuts are in mid air when conveyor stops.
The voltage and frequency are probably not critical. This is not a motor or a stepper.
I want to slow maybe last 10 percent of the cycle controlled by the digital out put of the load cell AMPLIFIED to the arduino
I understand ( a bit ) about mosfets. That's why I use them.
Hope this clarifies

Vibrating conveyor. Not one with a belt. Vibrating!

Hmmm.

I'm not sure what the wave form that ends up on the other side of the massive transformer will be like. Not likely to be a sine wave, but that might not matter.

If it doesn't work, I think a triac dimmer circuit on the mains that either clips part of each cycle or skips entire cycles would work.

Sounds like your vibrating "motor" would be akin to what is inside an aquarium air pump or a fire alarm bell. You could follow dc42's suggestion; that would not change the frequency of the vibration but it would change the strength of the vibration -- and that would be acceptable to slow things down. Here in the US there's a product called the "ZeroCross Tail" but unfortunately it's only 120V.

If you have a variac with an adjustable dial perhaps it would be simpler to manipulate that dial using an RC servo or such.

" if you have a variac with an adjustable dial perhaps it would be simpler to manipulate that dial using an RC servo or such."

This would seem the most unlikly method.
. i have an analog voltage from my load cell. Can't I convert that to a digital input and use that to control the gate signal of the MOSFET. Run at full speed until....
Then something like a dimmer sketch until the set weight on the load cell. Only one weight, 100grams, so linearality is not an issue. The conveyor is pretty "stupid". I mean it doesn't care if it's 120v or 250v or what frequency it is. It's more a matter of getting the optimum settings.

My original question was, is this a good way to go about it?
I realize that putting it thru a 24/240 transformer will mess with the wave form, but I don't need an accurate wave form.
I can use my hand as "an RCA servo". It works like magic, but not for 20 shots a minutes. :slight_smile:
Basically, will an arduino process an amplified signal from a load cell, digitize it, then use that signal to control the gates of half an H bridge to control an inductive load.
I realize there might be better ways to do this, but this is what I understand
It would be easier for me to use vacuum tubes, that's what I am very comfortable with, but being 2013 maybe a mosfet inverter is not to big a leap.
I really appreciate all the input. Steep learning curve and I love to learn
Thanks

OK, I understand there's no motor, just a vibrator. Are you sure that it doesn't care what the supply frequency is? It may well be that the conveyor is designed to be mechanically resonant at 50 to 60Hz.

Using mosfets to drive a mains transformer in reverse is certainly possible. The easiest configuration would be two mosfets driving a centre-tapped transformer in a push-pull arrangement. Another possibility is a high-current H-bridge, which you can buy via eBay. However, I still think phase control with a zero-crossing detector and a triac will be easier, and it doesn't need you to provide a high-current 24V power supply. Phase control will allow you to control the amplitude of vibration, similar to using the variac to reduce the voltage.

bullpeters:
" if you have a variac with an adjustable dial perhaps it would be simpler to manipulate that dial using an RC servo or such."

This would seem the most unlikly method.

Well, put it this way:

dc42 can help you figure out AC phase control, picking out the right optocouplers, triacs, resistors/etc. and, after getting your parts ordered, showing you how to arrange and solder them onto a perfboard safely so you don't fry yourself when you switch on that 240VAC. Then you'll go through coding interrupt routines so you can find the zero cross, calculating the proper time to switch on the triac for proportional power, and executing that timing for phase control.

In the meantime you drive down to the hobby store to buy an RC servo, duct tape it to the side of the variac with a plywood pulley and rubber band for a belt so you can manipulate the knob. I'd then direct you to the ~20 line Sweep example for how to control that servo.

I don't mean to pick on anyone here I'm just trying to be realistic. AC phase control is not a novice level or safe subject.

Not feeling picked on, very grateful that you take the time to reply. Ultimately this will controll four conveyors in parralell and I hope to be able to compensate for "in flight" weight to the load cell. So it really needs to be digitally controlled. I could bUy a commercial solution but I would rather do it my self. Believe me I take it all on board and thank you all for all your help.
Way till the. Code questions start!!
:slight_smile:
Thank you all

"The voltage and frequency I suspect is not critical, at present 160v is flat out."

Yes. But it isn't already doing what you want. Frequency will control the speed of the vibration, voltage/current will control the strength of the vibration. Increasing the strength of the vibration will only make your nuts bounce higher on the belt. Controlling the speed (frequency) of the vibration will increase the energy, which will make the nuts move along faster.

Look at it this way... imagine the waveform of your vibration and your nuts riding on that waveform because that is pretty much what is happening here. The crests jump the nuts up off the belt. A higher amplitude crest will only make them jump higher. Now, in this configuration, the nuts are simply jumping up and down vertically and there is no forward or backward motion.

Typically (there are various types of vibrating conveyors, not sure which type you are using) the surafce has a slight incline, so that when the nuts jump in the air, they fall forward. In this case, the vibration is actually just reducing friction, really (by sending the nuts up off the surface.) Vibrating them faster would keep them in the air more often, so less friction means they fall faster down the surface. I suppose that increasing the amplitude would keep them in the air longer which would also acheive this purpose to some degree. But you risk jumping them high enough to either knock them over the edges or start breaking them apart. You also increase wear and tear on the machine this way.

So three variables will control the speed:
The steepness of the incline, the frequency of the vibration, and the amplitude. Out of those options, the amplitude would seem to be the one with the most drawbacks. Ideally, if you could get the frequency high enough, you would essentially create an air pocket beneath the nuts and they would essentially just float above the surface (like a table hockey game.) Also increasing the frequency high enough would reduce the noise. That would require ultrasonic frequencies. Of course there are mechanical limitations to how high a frequency you can go.

And to answer one of your original questions... if you use a triac instead of a FET, you can simply control the AC voltage directly without the need for the transformer. But you do need to keep in mind switching at the zero crossing point, which means you need a detector circuit for that.

Likely your vibrator would work with a pulsed DC voltage instead of AC. In which case, you could simply use a FET and not have to worry about the zero-crossing point.

The software side looks non-trivial but definitely feasible. It is the hardware and power side that is uncertain. It's certainly possible to regulate mains voltage AC directly and plenty of resources showing how to achieve this using zero crossing and a triac, but it's not IMO a job for a novice. How much current are you trying to regulate at 240V? In your step-up transformer solution, do you have a smoothed 24 DC supply with sufficient current capability to transform up to that much mains voltage current so that you could generate the AC using an H-bridge? That would seem a lot easier and safer, if it's within the spec of a readily available H-bridge driver.

Trying to apply some lateral thinking to the problem, you may be able to tackle the problem another way and control the delivered weight by careful timing of the discharge without stopping the conveyer. I mean, you will know at any moment how quickly the stored weight is increasing, and you can assume that the time to discharge the complete load is fixed and known, so you could open the discharge gate at the point which would result in the correct weight being delivered at the point you close the gate. If you see what I mean!

PeterH:
The software side looks non-trivial but definitely feasible. It is the hardware and power side that is uncertain. It's certainly possible to regulate mains voltage AC directly and plenty of resources showing how to achieve this using zero crossing and a triac, but it's not IMO a job for a novice.

I agree with you completely Peter, but when I see advice like this, I hear "Don't cook, leave it up to the chefs!" People learn by doing. Introducing someone to the right concepts points them in the right directions to begin learning. Usually THAT is the step that people are stuck on (just like I was with the PID issue you helped me with.)

I am not saying that you are wrong, I just keep seeing that type of advice here and it is troubling and could easily be perceived as insulting (it would be to me.) I don't consider myself stupid, a newbie, or even a novice simply because I ask a question. Sometimes I just need someone to point in the direction that I need to look to speed up the process of learning, to introduce me to a new concept I wasn't aware of, or to break my tunnel vision. But I know that I will need to go and learn about whatever is new on my own. Just need a nudge sometimes or a fresh perspective.

Personally, I find it much more respectful to approach helping people that way.

There may be cases where we tell someone that a triac is the proper route, and they simply go and plug one in without understanding it, but that is unavaoidable (and hopefully the last time they would try that!) A smart person will instead go and look at how a triac works and all the theory behind it, then either experiment SAFELY or come and ask more questions about parts they don't understand. So, to first assume that they wouldn't go and try to learn about the concept would assume they aren't a smart person.

Everybody is a newbie and a novice at some point. Nobody is born knowing how to connect and control a triac. The best time to learn is when you have something you need to apply it to.

To close off certain information because we assume that someone isn't going to understand it feels a bit arrogant to me. We are here to learn, to teach, and to help, right?

You are always helpful, so please don't think I am assuming that you intend it that way at all. Just would love for people to take a moment and think about how this would come across to them if someone were to say it to them.

There may be cases where we tell someone that a triac is the proper route, and they simply go and plug one in without understanding it, but that is unavaoidable (and hopefully the last time they would try that!) A smart person will instead go and look at how a triac works and all the theory behind it, then either experiment SAFELY or come and ask more questions about parts they don't understand. So, to first assume that they wouldn't go and try to learn about the concept would assume they aren't a smart person.

Everybody is a newbie and a novice at some point. Nobody is born knowing how to connect and control a triac. The best time to learn is when you have something you need to apply it to.

While your points have do have some merit, I just feel you are making too many assumptions about what a given person of unknown knowledge and experience may go off and do with such advice.

Because AC mains powered devices and circuits have large safety considerations for risks of possible injury, death, and/or major property damage, I have tried to adapt the rather arbitrary stance of "if you have to ask you probably shouldn't be messing with it".

I try not to sound abusive or condensery about it and many time just won't post a response at all. But I do cringe at time at some of the suggestions or advice given out to what appears to be pretty inexperienced people.

The internet and it's anonymity allows one to give out advice and recommendations with not much personal accountability of what it might lead to even with the best of intentions. I ask that people at least consider that.

Lefty

retrolefty:

There may be cases where we tell someone that a triac is the proper route, and they simply go and plug one in without understanding it, but that is unavaoidable (and hopefully the last time they would try that!) A smart person will instead go and look at how a triac works and all the theory behind it, then either experiment SAFELY or come and ask more questions about parts they don't understand. So, to first assume that they wouldn't go and try to learn about the concept would assume they aren't a smart person.

Everybody is a newbie and a novice at some point. Nobody is born knowing how to connect and control a triac. The best time to learn is when you have something you need to apply it to.

While your points have do have some merit, I just feel you are making too many assumptions about what a given person of unknown knowledge and experience may go off and do with such advice.

Because AC mains powered devices and circuits have large safety considerations for risks of possible injury, death, and/or major property damage, I have tried to adapt the rather arbitrary stance of "if you have to ask you probably shouldn't be messing with it".

I try not to sound abusive or condensery about it and many time just won't post a response at all. But I do cringe at time at some of the suggestions or advice given out to what appears to be pretty inexperienced people.

The internet and it's anonymity allows one to give out advice and recommendations with not much personal accountability of what it might lead to even with the best of intentions. I ask that people at least consider that.

Lefty

That's because I am not anyone's mother. Their safety is THEIR concern. If they do not have concern for their own safety, absolutely nothing I say is going to save them. I think mentioning it may be dangerous is simply good enough and move on. But we are talking here about an example where no matter what, the user is playing with mains voltage. There is risk, period.

It's not as if I am telling him to plug one end of the mains voltage into pin 2 and the other into pin 4. There isn't enough information given to even harm himself because he will need to go research how to hook it up in the first place.

Honestly, I am not making any assumptions at all. I am giving information. They can do with whatever they want, including ignoring it completely. The only assumptions being made are assuming the person has a lack of common sense, skill or intellect, and honestly.... that is just arrogant.

I would completely disagree that just mentioning that a triac is the right tool for the job is dangerous in any way, shape, or form.

We need to really stop trying to be people's mothers around here. I'm sorry, but that really irritates me. It is condencending by its very nature whether that is intentional or not. The offered solution seems to be holding out information to people simply because we think they might be stupid enough to just jam a triac into an outlet because some guy on a forum mentioned the word? Seriously... think about it.

Where do we stop? Should we not talk about scissors because people might cut themselves? Maybe we should tell them that they need to hold the plastic end, not the metal end?

Where do we stop?

Where we start and where we stop is a personal subjective choice we all make for ourselves, lets leave it at that.

Lefty