Connect with us

Sending a voltage signal upon receiving another signal

Discussion in 'General Electronics Discussion' started by Haza100, Jun 4, 2013.

Scroll to continue with content
  1. Haza100

    Haza100

    8
    0
    May 4, 2013
    Hi,

    Completely new to all of this, so I apologise in advance for my ignorance!

    I'm trying to trip a circuit, and need to send a 2.4 volt signal to a component, upon a 'controller' receiving a 4.5v signal from elsewhere.

    I have attached a .gif of what I'm trying to achieve: https://dl.dropboxusercontent.com/u/2578642/1rxj0.gif

    Basically, I would like to connect the two wires, which usually spin a motor which intercept a LDR, to one part of the controller, then the LDR sensor wires to another part.

    I'd be grateful for any help whatsoever; books regarding the 'topic' of electronics that would benefit me would be really useful.

    Many thanks,
    Harry
     
  2. Haza100

    Haza100

    8
    0
    May 4, 2013
    Bump, even the name of the 'topic' of electronics that would help me achieve what I want to would be great!
     
  3. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    What is the 2.4V signal to be used for? If it draws negligible current, all you need is a voltage dividers, i.e. 2 resistors. If it is a digital input signal where 2.4V is the threshold of high, you probably need nothing.

    So basically, what is the 2.4V signal to be connected to?

    Bob
     
  4. poor mystic

    poor mystic

    1,068
    31
    Apr 8, 2011
    :)
    The book you want is:
    "The Art of Electronics";
    Horowitz and Hill
    The book is so well written, and with such wonderful exclusion of bs - I think you're going to have fun with this!
     
  5. Haza100

    Haza100

    8
    0
    May 4, 2013
    Thanks for the reply

    I stupidly didn't mention that the 2.4v signal needs to be sent after a delay of 1.2 seconds. It is used to tell the motherboard of a printer that a part of the printer is 'OK'.

    Many thanks
     
  6. Haza100

    Haza100

    8
    0
    May 4, 2013
    I shall definitely buy it!
    Thanks :)
     
  7. Haza100

    Haza100

    8
    0
    May 4, 2013
    So I think I'm able to phrase my question a bit better now:

    How would I go about programming a micro-controller to output 2.4 volts from a port after 1.2 seconds from receiving 4.5 volts from another port?

    Is this possible?

    Many thanks,
    Harry
     
  8. Lord_grezington

    Lord_grezington

    124
    2
    May 3, 2013
    this is simple to do with a ADC on a pic. I use flowcode from matrix, check it out and you will be surprised at what you can do if you don't know c. You will need to use a PWM to output the 2.4V, probably through a buck converter.
     
  9. Haza100

    Haza100

    8
    0
    May 4, 2013
    I shall invest in Flowcode - it looks perfect for my needs :) Thanks.

    Could I ask what sort of PIC/microcontroller would be appropriate for what I'm trying to achieve?
     
  10. poor mystic

    poor mystic

    1,068
    31
    Apr 8, 2011
    Umm...
    So are you planning to use a microcontroller to achieve a short delay and nothing else? I do realise that microcontrollers are the way of the future but this seems to me like using a good warp-capable spaceship as a letterbox.
    I'd have used a timer chip, such as a 74LS123 or even a 555.
    It's not hard to turn a higher voltage into a lower voltage, either. All you need is 2 resistors, as BobK suggested. I feel that the KISS principle applies here.
     
    Last edited: Jun 9, 2013
  11. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    Haza100,

    You have still not specified this well enough for anyone to design a circuit or a program.

    Is the 4.5V signal a pulse or does it remain on indefinitely?

    If the 4.5V signal is off before the 1.2 seconds, do you still signal the 2.4V output?

    How long does the 2.4V output stay on? Does it go off when the 4.5V signal goes off? Is there a delay before it goes off?

    You need to be much more explicit.

    Bob
     
  12. Haza100

    Haza100

    8
    0
    May 4, 2013
    Sorry for my lack of detail, this is going to be a fairly long winded post, so bear with me haha!
    Also, I realise that I should probably pay to have this work done – however at the moment I can’t afford it, and I’d really like to learn how to do it myself as well!

    I am trying to trip a couple of transmissive photo-interrupter sensors in a printer, to prevent the need for temperamental, mechanical components which need careful timing setups (ie, they need to be tripped at precisely the right time - almost impossible manually).

    I hope that I explain what I’m trying to achieve well, however I’m unfamiliar with the workings, and programming of micro controllers/electronics, therefore I have written two versions of what I’m trying to achieve, one ‘code’ version, and one in plain English.

    Firstly though, in the original machine, a motor would usually spin a cog which would ‘interrupt’ the photo interrupter, whilst at the same time pushing a piece of paper through the machine, to trip another photointerrupter. I would like to programmatically replicate this process, thus removing the motors, and photointerrupters.

    'Code' version:

    - Let ‘Port A’ be an input port on the microcontroller, which would have the 4.5 voltage motor wires connected to it.

    - Let ‘Port B’ be an output port, which would replicate the voltage that the first photointerrupter would ‘give off’ to the motherboard of the printer.

    - Let ‘Port C’ be an output port on the microcontroller, which replicates the second photointerrupter, and the voltage it gives to the motherboard of the printer.

    - Let ‘process’ be a variable, which has two states, ‘initiated’ which means that the ‘Port A’ is receiving 4.5 volts, and as a result, the photointerrupters are tripped in order as detailed below. Also the state of ‘ready’ means that it is not receiving 4.5v – this is the initial state, ie this is what should happen when the machine/microcontroller turns on initially. ‘Process’ is to be changed from ‘initiated’, to ‘ready’ when a hall sensor is tripped.

    So, here is how I would like the microcontroller to work:

    if (Port A voltage = 4.5v){
    AND
    if ('process' = 'initiated'){
    do nothing (because its already happening).
    }
    else if ('process' = 'ready'){
    Wait 1.25 seconds
    then
    set Port B voltage = >2.4v
    then
    wait 1.25 seconds
    then
    set Port C voltage = >2.4v
    then
    'process' = 'initiated'
    }
    }
    else{
    set Port B voltage = <0.4v (this is the ‘default voltage’ which the printer registers as ‘there is no paper’)
    set Port C voltage = <0.4v
    }
    if (hall sensor passes magnet){
    'process' = 'ready' (the ‘process’ should only be set to ‘ready’ when this happens – not just when ‘Port A’ stops receiving 4.5v)
    set Port B voltage = <0.4v
    set Port C voltage = <0.4v
    }


    So:

    If 'port A', is sent a signal of 4.5 volts (which it will keep on receiving because its a motor signal), then check if its already been received, and if it has, then do nothing because the whole process is already taking place, but if it hasn't then, wait 1.25 seconds, and set the voltage of port B to 2.4 volts then wait another 1.25 seconds and set the voltage of Port C to 2.4 volts, and also set the variable 'process' to 'initiated', because the process is happening. If NONE of this is happening, ie there was no initiation from port A, then keep ports B and C at 0.4v – this should also be the ‘initial’ voltage of the two ports. Then ONLY set the variable ‘process’ to ‘ready’ (from ‘initiated’) when a hall sensor passes a magnet – upon doing this the microcontroller should also set ports B and C to 0.4v.

    I hope that makes sense – let me know if you need anymore details,
    Many thanks - I am genuinely really grateful for all the help,
    Harry.
     
  13. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Hi Harry,

    Let me try to clarify what you want.

    Your circuit is to be added on to a printer, to simulate the behaviour of a motor and two optointerrupters. There is also a signal from a hall sensor. The simulator circuit has the following inputs and outputs:

    1. Motor: input to simulator circuit; 0V (low) in idle state, +4.5V (high) when the printer is asserting an output to activate the motor.
    2. Hall: input to the simulator circuit, from a hall sensor. Probably the hall sensor will be powered from a 3.3V or 5V logic supply and will have an active-low output that will go to 0V when the magnet is detected.
    3. Opto#1: output from the simulator circuit. In idle state, <0.4V (low); in active state, ~2.4V (high).
    4. Opto#2: output from the simulator circuit. In idle state, <0.4V (low); in active state, ~2.4V (high).

    On startup, Opto#1 and Opto#2 are low. Motor is expected to be low. When Motor goes high, two delay timers start; these continue to run while Motor remains high. After 1.25 seconds of Motor going high, the first timer asserts Opto#1 high, and it remains high. After 2.5 seconds of Motor going high, the second timer asserts Opto#2 high, and it remains high.

    Opto#1 and Opto#2 remain high until reset by the hall sensor; they will stay high even if Motor returns low, but if Motor goes low _before_ a timer expires, that timer resets and its Opto#n output is not activated. (These statements are just to clarify the behaviour of two simple R-C delays, to make sure that this simple design will do what you want.)

    Whenever the hall sensor input is active, i.e. a magnet is near the sensor, Opto#1 and Opto#2 will be forced low. They will only go high at the moment that the relevant timer expires, provided that the hall sensor is not active at that time.

    Will a circuit that meets that description work for your application?

    My initial thought is that this can be done fairly easily with a couple of CMOS ICs - a CD40106 (also called a 74C14 or a CD4584), and a CD4013. These ICs can operate from any supply voltage from 3V to 15V so you may be able to power them from the logic supply of the printer. The simulation circuit doesn't need to draw much current.

    Please answer a few more questions.

    The voltages you have specified are a little odd. Do you know the logic supply of the printer circuitry that the optointerrupters are connected to? Is your 2.4V value taken from a data sheet for the device that the optointerrupter connects to? If so, 2.4V may just be the minimum VIH (input high detection voltage) for that IC, and it may be better to drive the pin with the full VCC voltage. This would also avoid voltage dividers in the simulator circuit.

    Can you confirm that the Motor, Opto#1 and Opto#2 voltages are all relative to the same, common 0V rail?

    Is the hall sensor part of the printer, or are you adding that yourself? If so, do you have a part number in mind? Does it have an output that goes low when the magnet is present? Does it have an open collector output or a push-pull logic output?

    Please answer all of those questions fully. I will draw up a circuit for you.
     
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

-