Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

LPM project - help needed

Joined
Feb 5, 2008
Messages
6,252
Points
83
Hiya folks, lack of my PART II on LPM project is more than visible.

I've been bustin my head over the board and debugging - well
Long story short , I took for granted that the professors who helped design the PCB knew what they were talking about.

First , the ULN2003 , seven darlington arrays, to drive LED segments because the port output is not powerful enough .
Fine, well, after 2 days of bustin' my head I finally understood what the problem was , CATHODES of segments are to be connected into OUT ports of ULN, hence, I needed to pick up entirely new displays, common ANODE.

Corrected that, and wired everything, and rewired (PCB is 2 mm thick, cannot solder on top side for displays and MCU socket, so everything that was display and socket connected on top side was rewired on bottom side, with airwires, or jumpers. Pretty sight, around 30 wires on bottom side. ).

Okay next , when the thing is powered WITHOUT MCU in it's socket , all of segments light up.
When a wire is socketed in GND pin of MCU socket, and when I touch various port pins, segments turn off.

Is i not supposed to be other way around, instead of turning the off with 0, we should light them up with 1!

Damn.

Well, I want all you to look at the schematic.

Push up resistors, the ones in red circles, for what exactly are they needed, by my logic, they are to be completely removed.

I appear to made the same mistake twice, professors do not know what they were suggesting me
"Yes you need those resistors"

They are 4.7 k Ohms.

So far I've figured that if those are removed, segments would be lighted up by 1, and none would light up on powerup without MCU in there.

Am I correct?

Is there anything else wrong with the schematic?
pushupresisstors.jpg


I'm running real tight on time, and I need help ASAP.

Thanks!

EDIT - cutting out those resistors can be done in 3 seconds , leaving only their pins to give the connection that need to be there.
I just need somebody to confirm my suspicion, that they are not needed and they are indeed causing trouble.
 
Last edited:





Joined
Feb 5, 2008
Messages
6,252
Points
83
AVRCar3.GIF


Okay folks look at this

I think that 4.7k ohms push up resistors are actually meant to be on I2C communication buses, NOT ON OUTPUT PORTS!

WTF was I thinking,

Please somebody just say that I am right so I can correct my work immediately, time is of the essence here!

EDIT:
This is the ADC I am using, is it wired correctly? Somehow I doupt so
http://astro.temple.edu/~cvecchio/PCF8591_6.pdf
 
Last edited:
Joined
Sep 20, 2008
Messages
17,622
Points
113
If your MCU ports connected to the ULN2003A are always either
High (VDD) or Low (VSS) and never Floating... the Pull Up Resistors
are not required and can be removed...:cool:


Jerry
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
If your MCU ports connected to the ULN2003A are always either
High (VDD) or Low (VSS) and never Floating... the Pull Up Resistors
are not required and can be removed...:cool:


Jerry
I knew it, I knew it!
I'm gonna rub this in professors' face all day long after the presentation of the project.

Thank you Jerry!

Also, only two PULL UP resistors are needed on I2C buss, which is SDA and SCL pins, is that correct?

If so, I am going to cut out all the resistors from the PCB right now and correct everything.

You da man Jerry!

EDIT - I can post the code here so you can see that they are not floating , we've made the binary table, to get hexadecimal values the MCU needs to throw out of output ports to get certain segments to light up and form digits.
Schematic was contricted for the ease of making the table, so segments
A B C D E F G correspond to ports PX.1 PX.2 PX.3 PX.4 PX.5 PX.6 PX.7 respectively.

X is either 0, 2 or 3, depends on what display you want.

I can show you the code if you want.
 
Last edited:
Joined
Sep 20, 2008
Messages
17,622
Points
113
I knew it, I knew it!
I'm gonna rub this in professors' face all day long after the presentation of the project.

Thank you Jerry!

Also, only two PULL UP resistors are needed on I2C buss, which is SDA and SCL pins, is that correct?

If so, I am going to cut out all the resistors from the PCB right now and correct everything.

You da man Jerry!

EDIT - I can post the code here so you can see that they are not floating , we've made the binary table, to get hexadecimal values the MCU needs to throw out of output ports to get certain segments to light up and form digits.
Schematic was contricted for the ease of making the table, so segments
A B C D E F G correspond to ports PX.1 PX.2 PX.3 PX.4 PX.5 PX.6 PX.7 respectively.

X is either 0, 2 or 3, depends on what display you want.

I can show you the code if you want.

That is correct.... there is more data on the Data Sheet of the
part that you are using.. The Data Sheet for a part is the Bible
for that part... IMO

No need to post the code.... if for some reason an I/O line
is floating at one point... the input of the ULN2003 night go
High or Low...

If you want to make a positive impact with your professors...
I would suggest you simply show the modifications that you
made to the original drawings...;)

Jerry
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
That is correct.... there is more data on the Data Sheet of the
part that you are using.. The Data Sheet for a part is the Bible
for that part... IMO

No need to post the code.... if for some reason an I/O line
is floating at one point... the input of the ULN2003 night go
High or Low...

If you want to make a positive impact with your professors...
I would suggest you simply show the modifications that you
made to the original drawings...;)

Jerry
I will show off with modifications to the schematic and work during the presentation.
After that I'm gonna have a passive vent-off to the professors for
1)wrongly wiring the ULN
2)wrongly wiring the pull up resistors
Hence giving me one helluva hard time and trouble.

You know what's the best part? The schematic and PCB layout went though THREE professors whose area of expertise is electronics.

Not one noticed that the ULN is wired wrong, and that there are 19 un-needed resistors on the schematic, and two are on wrong places.

Basically if they said "You need ULN to drive segments and you need pull up resistors on I2C, do the research on your own" I would have gotten to the same conclusion week or two ago, saving me all the trouble.
They just wired the ULN and pull ups like so, on the schematic, and I took it for granted that they knew what they are doing.

Note to self - design your own sh't for a change.

Thank you Jerry. I have cut out the pull ups from the PCB, and I will use two of them to rewire the I2C buses.

I'll post here on the progress and effect.
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
Resistors thrown out , no segments light up when powering it without MCU socketed, and when I connect +5V to various pins assignet to output ports (imitating the 1 command of MCU), segments neatly light up!

That's it!

Now to get the opamp on sensor working and finally get this thing to measure some lasers!

Thanks Jerry!
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
If your MCU ports connected to the ULN2003A are always either
High (VDD) or Low (VSS) and never Floating... the Pull Up Resistors
are not required and can be removed...:cool:

Hmm... they are indeed not required, but should also not cause any trouble, unless their value is so low the uC cannot pull the pins down to ground against the resistors, which seems rather unlikely.

Obviously they would pull up all the uln inputs if you remove the uC, but as long as it is in place those pull up resistors are just useless, but not harmful to the performance of the circuit.
 
Joined
Sep 20, 2008
Messages
17,622
Points
113
The only thing that I can see is that if the I/O pins of the MCU go
low the 21 Pullup resistors will draw some extra unnecessary current.
(not sure of their value)

Jerry
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
They are, or were, 4.7 k Ohm.

Now, as I said, no segment light up without MCU, and as I touch the ULN inputs with +5V wire, segments light up nicely.

I do have two shorts somewhere, on display 1 and 3 two segments light up simultaniusly, regardless whether I touch one or the other , will fix that.

However, Opamp for whatever reason refuses to cooperate with me.

On the sensor, LM358 is used, everything wired accordingly to datasheet, 1k ohm is to-ground resistance, and 8.7 k ohms are the ref resistance, which should in event of 50 mV on TEC result in 510 mW reading on Display, as the reference voltage for ADC is 5 V also.

Hmm, however when MCU is socketed, no segment light up regardles of ADC analog inputs - not even zeroes are shown.

I need to look into it further to provide more detail.

EDIT - See edit on OP, ADC I think it's improperly wired
http://astro.temple.edu/~cvecchio/PCF8591_6.pdf
 
Last edited:

HIMNL9

0
Joined
May 26, 2009
Messages
5,318
Points
0
4,7K pullup resistors are ok ..... they usually are 10K, but also 4,7K must not cause you problems.

BTW, resistors networks are space-savers, in these cases ..... ;)
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
4,7K pullup resistors are ok ..... they usually are 10K, but also 4,7K must not cause you problems.

BTW, resistors networks are space-savers, in these cases ..... ;)
Never mind the resistors, see edit, about AD converter, for some reason it's not behaveing.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Do you suspect the reason is in the hardware, and if so, why? Is the I2C communication between the chips working at all?
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
Do you suspect the reason is in the hardware, and if so, why? Is the I2C communication between the chips working at all?
New updates -
I2C communication is working, or barely working.

Well this is the situation.
OpAmp and everything is wired properly.

When a laser is shined into a sensor, the A segment of DIS1 flashes - but that's just about it.

Now, I've done modifications and had ideas with no avail, now I am attempting this one.

The internal oscillator clock of ADC and external MCU (which is 12 MHz crystal) are not equal, I think the ADC might be using the 11.9 something MHz.

Can one crystal oscillator be wired to two devices?
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Usually using one xtal to control several other ic's is no problem. You can build an oscillator around a (cmos) inverter (or nand gate, etc) with schmitt-tirgger inputs very easily, and just buffer the output by another gate and send it to all chips that need to be on the same clock. Its matter of trying which x-tal connection to use, unless that is specified in the datasheet (it often is).
 
Joined
Feb 5, 2008
Messages
6,252
Points
83
Usually using one xtal to control several other ic's is no problem. You can build an oscillator around a (cmos) inverter (or nand gate, etc) with schmitt-tirgger inputs very easily, and just buffer the output by another gate and send it to all chips that need to be on the same clock. Its matter of trying which x-tal connection to use, unless that is specified in the datasheet (it often is).
It is :
http://astro.temple.edu/~cvecchio/PCF8591_6.pdf

One problem though, capacitors from Xtal to ground, I am using 10 pF ones, I am worried it's too small capacitance and maybe it can cause some trouble as 22pF (more than double) is very frequently used...

Can that also cause problems?
 




Top