Menu Sign In Contact FAQ
EuroGA Banner
Welcome to our forums

ChatGPT discussion, and "AI", and a repository for ChatGPT posts

You had more luck than I had smiley I asked it to draw a circuit which uses a CMOS 555 to create a 30 minute retriggerable monostable, triggered when the output from an anemometer (0-3.8V DC) exceeds a certain wind speed, and operates a relay. I can draw this in a few mins but I thought I’d give it a go. FB nowadays makes tens of $BN by hosting movies, most of which are AI-generated. It also puts up a load of circuits which are 99% AI-generated and dud. This is Claude:

Then it correctly chose the auto Coup de grâce option with

Administrator
Shoreham EGKA, United Kingdom

yes, the first tier pricing is useless, runs out of token all the time.

To be fair, I didnt’ get to a place were claude would magically do what I wanted in the cloud overnight. took quite a bit of time to setup the right workflow, in terms of skills, environment, mcp etc (and some frustration along the way). but once you get there it feels like magic. My advice, don’t give up…

Last Edited by roznet at 23 May 14:15
EGTF, United Kingdom

FB must be using some other generator for the vast number of fake circuits that come up. One can spot most of them immediately when some transistor does not have a DC path to its base. But lately FB has started dragging out real circuits of ancient audio gear, etc.

The circuit should be something like this, and is readily derived from many online examples

Administrator
Shoreham EGKA, United Kingdom

Claude attempt #2 (after I gave it my sketch above)

So I think “we” are safe for a bit smiley

For whatever reason, generating “mostly working” software is a lot easier to do with this “AI” technique.

I used to do FPGA design, up to 1996, and used Viewlogic 4 for drawing the circuits. VL also had a capabiity to generate a circuit diagram from a netlist, and it did a reasonable job of it. Certainly you could read it. So that job was largely solved 30 years ago. But it was done with software written for that task. “AI” is mostly not “software written for a task”. It is [insert your favourite description; mine is “pattern matching”] and is mostly generic.

Administrator
Shoreham EGKA, United Kingdom

You should (perhaps) try NotebookLM by Google. I find it rather useful for technical stuff. It works a bit different. I gave it this description:

“draw a circuit which uses a CMOS 555 to create a 30 minute retriggerable monostable, triggered when the output from an anemometer (0-3.8V DC) exceeds a certain wind speed, and operates a relay”

It then searches the net for stuff. It ended up with this diagram (I have no idea if it works though, or if it’s even remotely correct smiley ) but it looks hell of a lot better than Claude. I normally just feed it with documents. For instance, Rotax manuals. I can then ask everything, and it will keep to the documentation and answer anything with references etc. Searching the web is an additional way to get documents.

It also gave this (rather lengthy description)

Technical Design Specification: 30-Minute Wind-Triggered Retriggerable LMC555 Timer

1. System Overview and Scope

This specification defines the design requirements for a wind-triggered monostable multivibrator circuit. The system shall detect wind activity via an anemometer and activate a primary load for a duration of 30 minutes.

The design utilizes the LMC555 CMOS Timer IC. This component is mandatory to meet high-impedance timing requirements and low-power constraints. The LMC555 is selected over bipolar variants (e.g., NE555) for the following parameters:

  • Minimal Power Dissipation: Typical dissipation is less than 1 mW at 5 V, ensuring efficiency in standby modes.
  • High Impedance Inputs: Typical trigger and threshold currents of 10 pA allow for the use of high-value timing resistors without inducing significant offset errors.

2. Input Stage: Signal Conditioning with LM311

The circuit shall interface with the anemometer through an LM311 Voltage Comparator. The comparator serves to convert the analog sensor signal into the clean, digital falling-edge pulse required to trigger the LMC555.

The LM311 features an open-collector architecture; therefore, a pull-up resistor must be installed at the output to ensure a valid logic HIGH state during standby. The wind-speed sensitivity shall be field-adjustable via a 10 kΩ potentiometer configured as a voltage divider at the comparator’s inverting input.

Table 1: Input Stage Component Specifications

Component Function Specification
LM311 Comparator Analog-to-digital signal conversion. Open-collector; V_{CC} up to 36 V.
Threshold Potentiometer Field-adjustable wind trigger point. 10 kΩ linear taper; metal-film.
Pull-up Resistor Trigger signal bias and logic-high return. 4.7 kΩ to 10 kΩ; 1% tolerance.

3. Timing Network Calculation and Component Selection

The timing interval (t_H) is established by an external RC network in a monostable configuration.

Monostable Formula: t_H = 1.1 \times R \times C

Specified Component Values:

  • Timing Resistor (R): 3.48 MΩ (Metal-film for temperature stability and low noise).
  • Timing Capacitor (C): 470 µF.

Calculation Verification: t_H = 1.1 \times (3.48 \times 10^6 \Omega) \times (470 \times 10^{-6} F) t_H = 1.1 \times 3.48 \times 470 t_H \approx 1,802.16 \text{ seconds (30.04 minutes)}

Engineering Note on Tolerances: While the theoretical duration is 30.04 minutes, real-world timing will vary based on component tolerances. Standard 5% resistors and 20% electrolytic capacitors can result in a significant timing spread. Designers shall account for this variance during final calibration.

Mandatory Capacitor Selection: Standard aluminum electrolytic capacitors are unacceptable for C due to high equivalent series resistance (ESR) and leakage. Because R is extremely high (3.48 MΩ), even nano-ampere leakage can prevent the capacitor from reaching the 2/3 V_S threshold. A Low-Leakage Aluminum Electrolytic (e.g., Nichicon KL series) or a bank of Tantalum capacitors shall be used.

4. Retriggerable Mechanism Implementation

Standard LMC555 monostable operation is non-retriggerable. To ensure the 30-minute window restarts with every new wind pulse, a diode steering mechanism shall be implemented.

  • Configuration: A small-signal diode (e.g., 1N4148) shall be placed with its anode connected to the Threshold/Discharge node (Pins 6 & 7) and its cathode connected to the Trigger input (Pin 2).
  • Operation: When the LM311 detects wind and pulls Pin 2 LOW, the diode becomes forward-biased. This immediately dumps the accumulated charge from the timing capacitor C into the LM311’s open-collector output.
  • Inhibit Logic: This discharge restarts the 1.1 RC ramp from 0 V, effectively resetting the 30-minute countdown every time a trigger pulse is received.

Trigger Duration Constraint: Per the LMC555 datasheet, the trigger pulse duration must be shorter than the timing interval t_H. While a 30-minute interval provides a large margin, the signal conditioning stage shall be verified to ensure the LM311 does not hold Pin 2 LOW indefinitely, which would force the output to stay HIGH regardless of the RC timing.

5. Output Stage and Relay Control

The LMC555 Pin 3 (Output) shall drive a relay to switch the system load.

  • Pin 4 (RESET) Handling: To prevent false triggering caused by noise, Pin 4 shall be tied directly to V_S.
  • Drive Limits: The LMC555 output is rated for -10 mA (source) and 50 mA (sink). If the relay coil requires higher current, an intermediate transistor driver is mandatory.
  • Inductive Protection: A 1N4007 (or equivalent) flyback diode shall be placed across the relay coil to protect the CMOS IC from inductive voltage spikes during de-energization.
  • Output Logic: The output shall be logic HIGH during the 30-minute interval and logic LOW during standby.

6. Electrical Specifications and Environmental Constraints

The circuit must adhere to the following operational parameters:

Electrical Characteristics

  • Operating Voltage (V_S): 1.5 V to 15 V.
  • Supply Current (I_S): ~250 µA typical at 5 V.
  • Trigger/Threshold Current: 10 pA typical.

Environmental and Layout Requirements

  • Temperature Range: -40 °C to 85 °C (Industrial) or 125 °C (Extended).
  • Bypass Capacitance: A 0.1 µF ceramic bypass capacitor shall be placed for each IC (LM311 and LMC555). These capacitors must be located within 2 mm of the V+ pin to mitigate supply current spikes during output transitions.
  • Signal Integrity: Due to the high-impedance nature of the 3.48 MΩ resistor, the trace between R, C, and Pins 6/7 must be kept as short as possible to minimize EMI/RFI susceptibility.
The elephant is the circulation
ENVA ENOP ENMO, Norway

That is amazing. I think it is patching together some circuit blocks. A few mistakes: the trigger input is also going into the output pin. They mucked up the numbers, with pin 3 messed up and “3” shown on the output transistor. Also it is very hard to find a low enough leakage cap in 470uF. I am using 100uF which (in polyester) is available for the “fake hi-fi” market, for some purpose I am not sure of. The resistor on pin 3 of the comparator is spurious, as is the series resistor feeding the 555 input. One sees a lot of spurious resistors in AI-generated circuits, presumably because the machine is just chucking together patterns.

These are spurious, especially the “2mm”:

Bypass Capacitance: A 0.1 µF ceramic bypass capacitor shall be placed for each IC (LM311 and LMC555). These capacitors must be located within 2 mm of the V+ pin to mitigate supply current spikes during output transitions.
Signal Integrity: Due to the high-impedance nature of the 3.48 MΩ resistor, the trace between R, C, and Pins 6/7 must be kept as short as possible to minimize EMI/RFI susceptibility.

Claude, which seems to “get” my sketch OK, in the meantime found two mistakes: the comparator inputs are swapped, and (much more subtle, this) the max Vo of the 555 can be 2V short of the +12V rail, so if the Vgs(on) of the FET is anywhere near that (which it will be) the FET will be getting turned on. I am replacing it with a TIP126 and 2 resistors, because I have a box full of TIP126s. It failed to find an omission in my circuit: you need a diode across the relay coil.

Actually a far better way to do these long delays is with a CD4060. Claude got that too but only after I suggested it.

As was stated early on here, it is amazing how far one can get without any understanding smiley In some fields, like software, further than in others.

Then you get onto the debate of “what is understanding”. Whatever it is, “AI” does not have it smiley But I can see we are going to have a whole load of fun testing it…

Administrator
Shoreham EGKA, United Kingdom

@peter what Claude model were you using? I tried with your simple instructions and it did a better job than what you’ve posted above. I used Opus 4.7 in adaptive mode.

EGTR / London, United Kingdom

Sonnet 4.6 – never changed it.

Administrator
Shoreham EGKA, United Kingdom

Sonnet’s benefit is it’s much cheaper. But Opus will likely give better results when you go beyond things like text summaries etc.

  1. 30-minute retriggerable monostable, wind-triggered relay driver (TLC555 CMOS)

  1. Circuit walk-through

Five sections, left to right.

  1. 1. Input + filter

Anemometer 0 to 3.8V into R1 (100kΩ) and C2 (10µF) to ground. RC ≈ 1s averages out brief gusts so the comparator doesn’t chatter on every puff.

  1. 2. Comparator + threshold

LM393 (open-collector, so R8 10kΩ pull-up to +12V on the output). The threshold reference is built from R2 (1kΩ) and D3 (5V1 zener) giving a clean 5.1V rail across RV1 (10kΩ multi-turn) so the wind-set pot is calibrated against the zener, not the supply. RV1 wiper feeds IN−, filtered anemometer feeds IN+. R9 (1MΩ) from output back to IN+ gives a small hysteresis band to kill chatter right at threshold. Output goes HIGH when wind exceeds the set point.

  1. 3. Retrigger logic

This is the heart of “retriggerable”. Two transistors driven by the comparator output:

- Q1 (2N3904) via R3 (47kΩ) base resistor sits across the timing cap. While wind is over threshold, Q1 holds C5 hard discharged. The 555 cannot time out.
- Q2 (2N3904) is fired by a C4/D1/R4 differentiator. Each rising edge of the comparator output generates a brief low pulse on pin 2 of the 555 to fire it. D1 (1N4148) blocks the negative edge, R4 (100kΩ) pulls Q2’s base down between events.

So: wind rises above threshold → Q2 fires the 555 and Q1 clamps the cap. Wind drops below threshold → Q1 releases, cap starts charging, 30-minute timer begins. Another gust before the timer expires → Q1 clamps again, restarting the period when it next falls. That is the retrigger behaviour.

  1. 4. TLC555 monostable

Pin 4 RST tied to +12V (always enabled), pin 5 CTRL bypassed with C6 (10nF), pin 2 TRIG pulled up via R5 (100kΩ), pins 6 and 7 tied together at the T-node. Timing: R6 (3.3MΩ) + R7 (1MΩ trim) to +12V, C5 (470µF) to GND.

`t = 1.1 × R × C` → with R ≈ 3.48MΩ and C = 470µF, t ≈ 1800s.

Why the CMOS 555 and not a standard NE555. At these R values (megohms) a bipolar 555’s pin 6/7 leakage current is comparable to the charging current. The TLC555 / ICM7555 has picoamp input bias, so the timing is set by the RC, not by the chip.

Why low-leakage tantalum on C5. At threshold the charging current is roughly 1.2µA. A regular aluminium electrolytic can leak more than that, which means the cap never reaches 2/3 Vcc and the 555 never times out. A low-leakage tantalum or a quality film cap is mandatory here. If you can find a 470µF film cap (unlikely in any sensible volume) even better, but a low-leakage tantalum is the practical pick.

  1. 5. Relay driver

Pin 3 OUT through R10 (1kΩ) to Q3 (2N2222) base, emitter to GND, collector pulls one side of the relay coil to GND. K1’s other side sits on +12V. D2 (1N4007) is the freewheel diode across the coil, cathode to +12V, to catch the inductive kick when Q3 turns off.

  1. Calibration procedure

Set RV1 first: apply a known anemometer voltage that corresponds to your trip wind speed (e.g. if 3.8V is full-scale and you want to trip at 20kt out of a 50kt range, that’s roughly 1.5V) and adjust RV1 so the comparator just trips. Then trim R7 with a stopwatch and the input force-tripped: target 1800s, expect a few percent of part-tolerance scatter.

  1. Output polarity note

The 555 output (pin 3) is HIGH for the duration of the monostable pulse, so the relay is energised during the 30 minutes after a wind event. If you wanted relay-ON when wind is high and relay-OFF after 30 minutes of calm, that’s what you get. If you actually want the opposite polarity (relay-OFF for 30 minutes after wind, then back ON) swap Q3 for a PNP high-side driver or just use an inverting transistor stage.

EGTR / London, United Kingdom

That looks correct, with some observations:

  • Q2 (and the differentiator parts) appears not necessary since the trigger of the 555 is level (not edge) sensitive.
  • Q1 has no current limit for discharging the cap, so they rely on the min Hfe and the 47k base resistor to limit the current.

Otherwise, yes, the circuit seems right!

EDIT: the leakage of a 470uF tantalum cap is way too high. I think it got this value from other circuits on the internet, but it won’t work with a 4.3M charging resistor. It would need to be a film cap, and good luck finding a 470uF one (I could not find anything bigger than 100uF, unless going to huge industrial parts).

This is quite a good level of expertise involving stitching together of bits of circuits, without an “electronics understanding”. Same as it does with software but for some reason there it works a lot better, perhaps because there is vastly more source code out there.

It would be interesting to phrase the spec to use a digital counter approach. The old CD4060 is one obvious way.

Administrator
Shoreham EGKA, United Kingdom
Sign in to add your message

Back to Top