Let's Make Robots!

Problem with digital input with axe 121 in 28 pin project board

I have connected an AXE121 to the 28 pin project boarrd. The light on the AXE 121 work according to the line but in the digital input there is no input shown.Also the program with inputs doesnt work on the bot.What may be the problem?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

At this point, we have no idea what it is or could be. We simply need to check each thing, down the chain.

First, with a multimeter (or even just a LED) check each output from the line follow board. Confirm that it is indeed outputting highs and lows when it sees white and black. Now repeat this test at the end of the jumper wires -right where you would plug it into the 28x board. Confirm these high/low outputs are getting through the jumpers. This seems silly, I know but I have had jumpers get stretched out and actually not make a connection. Double check your signal is getting through the wires.

Now, move on to the 28x board. Unplug your line follow board entirely. Run your terminal or debug window or input panel or whatever tells you the state of your inputs. Test each of your inputs with a jumper wire. Connect the input to ground and confirm it is showing 0 or low. Repeat this to 5v and confirm the input is a 1 (high). Make note of what pins you are playing with and what pin numbers they correspond to in your debug window. Be sure you are connecting to the same pins you are using in your code.

Now, if your line follow board is outputting correctly and you inputs are reading things correctly and you are using the right pins, then the problem must lie in your code. 

--I still think that jumper wire hap-hazardly stuck in between 2 legs of a chip is not good though... (I'm not sayin', I'm just sayin')

I was taking a second look at your photos and I noticed something I had not seen before.

 

On your line follow board:

Is there something funny at pin 7?
Why is there a stray bit of wire (a 2-hole breadboard jumper, actually) stuck in the IC socket between pins 13 and 14? 

Its just that both pins are broken so just attached a wire. The 13 amd 14 are not connected.It looks like that from above.Sorry forgot to mention that but its working fine I have checked it many times.

Everything appears pretty good actually. The connections look right and the soldering isn't too bad. To double check and thus eliminate hardware as the issue, could you test the output(s) of the board with a meter or a LED? If you are getting proper highs and lows from there, you know it is probably an issue with the code. 

Out of curiosity, did this work when you ran it directly from logicator? Why did you decide to convert to code? Do you have to do this to sync with the chip? --Also, tell me more about this "input panel" and how it works.

With logicator you can just design the flowchart and it directly converts it into code.For the purpose of posting the code on forum I used convert flowsheet to basic.It is not necessary to syn with the chip.Either you can write the code or make a flowchart.Both are good.

 

As the programme runs the digital panel shows the changing state of ouputs, motors and inputs as they are.

It appears that you just posted the same code. If you removed the "loop0", the code you are showing now does not reflect that change.

Back to the flow of the code, if you were to simply remove "loop0:" and "goto loop0" you will still have a similar problem. The main loop (label_2) is not a loop. It does not end in "goto label-2" and thus, it will be executed once and then the code will go straight on to label_22 only to return to the start there after. 

On to your input issue. I believe there is some kinda input panel you have that allows you to see the state of your inputs. It also seems that when you trigger the line follow sensor, the state of the inputs is not changing in your window. If the indicator lights are coming on but inputs are not going low, you only have a few options:

  • You are not reading the inputs correctly
  • The line follow board is soldered incorrectly
  • You are not connected to the correct input pins

I wish I could give you a yes or no on your wiring but the picture you provided is not quite in focus enough or at the right angle to see what I need to see.

 

--one more thing to try is to simply check the outpu of the line board with a meter (or even just a LED) to be sure it is outputting the correct highs and lows.

i just made the flow chart on logicator and this was the code that it made.I have posted the image of the Flowchart.

I think you should recheck your soldering. Some of the soldering doesn’t look all that good.
It seems to me that the IR LED IR1 and transistor Q1 is not soldered to the pad at all.

I know that the soldering is pretty bad thats why I have checked the soldering many time including IR1 and QR2.The light on the board is correctly blinking with black and white line.Now just the checking of high and lows in output is with a meter is remaining.

You might also check if the LED’s are working by using your mobile camera as the IR light is visible to the camera.