Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pull My Hair out, Optical Tachometer - PIC16F628A

Status
Not open for further replies.

DustinB

New Member
Well since this is my first post I guess I should do a short background. I'm just getting started in electronics and I think I may have found a new hobby. I decided to get into this with a project I saw online, an optical tachometer to get the headspeed of an rc helicopter. The creator did all the code in picbasic and it's all functioning properly. I will be doing future programming in C as I have a background in C++ and C-like scripting.

The problem I'm having with this project is the circuit. In the instructions it has a couple different circuits separated. I wanted to make this all on one board, but it isn't functioning properly.

Here is the project: **broken link removed**

When I follow the instructions and lay it all out on the breadboard it all functions perfectly, however when I tried it on a pcb with the attached schematic I did it does not function properly.

The motor circuit functions as well as the IRLED and sensor. The problem is the LCD screen has one row of solid black squares and does not output anything other than that. I heard this is the "ready mode" of the LCD. So, somehow the LCD is not receiving data to display I guess. I compared the layout with the instructions on the site and all the connections seem right. Does anyone see anything that could cause this behavior? This thing is driving me crazy. I've been going over this time and time again for a week.

Thanks for any ideas, things to check, etc...

BTW, the LED, SEN, PWR are all 2 pin headers.
 

Attachments

  • schematic..jpg
    schematic..jpg
    55.3 KB · Views: 807
Last edited:
Well since this is my first post I guess I should do a short background. I'm just getting started in electronics and I think I may have found a new hobby. I decided to get into this with a project I saw online, an optical tachometer to get the headspeed of an rc helicopter. The creator did all the code in picbasic and it's all functioning properly. I will be doing future programming in C as I have a background in C++ and C-like scripting.

The problem I'm having with this project is the circuit. In the instructions it has a couple different circuits separated. I wanted to make this all on one board, but it isn't functioning properly.

When I follow the instructions and lay it all out on the breadboard it all functions perfectly, however when I tried it on a pcb with the attached schematic I did it does not function properly.

The motor circuit functions as well as the IRLED and sensor. The problem is the LCD screen has one row of solid black squares and does not output anything other than that. I heard this is the "ready mode" of the LCD. So, somehow the LCD is not receiving data to display I guess. I compared the layout with the instructions on the site and all the connections seem right. Does anyone see anything that could cause this behavior? This thing is driving me crazy. I've been going over this time and time again for a week.

Thanks for any ideas, things to check, etc...

BTW, the LED, SEN, PWR are all 2 pin headers.

hi,
Have checked the pcb layout for the LCD, the track looks OK.

Can you post a pic of your wiring from the pcb to the LCD

The black blocks on the LCD display suggest its not being initialised.
 
Last edited:
The numbers to the right of the LCD pins are the locations on the LCD. It's an HD44780 compatible LCD. Digi-Key - 67-1758-ND (Manufacturer - LCM-S01602DSF/A)

hi,
I know the pin outs of the LCD pcb..:)

I would like to check the wires are going from the main pcb to the LCD pins where you think they are going.

You say that the remainder of the main pcb functions actually work.??

Do you have access to a scope.?
 
Well that's what I meant. The numbers to the right of the lcd pins on the main pcb are where the wires are going to on the LCD pcb.

Yes, everything else functions correctly. I do not have access to a scope. I did see a way to make a free one connecting to a sound card. I guess I could try and get one going if needed, wouldn't know where to begin using a scope though.

I appreciate you looking at this. I've been reading a lot and trying everything I could think of, yet it still isn't working. If I setup the PIC layout in the project page on the breadboard with the LCD it works fine. When I add it in with this PCB layout it doesn't. I've read over all the datasheets and everything several times. It all seems right. I've got to be missing something.
 
Well that's what I meant. The numbers to the right of the lcd pins on the main pcb are where the wires are going to on the LCD pcb.

Yes, everything else functions correctly. I do not have access to a scope. I did see a way to make a free one connecting to a sound card. I guess I could try and get one going if needed, wouldn't know where to begin using a scope though.

I appreciate you looking at this. I've been reading a lot and trying everything I could think of, yet it still isn't working. If I setup the PIC layout in the project page on the breadboard with the LCD it works fine. When I add it in with this PCB layout it doesn't. I've read over all the datasheets and everything several times. It all seems right. I've got to be missing something.

hi,
Where are you located.?
 
Well that's what I meant. The numbers to the right of the lcd pins on the main pcb are where the wires are going to on the LCD pcb.

Yes, everything else functions correctly. I do not have access to a scope. I did see a way to make a free one connecting to a sound card. I guess I could try and get one going if needed, wouldn't know where to begin using a scope though.

I appreciate you looking at this. I've been reading a lot and trying everything I could think of, yet it still isn't working. If I setup the PIC layout in the project page on the breadboard with the LCD it works fine. When I add it in with this PCB layout it doesn't. I've read over all the datasheets and everything several times. It all seems right. I've got to be missing something.
LCD pin3 , you disconnect ground and place a diode like 1N4148 with anode to pin3 and cathode to ground.
generally people use a preset to keep pin3 at approx 0.7V.
automatically you get the characters , provided the wiring is correct .
Peculiarly we observe that the pins are not in an order needed for LCD for straight connection. That is the very reason Ericgibbs asked for the actual wiring info.
please ensure that the pin numbers of LCD as mentioned on pcb artwork are explicitly maintained.
keeping contrast pin (3) of LCD at ground level, you get only BLACK BOXES.
all the best
 
Last edited:
I'm in houston, tx in the US.

hi,
I was going to offer that you send me the project to debug for you, the States is a little too far..:rolleyes:

Some States side member may help you out.

Do you have a decent digital voltmeter.?
 
Thanks for the offer.

Yes, I have a fluke 87 III. I tried to read some voltages, but I didn't know anything about what I could be reading on the out pins of the PIC. I'd love to be able to troubleshoot it myself, just need to know what I'm looking for.
 
Thanks for the offer.

Yes, I have a fluke 87 III. I tried to read some voltages, but I didn't know anything about what I could be reading on the out pins of the PIC. I'd love to be able to troubleshoot it myself, just need to know what I'm looking for.
could you see my reply please?
 
Thanks for the offer.

Yes, I have a fluke 87 III. I tried to read some voltages, but I didn't know anything about what I could be reading on the out pins of the PIC. I'd love to be able to troubleshoot it myself, just need to know what I'm looking for.

OK,
With the project powered up.

Connect the meter negative to a 0V point on the main pcb.

Set the meter to 5V 'dc'

Measure and post the voltage on all the pins of the LCD pcb

Note: pins 11,12,13 14 may fluctuate a little.
 
I'll have to check in a couple hours when I get home. I did do that on some of the data pins, I can't recall exactly which ones had which voltage, but if I recall correctly the data pins ranged from 0.08v to about 2v on the pic chip. I will post the voltages of the LCD pcb pins tonight.

Thanks
 
OK,
With the project powered up.

Connect the meter negative to a 0V point on the main pcb.

Set the meter to 5V 'dc'

Measure and post the voltage on all the pins of the LCD pcb

Note: pins 11,12,13 14 may fluctuate a little.
Eric,
Don't you feel keeping contrast pin (pin3) of an LCD display at Ground is the reason for the black boxes, assuming that he gave the connections correctly?
 
Last edited:
I'll have to check in a couple hours when I get home. I did do that on some of the data pins, I can't recall exactly which ones had which voltage, but if I recall correctly the data pins ranged from 0.08v to about 2v on the pic chip. I will post the voltages of the LCD pcb pins tonight.

Thanks

hi,
If the data pins are around 0V to 2V that sounds suspect.

Its late evening in the UK, so if no one else steps in to help, I'll catch you tomorrow...
 
Eric,
Don't you feel keeping contrast pin (pin3) of an LCD display at Ground is the reason for the black boxes, assuming that he gave the connections correctly?

I already checked the contrast on that. I wired in a 10k pot and adjusted the contrast. Still didn't help, doesn't appear to be receiving any data. When I had the PIC circuit separated everything was working fine, including with the contrast pin on ground.
 
I already checked the contrast on that. I wired in a 10k pot and adjusted the contrast. Still didn't help, doesn't appear to be receiving any data. When I had the PIC circuit separated everything was working fine, including with the contrast pin on ground.
while other parameters are yet to be checked, keeping ground on pin3 doesn't show up the characters
 
Good idea mvs sarma. I checked the datasheet again for the LCD and it does call for positive voltage. Will add that to things to test tonight.

Thanks
 
Good idea mvs sarma. I checked the datasheet again for the LCD and it does call for positive voltage. Will add that to things to test tonight.

Thanks
you may place one 0.1uF disc or multilayer cap across pins 5 and 14 of the pic. this is needed as perhaps the power supply gets noisy as the motor rotates
 
Last edited:
I'll have to pick up a cap to try. I was able to get the voltages.

PIC Chip pin voltages:

PIN / Voltage
1 / 0v
2 / 5v
3 / 5v
4 / 5v
5 / 0v
8 / 5v
14 / 5v
17 / 0v
18 / 5v

LCD PCB Voltages:

PIN / Voltage
1 / 0v
2 / 5v
3 / .19v
4 / 5v
5 / 0v
6 / 0v
11 / 5v
12 / 0v
13 / 0v
14 / 5v
15 / 3.65v
16 / 0v

I'm also attaching a picture of my breadboard.
 

Attachments

  • tachcircuit..jpg
    tachcircuit..jpg
    737.2 KB · Views: 276
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top