Connect with us

Model engineer needs help

Discussion in 'General Electronics Discussion' started by stew1954, Nov 24, 2012.

Scroll to continue with content
  1. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    Hello everyone, I'm a model engineer who needs your expert help.
    I have a steam powered model boat and I am trying to design a system that monitors the water level in the boiler and tops it up as necessary.
    I have designed a sensor that detects water in a sight glass. This sensor gives an output of 3v when water is detected and 2v when no water is detected. This output is fed to an opamp (LM358) which outputs either 5v or 0v.
    I also have a servo driver which gives either full clockwise rotation or full anticlockwise rotation of a servo depending on position of SW1. The values of R3 and R4 determine the amount of rotation.
    What I want to do is use the output of the sensor circuit to control the servo driver.
    I would also like to have a time delay so that when the sensor output changes from +2 to +3 there is a delay of about 10 seconds before the output of LM358 changes from high to low.
    Does anyone have any ideas how to combine these two circuits?
     

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    Check out a 555 monostable circuit.

    The output will chance as soon as you trigger it, but it will remain in that state for the monostable period after the trigger signal is removed.

    I think that's kinda what you're after.
     
  3. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    Thanks Steve,
    A 555 monostable circuit looks ideal for the time delay but this raises a few questions, (I'm pretty much an electronics novice).
    1: can the servo driver be adapted to make it a monostable circuit or do I have to use a seperate 555? The servo driver produces either a 1mS or a 2 mS pulse every 20mS.
    2: can I connect the output of the LM358 directly to pin 2 of the monostable circuit and if so is the 10k resistor still needed?
    3: will the output from the monostable circuit remain high for as long as the output of the LM358 remains low + the time delay, or will the time delay kick in as soon as the LM358 output goes low and switch off whether the LM358 output is low or high?
    4: if I connect pin 3 of the monostable circuit to the junction of R3 and R4 in the servo driver circuit will it effectively bypass R3 or does the 555 have any internal resistance which will need to be factored in?

    Sorry about asking so many questions but as I said earlier I am a novice, however I find electronics fascinating and I'm learning something new every day.
    Stew
     

    Attached Files:

  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    In that circuit you've shown, the load is turned on the moment you press the button, and remains on while the button is pressed. When the button is released, the monostable's delay starts, and the load is switched off after this time has elapsed.

    1) The servo driver looks like an oscillator where the mark-space ratio changes with the switch being closed. You could connect the output of the 555 up so that when it goes high, it switches a transistor (or mosfet) which effectively duplicates the action of the switch. Is that what you want?

    2) I would say the answer is Yes. (and the 10k resistor could be eliminated). There may be issues about what happens when the circuit is powered up though.

    3) The former. When the trigger input goes high the timing period starts.

    4) you would need to use a diode to prevent the output (when low) from disabling the oscillator. Also, the 555 can't swing all the way to the +ve supply rail, so timing may be influenced. A transistor driving a mosfet would be optimal, but you may not need an optimal solution.

    Can you breadboard this up and see how well it works?
     
  5. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    Hi Steve
    I would like to thank you for all the help and advice that you have given me so far, I really appreciate it.
    I won't be able to breadboard it until tomorrow, work stops play.
    I would like your thoughts on the circuit below, is there anything obvious that I've done wrong or missed?
    I know I may have to alter R3 and R4 to give me the required servo movement.
    Is 470 a suitable value for R8?
    Is there any reason why C2 and C4 are different values, the monostable circuit and servo driver are circuits I've downloaded and I've no idea how these values have been calculated. If I could use the same value for both what would be the best value to use?
    Cheers Stew
     

    Attached Files:

  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    When switching loads, you normally place them in the collector of the transistor.

    I would replace R8 with a diode with the anode connected to pin 3, and the cathode to the junction of R3 and R4.

    Similarly, I would probably connect the 555 output directly to the servo. Is there a reason you're going via that transistor?

    C2 and C4 are not too critical. Make them both 0.01uF and that will be fine.
     
  7. Rleo6965

    Rleo6965

    585
    9
    Jan 22, 2012
    Just wondering. What's the purpose of switching T2 transistor on that will results output of IC2 of 29.2 hz of 744us short pulse width? And when T2 was off, the result output of IC2 was 30 hz with 744us short pulse width. Only 0.7hz difference?

    Can you give specs of RC Servo, so I can understand the purpose of your circuit. I might be able add some help.
     
    Last edited: Nov 27, 2012
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    The pulse should be a lot shorter with that transistor turned on. Resistance falls from 20k to 8k (ish)
     
  9. Rleo6965

    Rleo6965

    585
    9
    Jan 22, 2012
    As steve mentioned. You need to place a 0.1uF in series between LM358 pin1 to NE555 pin2 and connect a 10k pullup resistor. Connect one end of resistor to NE555 pin2 and other end to +VCC.
    This will create short high to low pulse every time LM358 output switch from high to low. Thus trigger NE555 10 sec output.
    Remember, LM358 output remains low until water sensor was changed to switch back again the LM358. Without the 0.1uF, the NE555 monostable output of 10sec. will remain high until water level sensor changed. This will defeat your designed 10sec monostable.

    You need also to replace npn switch transistor with diode as steve suggested. I learned another one from steve.:)
     
    Last edited: Nov 27, 2012
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    My reading is that the capacitor was not required because the monostable was designed to keep the output on 10 sec longer than the driving signal (not for 10 sec as the signal changes state)

     
  11. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    First of all let me thank Rleo for joining in.
    I'll give a brief description of what I want the circuit to do.
    When the water level drops below the sensor I want the servo to rotate fully in one direction to operate a water pump which refills the boiler.
    When the sensor detects the water again I want the pump to continue for another 10 seconds before the servo turns fully in the opposite direction turning off the pump. This is to take the water level above the sensor so that the pump is not rapidly turning on and off when the water is level with the sensor.
    The servo is the type used in radio controlled models to control steering, throttle, control surfaces etc. and is bsically an electric motor which alters the position of an arm. The position is determined by the length of an electric pulse. A 1mS pulse turns the arm fully in one direction and a 2mS pulse turns the arm fully in the other direction or anything in between, total movement is about 90 degrees. The servo expects these pulses approx every 20mS.
    The length of this pulse is determined by the resistance of R3 + R4, 8K gives full movement one way and 20K gives full movement the other way.

    Steve, in post #4 point1) you say to use a transistor to duplicate the action of the switch, but in post #6 you say to connect pin 3 to the junction of R3 and R4 using a diode, which is correct?
    I would prefer to use a diode as it will make the circuit simpler, do you have a particular diode in mind?
    I don't know why the output to the servo is through a transistor, could the current be too high for the 555? I'd be happy to leave it out if it still works.
    Please feel free to post a diagram of any modifications as a picture says a thousand words.
    Thanks Stew
     
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    Both are correct. The diode from the output of the other 555 is simpler. If you look at the circuit inside a 555 you'll notice it has a pair of transistors. The diode is there so that only one of these transistors has any effect (the other would pull the point to ground which would totally stop the oscillator).

    That's why I recommended it. Note that I also said that you may have to fiddle some component values, but I hope you'll just get away with it.

    I'd suggest something like a 1N4148, 1N914, 1N4001, or pretty much any other normal diode (i.e. not a zener or LED, etc) you have hanging around.

    I doubt that the required current is significant. This input is a signal, not power. DO you have specs on the servo?

    I'd try it without the transistor.
     
  13. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    OK, here's my suggested modifications:

    [​IMG]
     

    Attached Files:

  14. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    Thanks Steve
    The only specs I can find for the servo is that, at rest, there is a current drain of 80mA which presumably is the signal current plus any current used by the electronics inside the servo.
    I'll test your circuit on a breadboard this afternoon and let you know how I get on.
    thanks Stew
     
  15. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    I set up the circuit below on a breadboard and everything works fine except for the time delay. When the water level is low the output of 358 goes low and the time delay immediately kicks in giving me minimum 10 seconds or until water reaches sensor again. I really wanted time for water to reach sensor + 10 seconds.
    It's no big deal and I can live with it but it's not quite what I was after.
    Apart from that the circuit works great and I am really happy.
    If there is a simple answer let me know but don't be pulling your hair out.
    I will be adding a couple more sensors in near future and I hope it's ok to call on your help and expertise if I get stuck.
    1 to monitor water level in feed tank which will light an LED when water level low and also disable the pump in this circuit so that the pump doesn't run dry.
    2 to monitor boiler pressure and operate another servo which will regulate the gas supply.
    Thanks Stew:D
     

    Attached Files:

  16. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    651
    May 8, 2012
    Hi Stew. Being an amateur machinist, life long steam head and ferroequinologist, I'd love to see a photo!

    Chris
     
  17. stew1954

    stew1954

    47
    0
    Nov 24, 2012
    Hi Chris
    Would that be a photo of the boat, the engine and boiler, or the water level sensor?
    Are you a model maker, or do you just play with the big stuff?
    Stew
     
  18. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    651
    May 8, 2012
    Some pics of the boat and engine. Love models but never made any. Always thought I would someday but sooner or later we all run out of somedays. As you can see by my pic I may want to hurry! :D

    South Bend Heavy 10 owner.

    Chris
     
  19. stew1954

    stew1954

    47
    0
    Nov 24, 2012
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    Are you saying that if the sensor reads low and stays low, the output only turns on for 10 seconds?

    If the water reads high, the output changes immediately?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-