Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

FTDI programmer device name space--suggestions?

FTDI programmer device name space--suggestions?

2005-09-24 by Johnathan Corgan

I am continuing my work to add an inboard FTDI USB<->serial
converter-based bit bang programming mode to avrdude.  This allows one
to wire MOSI/MISO/SCLK/RESET to the FTDI bit-bang bus and have USB based
in-circuit programming of an AVR.  So, one could use an FT232BM or
similar part to not only provide a simple USB interface to an AVR
project for normal communications, but also to reuse this same set up
for in-circuit programming.

I've had this working for several weeks now in experimental form, using
FTDI's FTD2XX driver library on Windows and libftdi under Linux.  My own
project is a USB-powered peripheral device with an FT232BM and an
ATmega8, and flash updates over the USB are pretty convenient.

Anyway, I'm trying to formalize this functionality and make it ready for
general inclusion in avrdude (potentially as part of the 5.1 release),
and I'm struggling with what "name space" I should use to designate the
"port" (-P command line parameter.)

Under Windows, using FTD2XX, the open call to access an FTDI device on
the bus takes an integer device number, which corresponds to the order
the bus scan finds FTDI chips.  Alternatively, one can specify a USB
device name string or serial number string.

Under Linux, using libftdi, the open call takes an integer vendor
ID/product ID pair, optionally qualifying them with a device name string
or serial number string.  The ID pair is required; the strings are
simply used to further restrict the device selection if they are supplied.

Finally, certain FTDI parts are dual-interface, and one must choose
which interface.  Under the FTD2XX library in Windows, these enumerate
as separate devices during bus scan so one would just use a different
integer in the open call.  Under libftdi, one has to select the
interface once opened with a different call, passing a 0 or a 1.

So, what's a good way to supply this to -P in avrdude?

I can see something like:

-P <vendor ID>:<product ID>:<desc>:<serial>:<interface>

or

-P <devnum>

with suitable defaults for blank fields.  But this seems overly
complicated, and which one to use is platform dependent.  (It's also a
lot of work to program and debug :-)

I know the FTDI/AVR combination is a (relatively) small subset of the
AVR community, but I'm sure there are others besides myself who would
benefit from this and I want to get it right.

Comments?

-Johnathan

Water level sensing

2005-09-26 by OWEN-A

I have in the past used the NS LM1830 chip to monitor loss of water this
chip feeds an ac signal to a probe, ac is used to prevent build up of oxides
on the probe but can no longer find a supplier of these chips in Australia.
Has anyone tried using a micro for this purpose and had success.

Thanking you,
Owen

Re: [AVR-Chat] Water level sensing

2005-09-26 by Ralph Hilton

On Mon, 26 Sep 2005 15:21:18 +1000 you wrote:

>I have in the past used the NS LM1830 chip to monitor loss of water this
>chip feeds an ac signal to a probe, ac is used to prevent build up of oxides
>on the probe but can no longer find a supplier of these chips in Australia.
>Has anyone tried using a micro for this purpose and had success.

The MPXV5004G from Freescale measures the water level directly by pressure and might be of
interest.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] Water level sensing

2005-09-26 by John Samperi

At 03:21 PM 26/09/2005, you wrote:
>I have in the past used the NS LM1830

Looks like a discontinued product from NS. I have 6
left in stock :-) from an old client's product which
we no longer make.

Once upon a time I used to just send 6V ac into the water
tank and rectify the returning voltage and then Schmitt
trigger the voltage. Not as accurate as the LM1830 though.



Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

RE: [AVR-Chat] Water level sensing

2005-09-26 by OWEN-A

Thank you for the suggestion Ralph, the application is for the sudden loss
of coolant from an engine, detecting the presence or absence of coolant in
the top tank of a radiator for this the stainless steel probe works well and
is very robust, an earlier system used a pressure switch to detect loss of
pressure but this was not reliable.
The pressure sensor you suggest would work but may not be able to withstand
the vibration and heat which was the case with the pressure switch.
I was thinking that an avr may be able to perform a simular function to the
LM1830 by generating a pulse train on one pin and coupling this to the probe
with a capacitor and using the inbuilt comparator. I was wondering if anyone
had tried this.

Thanking you.
Owen.    
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Ralph Hilton
Sent: Monday, 26 September 2005 3:55 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Water level sensing

On Mon, 26 Sep 2005 15:21:18 +1000 you wrote:

>I have in the past used the NS LM1830 chip to monitor loss of water this
>chip feeds an ac signal to a probe, ac is used to prevent build up of
oxides
>on the probe but can no longer find a supplier of these chips in Australia.
>Has anyone tried using a micro for this purpose and had success.

The MPXV5004G from Freescale measures the water level directly by pressure
and might be of
interest.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net



 
Yahoo! Groups Links

Re: [AVR-Chat] Water level sensing

2005-09-26 by Kathy Quinlan

OWEN-A wrote:

> Thank you for the suggestion Ralph, the application is for the sudden loss
> of coolant from an engine, detecting the presence or absence of coolant in
> the top tank of a radiator for this the stainless steel probe works well and
> is very robust, an earlier system used a pressure switch to detect loss of
> pressure but this was not reliable.
> The pressure sensor you suggest would work but may not be able to withstand
> the vibration and heat which was the case with the pressure switch.
> I was thinking that an avr may be able to perform a simular function to the
> LM1830 by generating a pulse train on one pin and coupling this to the probe
> with a capacitor and using the inbuilt comparator. I was wondering if anyone
> had tried this.
> 
> Thanking you.
> Owen.    

On a car, you could use a missing pulse detector with a 556, one half to 
generate the pulse the other to detect the missing pulse, when the 
collant is up to level, it will miss pulses due to being shorted to 
ground, but when it goes low, after a short delay, the pulse is sensed 
and the output of the second half will swing, and can be used to turn on 
a led / buzzer.

Could do the same with an AVR eg Tiny15 (just remember to put a resistor 
in series with the output and sense on the radiator side of the resistor 
(470R or there about should over ride the leakage current)

Regards,

Kat.

-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------	


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 23/09/2005

RE: [AVR-Chat] Water level sensing

2005-09-26 by OWEN-A

Thank you for the reply Kat,
yes your suggestion would work well for a while but any dc component can
cause electrolysis and plating which is also accelerated by the heat of the
coolant and can eat away the electrode or the tank near the electrode fairly
quickly, the probe is usually fed with a pulse usually around 4khz through a
resistor capacitor network to remove any dc component.
The LM1830 chip also detects the resistance of the probe and turns on an
open collector transistor when the resistance increases above a preset level
(coolant loss).
I will try an avr looks like a bit of experimenting may be necessary for
reliability.
 
Thanking you.
Owen.  
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Kathy Quinlan
Sent: Monday, 26 September 2005 9:22 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Water level sensing

OWEN-A wrote:

> Thank you for the suggestion Ralph, the application is for the sudden loss
> of coolant from an engine, detecting the presence or absence of coolant in
> the top tank of a radiator for this the stainless steel probe works well
and
> is very robust, an earlier system used a pressure switch to detect loss of
> pressure but this was not reliable.
> The pressure sensor you suggest would work but may not be able to
withstand
> the vibration and heat which was the case with the pressure switch.
> I was thinking that an avr may be able to perform a simular function to
the
> LM1830 by generating a pulse train on one pin and coupling this to the
probe
> with a capacitor and using the inbuilt comparator. I was wondering if
anyone
> had tried this.
> 
> Thanking you.
> Owen.    

On a car, you could use a missing pulse detector with a 556, one half to 
generate the pulse the other to detect the missing pulse, when the 
collant is up to level, it will miss pulses due to being shorted to 
ground, but when it goes low, after a short delay, the pulse is sensed 
and the output of the second half will swing, and can be used to turn on 
a led / buzzer.

Could do the same with an AVR eg Tiny15 (just remember to put a resistor 
in series with the output and sense on the radiator side of the resistor 
(470R or there about should over ride the leakage current)

Regards,

Kat.

-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------	


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 23/09/2005




 
Yahoo! Groups Links

Re: [AVR-Chat] Water level sensing

2005-09-26 by Tom Becker

> ... any dc component can cause electrolysis...

I capacitively coupled a 555 pulse through soil with buried stainless 
probes for pseudo-hydroponics some 20 years ago.  The systems are still 
running.


Tom

Re: [AVR-Chat] Water level sensing

2005-09-26 by Don Jackson - AE5K

OWEN-A wrote:
> Thank you for the reply Kat,
> yes your suggestion would work well for a while but any dc component can
> cause electrolysis and plating which is also accelerated by the heat of the
> coolant and can eat away the electrode or the tank near the electrode fairly
> quickly, the probe is usually fed with a pulse usually around 4khz through a
> resistor capacitor network to remove any dc component.
> The LM1830 chip also detects the resistance of the probe and turns on an
> open collector transistor when the resistance increases above a preset level
> (coolant loss).
> I will try an avr looks like a bit of experimenting may be necessary for
> reliability.
>  
> Thanking you.
> Owen.  

Have a look:

http://www.coolon.com.au/download/DS_CL4L.pdf

Re: [AVR-Chat] Water level sensing

2005-09-26 by Ralph Hilton

On Mon, 26 Sep 2005 21:13:29 +1000 you wrote:

>Thank you for the suggestion Ralph, the application is for the sudden loss
>of coolant from an engine, detecting the presence or absence of coolant in
>the top tank of a radiator for this the stainless steel probe works well and
>is very robust, an earlier system used a pressure switch to detect loss of
>pressure but this was not reliable.
>The pressure sensor you suggest would work but may not be able to withstand
>the vibration and heat which was the case with the pressure switch.
>I was thinking that an avr may be able to perform a simular function to the
>LM1830 by generating a pulse train on one pin and coupling this to the probe
>with a capacitor and using the inbuilt comparator. I was wondering if anyone
>had tried this.

I would be inclined to use an analog switch such an a 4053 and the ADC. Take a resistor
from Vcc to an ADC pin. Connect the control of the 4053 to a high frequency signal. The
pins ADC in and GND would connect to the switch which would reverse the output polarity at
the frequency of the control signal. The 2 output lines then connect to the water
container via small caps. The ADC pin would need a smoothing cap. thus the ADC would see
an easily measured DC value but the probe would see AC.


--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: Water level sensing

2005-09-27 by Stefan Wimmer

--- In AVR-Chat@yahoogroups.com, Ralph Hilton <ralph@r...> wrote:

> I would be inclined to use an analog switch such an a 4053 and the 
ADC. Take a resistor
> from Vcc to an ADC pin. Connect the control of the 4053 to a high 
frequency signal. The
> pins ADC in and GND would connect to the switch which would reverse 
the output polarity at
> the frequency of the control signal. The 2 output lines then 
connect to the water
> container via small caps. The ADC pin would need a smoothing cap. 
thus the ADC would see
> an easily measured DC value but the probe would see AC.

Seems unnecessarily complicated to me. Why not use a (AVR generated) 
square wave signal capacitor coupled to the probes and measure the 
current thru a sense resistor just in the halfwave with the right 
polarity? Or - if really necessary spend some cents on an opamp which 
does precision rectifying (and amplification while we're on it) of 
the voltage across the current sense resistor.

Just my 2c,
Stefan

Re: [AVR-Chat] Re: Water level sensing

2005-09-27 by Zack Widup

Maybe you could implement this:

http://ww1.microchip.com/downloads/en/AppNotes/00512e.pdf

This circuit is designed for a PIC but I am in the process of implementing 
it with an AVR.  I have used the PIC version to detect the water levels in 
boreholes and mine voids with the probes attached to a cable and lowered 
as much as several hundred feet down. My PIC version also includes an LCD 
to display the resistance measured. But you could get as simple or as 
elaborate as you want. My probes are 6-inch lengths of stainless steel 
rod 3/32 inch in diameter spaced 1 inch apart.  But you could make 
smaller probes to detect the water level in any sort of reservoir. In a 
metal radiator you could even use the radiator as one terminal and a small 
probe as the other. Probes out of water should measure many megohms, and 
probes in water that is not distilled should be on the order of tens to 
thousands of ohms.

Zack

Re: [AVR-Chat] Re: Water level sensing

2005-09-28 by kholt@sonic.net

The benefit of the switched input rather than a full wave
rectifier is that the input now becomes "tuned" to the
frequency and phase of the generated sense signal, thereby reducing
or eliminating most other spurious signals.
It may not be necessary in this application, but it is a
very useful engineering principle to follow in general.
Ken
Show quoted textHide quoted text
> --- In AVR-Chat@yahoogroups.com, Ralph Hilton <ralph@r...> wrote:
>
>> I would be inclined to use an analog switch such an a 4053 and the
> ADC. Take a resistor
>> from Vcc to an ADC pin. Connect the control of the 4053 to a high
> frequency signal. The
>> pins ADC in and GND would connect to the switch which would reverse
> the output polarity at
>> the frequency of the control signal. The 2 output lines then
> connect to the water
>> container via small caps. The ADC pin would need a smoothing cap.
> thus the ADC would see
>> an easily measured DC value but the probe would see AC.
>
> Seems unnecessarily complicated to me. Why not use a (AVR generated)
> square wave signal capacitor coupled to the probes and measure the
> current thru a sense resistor just in the halfwave with the right
> polarity? Or - if really necessary spend some cents on an opamp which
> does precision rectifying (and amplification while we're on it) of
> the voltage across the current sense resistor.
>
> Just my 2c,
> Stefan
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Re: [AVR-Chat] Water level sensing

2005-09-28 by kholt@sonic.net

Over the years, I have tried many ways to measure the height of
the water in our fiberglass fresh tank, which holds only up to
3.5 ft of head.
I have recently been using a cheap pressure sensor, connected to
an AVR to process the signal, display, and sound alarms.
The sensors are not easy to use for various reasons.
Before the pressure system, I used a thin sheet of aluminum glued
flat to the outside of the tank, forming one side of a capacitor,
the water the other.  The capacitance, and hence the depth, was
measured by listening to the pitch of the oscillator.
Ken
Show quoted textHide quoted text
> On Mon, 26 Sep 2005 15:21:18 +1000 you wrote:
>
>>I have in the past used the NS LM1830 chip to monitor loss of water this
>>chip feeds an ac signal to a probe, ac is used to prevent build up of
>> oxides
>>on the probe but can no longer find a supplier of these chips in
>> Australia.
>>Has anyone tried using a micro for this purpose and had success.
>
> The MPXV5004G from Freescale measures the water level directly by pressure
> and might be of
> interest.
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.