Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

JK flip flop to navigate a robot

Status
Not open for further replies.

Stoudemire

Junior Member level 2
Joined
Jan 15, 2011
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,478
Hello Guys,


I bought a dual J-K flip flop; HD74LS3AP and I was wondering how can I use it for my sound following/obstacle avoiding robot.
I have decided to use three microphones, compare the voltage of the 3 microphones and the output of an obstacle avoiding device(haven't yet chosen one) and the hbridges of the motors will get the suitable input to have a good output.

I think I need the JK flip flop incase the robot detects an obstacle and turns right/away then when it turns back to the sound it will hit the obstacle and enter a loop.

Please give me as much as possible information because the deadline is in a week and I need ideas.

Best
 

First tell this the Condition input to the JK how on earth are you planning to give what are the values of JK

then What is the op of the JK going to drive there are a several considerations here what are you planning to use here

Then if you the robot turns away from the obstacle and turn right

DO you mean that the source of the sound being some where behind the obstacle near end or far
 

"DO you mean that the source of the sound being some where behind the obstacle near end or far"
By the simple logic that I did, giving each microphone a 120degree angle there is a 2/3 chance that the sound is behind this obstacle.

Can you explain your idea of the flipflops; it has been 2 years since I used/took a course that explained the behavior.
Best

- - - Updated - - -

Ill post a logic table asap
 

That would be a great help the thing that concerns me is this

If the robot is turning away from the obstacle it almost makes a 90 turn that will relatively vary the position of the source so I don't think this condition will occur but there is some slight possibility of it to occur so never omit this
 

5 min and Ill post the logic table, I tried today without the obstacle avoidance in the lab and it gave good results
Ill add the rest of the 8 possible cases
 

No issues do post the logic table if it is working in no obstacle condition then if our state diagram routing is clear then there is 0 probability of any error to happen
 

I need one clarification in it pal what are A B and C they are the conditions possible for the robot to face or any thing in special

And what are the past states you are assuming in the conditions if they are known then using the past and the next expected value the input J and K of the FF can be easily predicted
 

Ok first I haven't yet used a flip flop in this table, because I dont know how to implement it here.
A,B,C are the microphones that I placed on the robot in an equilateral triangle. After amplification the voltage is compared by a comparative op amp; so A>B is the voltage at A>voltage at B so the obstacle is is closer to A [ we will place sponges between the two microphones]. The two outputs for left motor are the inputs for the Hbridge, if the inputs are 1 0 the motor turns clockwise if 0 1 the motor turns counter clock wise if 0 0 then the motor doesnt move.

I have drawn all 16 case with 4 inputs; obstacle avoidance, A>B denote as I, A>C denote II,B>C denote III.

I haven't yet assumed any past states because I didnt yet include the JK flip flop, I was hoping for a help in this thread on how to add it
 

The past states can be included as arbitrary assumption of motor in clockwise turn off or in counter clockwise turn these three states will result in amplifying the ps ns table as below
Ps ns
00 00
00 01
00 10
00 11
01 00
01 01
01 10
01 11
10 00
10 01
10 10
10 11
11 00
11 01
11 10
11 11

this is for a single motor so you need a minimum of two ff to control a single side motor after adding the excited values of JK
 

jeffrey, I am a little uncomfortable working with flip flops. I rarely work with them. So this is my first time actually. I dont understand how to include it in the circuit!

I am able to get the simplified boolean expression of the above logic table using karnaugh graph but I dont understand how can I use the flip flop in the movement of motors, how do I change the boolean expressions in order to include a flip flop and how to use it
this is the datasheet of the
https://i49.tinypic.com/351afyc.png
ill get the simplied boolean expression for the motor movement without the flip flop.
Also what do you mean by:
00 00
00 01
00 10
00 11
01 00
01 01
01 10
01 11
10 00
10 01
10 10
10 11
11 00
11 01
11 10
11 11

and ff to control a single motor?

- - - Updated - - -

The boolean expression for the four outputs:
Inputs are 0,1,2,3 donate obstacle sensor,A>B,A>c,B>c respectively, I made the output 14 15 the same to simplify the expression

output one= (2'&3')||(1&2)
output two= (1'&3)
output three= (1'&3)||(0'&1&2)
output four= (2'&3')||(0&1&2)

These outputs and inputs are continues with time, I dont think Ill use some 555 chip.

I want to know how to use the flip flop in case 14 and 15 of the boolean expression.
If I know how or remeber how the flip flop works for a specific case I would have I would have solved it myself.

Thank you for understanding
Best


P.S. I think the flip flop should be activated at 0&1&2 but how to do it I really dont know
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top