EmbeddedRelated.com
Forums

ADC Issue

Started by Jerry January 29, 2012
--- In l..., "M. Manca" wrote:
> Until now I had problems only on mbed boards but is due to an unhappy
> pcb design. On other development boards and on my own boards I have no
> similar problems as yours. Thinking about the 4095 count I could say
> that is as if your pin reads the VCC or the VREF or a voltage greater or
> equal to VREF. So... just to speaking you could check VREF and its
> ground pins and... check if there is the possibility that for any
> strange reason your sw (think to a strange bug) may setup your analog
> pin as a digital i/o during the conversion phase (I can't imagine the
> result).

I thought about a conflict with a digital I/O, but the only functions that share the same pin as ADC channel 0 are the I2S and one of the timer capture registers, and my code doesn't use these.

My development board is a NGX Technologies BlueBoard (http://shop.ngxtechnologies.com/product_info.php?cPath!&products_ide). It has a header for AD0-5 and the circuit for the analog stuff looks reasonable. It could be a layout issue with the PCB (or a code issue).

I'll try the LPCXpresso board and see if I have better luck with that.

Can you recommend a basic LPC1768 or 1769 development board that has known working ADC inputs?

An Engineer's Guide to the LPC2100 Series

Il 14/02/2012 23:44, Jerry ha scritto:
>
>
> --- In l... , "M.
> Manca" wrote:
> > Until now I had problems only on mbed boards but is due to an unhappy
> > pcb design. On other development boards and on my own boards I have no
> > similar problems as yours. Thinking about the 4095 count I could say
> > that is as if your pin reads the VCC or the VREF or a voltage greater or
> > equal to VREF. So... just to speaking you could check VREF and its
> > ground pins and... check if there is the possibility that for any
> > strange reason your sw (think to a strange bug) may setup your analog
> > pin as a digital i/o during the conversion phase (I can't imagine the
> > result).
>
> I thought about a conflict with a digital I/O, but the only functions
> that share the same pin as ADC channel 0 are the I2S and one of the
> timer capture registers, and my code doesn't use these.
>
It is P0.23 for LQFP100 (the pins is not present in LQFP80).
> My development board is a NGX Technologies BlueBoard
> (http://shop.ngxtechnologies.com/product_info.php?cPath!&products_ide
> ).
> It has a header for AD0-5 and the circuit for the analog stuff looks
> reasonable. It could be a layout issue with the PCB (or a code issue).
>
> I'll try the LPCXpresso board and see if I have better luck with that.
>
> Can you recommend a basic LPC1768 or 1769 development board that has
> known working ADC inputs?
>
I have a Keil MCB1760 and it works, I used also some LpcXpresso/1769 and
I haven't problems. Basically the adc has no problems at chip level,
most common are code problems, so making a prototype project just to use
the adc may be a starting point to help investigation in both hw and sw
sides. I don't think is a good idea to change the development board, I
think could be better to investigate to find the problem. Any result
with a data watch on adc register and data read = 4095?
>



On 2/14/2012 2:44 PM, Jerry wrote:
> At this point, I'm going to start probing right at the MCU pins
> looking for noise and glitches on the analog inputs and
> references/grounds. I also have an LPCXpresso with a LPC1769 I'll try
> my code on.

Make sure that you are looking at a sufficiently high frequency range.
The last time I ran into this problem there were 1nS glitches on the
inputs as the source of the problem.

Cured with a simple RC filter. Capacitor connected to the input pin and
analog ground. Connections must be short.

Capacitor should be a high quality (NP0 should be good, you can get away
with X7R) and relatively large (I wouldn't want to use smaller than
10nF, 100nF would be better). This will be the charge reservoir that
provides the high bandwidth required by the A/D mux.

Robert

--
http://www.aeolusdevelopment.com/

From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time? 37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live....
we currently have stock."
Jerry,

The first thing that came to my mind when I read your
OP was that "he is not using a NGX board is he ?".
Now with all the other replies about not having similar
problems as yours I would totally suspect the ngx board.
Look at the schematic for instance : the one and only
transistor in there is wrong. I'am not saying this is
the fault but it seems to be on more of their designs.
(the transistor is a rookie mistake)

roelof

--- In l..., "roelof 't Hooft" wrote:
> The first thing that came to my mind when I read your
> OP was that "he is not using a NGX board is he ?".

Roelof,

I'm strongly leaning towards a board issue at this stage and will need to switch to another development board. Another poster mentioned the Keil board, but it's rather expensive at $320 for a hobby project.

Another board I found searching the Internet is this one:

http://www.futurlec.com/LPC1768_Controller.shtml

Anyone have any experience with this board, particularly the analog ports?

Il 15/02/2012 17:12, Jerry ha scritto:
>
>
> --- In l... ,
> "roelof 't Hooft" wrote:
> > The first thing that came to my mind when I read your
> > OP was that "he is not using a NGX board is he ?".
>
> Roelof,
>
> I'm strongly leaning towards a board issue at this stage and will need
> to switch to another development board. Another poster mentioned the
> Keil board, but it's rather expensive at $320 for a hobby project.
>
I didn't use the futurlec one, I think the most viable solution if you
don't need an lcd is the LpcXpresso board, you could also buy the
support board. Another quite good alternative is www.olimex.com They
made also boards found in IAR development kits, the quality is quite good.
> Another board I found searching the Internet is this one:
>
> http://www.futurlec.com/LPC1768_Controller.shtml
>
> Anyone have any experience with this board, particularly the analog ports?



--- In l..., "M. Manca" wrote:
> I didn't use the futurlec one, I think the most viable solution if you
> don't need an lcd is the LpcXpresso board, you could also buy the
> support board. Another quite good alternative is www.olimex.com They
> made also boards found in IAR development kits, the quality is quite good.

The problem with the Keil and the Olimex boards, and others like, it is that they pretty much force you to use the peripherals build onto the boards and have little, if any, provision for connecting directly to the LPC1768 ports.

Ideally, what I'd like is something like a breakout board that includes the LPC176x, the crystals, bypass caps, JTAG connector, and headers for all the port pins. I don't need LCDs, USB, serial port connectors, accelerometers, CAN ports, SD card sockets, and all the other stuff put on typical development boards.

The NGX BlueBoard is like this, but if the analog ports don't work properly, it's useless to me.

--- In l..., "Jerry" wrote:
>
> --- In l..., "M. Manca" wrote:
> > Until now I had problems only on mbed boards but is due to an unhappy
> > pcb design. On other development boards and on my own boards I have no
> > similar problems as yours. Thinking about the 4095 count I could say
> > that is as if your pin reads the VCC or the VREF or a voltage greater or
> > equal to VREF. So... just to speaking you could check VREF and its
> > ground pins and... check if there is the possibility that for any
> > strange reason your sw (think to a strange bug) may setup your analog
> > pin as a digital i/o during the conversion phase (I can't imagine the
> > result).
>
> I thought about a conflict with a digital I/O, but the only functions that share the same pin as ADC channel 0 are the I2S and one of the timer capture registers, and my code doesn't use these.
>
> My development board is a NGX Technologies BlueBoard (http://shop.ngxtechnologies.com/product_info.php?cPath!&products_ide). It has a header for AD0-5 and the circuit for the analog stuff looks reasonable. It could be a layout issue with the PCB (or a code issue).
>
> I'll try the LPCXpresso board and see if I have better luck with that.
>
> Can you recommend a basic LPC1768 or 1769 development board that has known working ADC inputs?
>

I think you should remove L2 and L4 from the bottom of the board and replace them with solder bridges. With the inductors in place the micro does not have a solid ground and this will cause problems for the analog circuits. The inductors allow the ground pins of the analog and digital sections of the chip to differ due to switching current spikes. As a bare minimum, Vssa and Vref- MUST be tied together.

Regards
Dan

On Wed, 2012-02-15 at 20:01 +0000, Jerry wrote:
> The problem with the Keil and the Olimex boards, and others like,
> it is that they pretty much force you to use the peripherals build
> onto the boards and have little, if any, provision for connecting
> directly to the LPC1768 ports.

If it is only for testing the analog ports, who cares about
the extra stuff.
> Ideally, what I'd like is something like a breakout board that
> includes the LPC176x, the crystals, bypass caps, JTAG connector,
> and headers for all the port pins. I don't need LCDs, USB, serial
> port connectors, accelerometers, CAN ports, SD card sockets, and
> all the other stuff put on typical development boards.

The lpcxpresso board mentioned seems to be a good fit
for you. You can buy the 1769 version for about 35 euro.
> The NGX BlueBoard is like this, but if the analog ports don't
> work properly, it's useless to me.

Yep.

roelof

--- In l..., "dandebeer" wrote:
> I think you should remove L2 and L4 from the bottom of the board and replace them with solder bridges. With the inductors in place the micro does not have a solid ground and this will cause problems for the analog circuits. The inductors allow the ground pins of the analog and digital sections of the chip to differ due to switching current spikes. As a bare minimum, Vssa and Vref- MUST be tied together.

Dan,

I tried removing L2 and L4 replacing them with solder bridges. It makes no difference to the results.

There is approx. 350 mV of noise on Vref- and Vssa, but no glitches larger than that.