Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Malcolm XML posted:

How does the existing electronics in car ECUs deal with this

I.would.just copy them

probably by putting the signal through a special-purpose chip that was designed specifically for that one customer, has no datasheet publicly available, and only comes in super-annoying packages like DFN. also you can't buy them anywhere, but the manufacturer will send you a sample if you first sign 500 NDAs and prove to them that you have the capability to buy 500,000.

Adbot
ADBOT LOVES YOU

Sagebrush
Feb 26, 2012

longview posted:

1) just get a unidirectional TVS

2) yeah it would reduce the diode current, i don't know the details of motorcycle ignition systems but you should be sure that killing the high voltage spike won't cause issues with the circuit operation
in addition, whenever the TVS conducts it'll conduct high frequency current which is usually bad for noise

ps: 1n400x and 1n540x are banned from any circuit involving frequencies higher than 60 Hz, they are atrociously slow. 1n4148 is pretty good.

4) that's correct
thinking more about as mentioned in a previous post, with a high impedance input there shouldn't be much noise coupling really and a comparator might be more appropriate and easier to work with:

hysteresis will also provide some extra noise immunity.

this is fantastic stuff, thanks

i am glad you brought up the difference between absorbing noise and reflecting it. i had noticed that shorting the signal wire to ground makes the engine stall, and i was worried about the effect of a TVS effectively dropping a crowbar across those lines. so i reviwed my understanding of ignition coils and lol yeah i think my initial circuit would just kill the engine:
- in between pulses, the coil is connected directly to the battery voltage (the noisy ~14v part of my trace)
- a few degrees before the ignition event, the coil is disconnected from the battery, which allows a parallel capacitor to charge to ~400v instead (the low section)
- at the moment of ignition, the line is reconnected and the capacitor discharges through the coil primary, producing 25kV on the secondary

sooo i'm fairly sure that the giant spike is literally the coil drive pulse and if i knocked that out of the line well let's just say that would be not a successful strategy. lol

so i'm liking your alternate strategy with the biased diode and small RC more and more. it's way more elegant and i can reuse it over and over for all of the other inputs (i am also gonna connect to five or six lines for the indicator lights, but fortunately those change slowly enough that noise filtering is trivial). AND it made me realize i can use something similar to clean up the signal from the thermostat, which is just a thermistor run into a voltage divider, but i was having trouble with it because one leg was on battery voltage which fluctuates like crazy.

so yeah this is a huge help, thank you. i'm gonna start with your earlier circuit that just uses the bias and RC into an optoisolator and see if that works, cause i have most of the parts already, and if it still needs cleaning i'll look into the comparator method.

i am looking for some diodes with high switching speed and high reverse voltage capacity for D1. the 1n4148 only handles like 100v so that won't do it. i found these ones that might work. do you think 75ns is fast enough based on the traces i posted, or should i go for these fancier silicon carbide guys that apparently have "no recovery time" for small currents? i really only need the one, since this is the only input channel with these specific issues, so i'm ok spending 2 bucks on the diode if it makes sense.

1kv schottky, 75ns, cheap
600v silicon carbide, "no recovery time"
1.2kv silicon carbide, "no recovery time"


hobbesmaster posted:

oh god, analog



trigger warning that poo poo

the circuit i'm trying to read is pretty fuckin analog so i don't think there's much of a choice here :unsmigghh:

someone posted about using an fpga to do the filtering but lol i have no clue how to start with that. i'm reading this stuff on an 8mhz ATTiny. at least i understand the concepts of analog filtering

Luigi Thirty posted:

I'm no EE but once I see "1000V" on a schematic I run screaming

appears to be only about 400v in a spike but if it's really the capacitor discharge it would definitely pop a diode rated near the peak sooner rather than later

Malcolm XML posted:

How does the existing electronics in car ECUs deal with this

I.would.just copy them

modern car ecus don't do this at all. they have a hall or inductive sensor on the crankshaft and measure engine rotation directly, setting the spark timing and calculating RPM and such all in software. i'm retrofitting to a 30 year old motorcycle where the most advanced electronic device it came with is maybe the rectifier.

i don't know exactly how the stock tachometer works, but with what i understand now about the input pulse, i suspect that it's electromagnetic. there might be a decently sized capacitor inside that gets charged up by the spark pulses, and that capacitor drives an electromagnet that attracts one end of the indicator needle. more frequent pulses lead to a higher voltage on the internal cap and a stronger pull on the needle -- sort of a crude analog PWM.

it might be something else entirely (a more complicated analog circuit converting frequency to voltage) but i don't think there's anything digital. the gauge is definitely not driven with a stepper.

hifi
Jul 25, 2012

this one looks cool too

Sagebrush
Feb 26, 2012

ah yea, that one would be doable in a car too, with a dry clutch. in a motorcycle the "flywheel" (alternator rotor or primary drive gear, depending on your interpretation) is internal and bathed in oil so you couldn't really do optical sensing.

Sapozhnik
Jan 2, 2005

Nap Ghost
what sort of complete rear end in a top hat routes pin 1 on a programming header to +5V and not GND

hobbesmaster
Jan 28, 2008

one that wants to sell hardware

longview
Dec 25, 2006

heh.
in the schematic software pin 1 is on top so it looks neater to put a supply voltage there

for my own boards i always ground the last pin on SIL headers and put a ground symbol in the silk next to the pin

Bloody
Mar 3, 2013

i like to sprinkle lil grounded standalone 0.1" pins around my boards so there's always a convenient ground nearby for an oscilloscope probe with no risk of the dumb fat alligator clip shorting on anything

Woolwich Bagnet
Apr 27, 2003



Bloody posted:

i like to sprinkle lil grounded standalone 0.1" pins around my boards so there's always a convenient ground nearby for an oscilloscope probe with no risk of the dumb fat alligator clip shorting on anything

This is pro advice. I've burned out a few DC/DC converters because of this.

Sagebrush
Feb 26, 2012

I blew two fuses on my motorcycle in a row because of a scope probe ground clip shorting to the wire beside it :toot:

longview
Dec 25, 2006

heh.
even proer if you can be bothered to get out the 0.1" pin ground lead clip that comes with most pro scope probes

but then you can only get one probe per pin instead of a haphazard stack of alligator clips, just can't win

also helpful to put a 2 pin header to bridge split ground/isolated inputs

and to avoid making 1000 :10bux: mistakes, always put series resistors on voltage test headers. especially if there are multiple supplies on adjacent pins

Luigi Thirty
Apr 30, 2006

Emergency confection port.

my IIGS has no digital sound output. the ES5503 seems to be working but something's broken between it and the speaker. the legacy Apple II beeper works.

time to break out the schematics and see what's going on here

the sound circuit is on page 8, I can't see any of the discrete components on the board other than the op-amp ICs though?

Luigi Thirty fucked around with this message at 20:12 on May 14, 2017

longview
Dec 25, 2006

heh.
Have you checked the phone jack switch? The speaker out is switched through that so if it's corroded then it won't work.

spankmeister
Jun 15, 2008






Luigi Thirty posted:

my IIGS has no digital sound output. the ES5503 seems to be working but something's broken between it and the speaker. the legacy Apple II beeper works.

time to break out the schematics and see what's going on here

the sound circuit is on page 8, I can't see any of the discrete components on the board other than the op-amp ICs though?

Do the IIGS's use surface mount electrolytics? Have those in your machine been replaced? They have a tendency to go bad and leak in 80's vintage apple machines.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

longview posted:

Have you checked the phone jack switch? The speaker out is switched through that so if it's corroded then it won't work.

I get beeper noises through the speaker and my headphones, they're separate from the Ensoniq chip

spankmeister posted:

Do the IIGS's use surface mount electrolytics? Have those in your machine been replaced? They have a tendency to go bad and leak in 80's vintage apple machines.

the sound section has the electrolytic caps yeah. they're not leaking or bulging though

longview
Dec 25, 2006

heh.
ok not too familiar with old apples but looks like SPRK_H going into Q5 is the buzzer which rules out UK11 and UK10 as faulty.

check the output of the differential-single ended converter (J25:3 might be a good test point), then you'll have to follow the signal path

not too many electrolytics in the signal path other than the ones shared with the buzzer, signal path should be pretty simple to follow as long as you can find the op amps.

spankmeister
Jun 15, 2008






Luigi Thirty posted:

I get beeper noises through the speaker and my headphones, they're separate from the Ensoniq chip


the sound section has the electrolytic caps yeah. they're not leaking or bulging though

It's specifically SMD lytics that are the issue, and you won't see them bulge.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

longview posted:

ok not too familiar with old apples but looks like SPRK_H going into Q5 is the buzzer which rules out UK11 and UK10 as faulty.

check the output of the differential-single ended converter (J25:3 might be a good test point), then you'll have to follow the signal path

not too many electrolytics in the signal path other than the ones shared with the buzzer, signal path should be pretty simple to follow as long as you can find the op amps.

the board is pretty crowded but the op amps are down next to the sound IC in the corner. I'll see if I can figure out where the signal's dying cloud

Luigi Thirty
Apr 30, 2006

Emergency confection port.

oh dammit half the sound poo poo is under the front of the case, thanks crapple



i do get a signal on pin 3 of J25 when i have a sound file looping on the computer.

longview
Dec 25, 2006

heh.
looks like they stuffed all the passives on the bottom layer, wonder if they wave soldered the bottom layer (if so there's usually traces of red glue around all SMD components on that side).

based on recent experience my guess would be a cracked resistor

will need to find UL11 or get to the bottom layer to check that though. you've already ruled out all of the DAC + UL12 which is good.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I was hoping it would be as easy as fixing the mouse port on my A2000 (the USB adapter got jostled which shorted something and blew an axial fuse on the +5V line)

there aren't many photos of the back side of the motherboard online for some reason. i'll take it apart this week and see if I can spot anything burned out/broken/no continuity.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Luigi Thirty posted:

the sound section has the electrolytic caps yeah. they're not leaking or bulging though

doesn't mean they're not going bad

recap the world

movax
Aug 30, 2008

mostly out of idle curiosity, is there a public changelog from what changed between say ARM Cortex-A9 r3p0, r4p0 and r4p1?

movax
Aug 30, 2008

nevermind, i think i found it

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
in tyool 2017 my employer is going into production on a brand new product, designs started from scratch in 2015

what did they pick to drive their analog knobs, leds, and buttons? an attiny88 featuring:
- 512 bytes of ram
- SPI controller with no FIFO and a shared data register between transmit and receive
- no UART
- obsolete toolchain
- 8MHz clock speed
- two PWM channels (and the board has 4 user-facing LEDs)
- saves maybe 30 cents versus an equivalent m0, on a product that will cost several hundreds of dollars

also none of the LEDs are on either of the PWM pins

wish I had a hot tub time machine so I could go back and bunch that designer right in the dick

Poopernickel fucked around with this message at 13:25 on May 23, 2017

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Poopernickel posted:

no FIFO and a shared data register between transmit and receive

that's gotta be fun!

movax
Aug 30, 2008

Poopernickel posted:

in tyool 2017 my employer is going into production on a brand new product, designs started from scratch in 2015

what did they pick to drive their analog knobs, leds, and buttons? an attiny88 featuring:
- 512 bytes of ram
- SPI controller with no FIFO and a shared data register between transmit and receive
- no UART
- obsolete toolchain
- 8MHz clock speed
- two PWM channels (and the board has 4 user-facing LEDs)
- saves maybe 30 cents versus an equivalent m0, on a product that will cost several hundreds of dollars

also none of the LEDs are on either of the PWM pins

wish I had a hot tub time machine so I could go back and bunch that designer right in the dick

hahahahahaha

was this picked because someone prototyped with some kind of ~~maker~~ product?

also lol at saving 30 cents for something that isn't gonna (I assume) break 10K units -- how many hours is $3K saved?

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

movax posted:

hahahahahaha

was this picked because someone prototyped with some kind of ~~maker~~ product?

also lol at saving 30 cents for something that isn't gonna (I assume) break 10K units -- how many hours is $3K saved?

probably a safe bet on both

Sagebrush
Feb 26, 2012

i can't even think of a "maker" product that uses an attiny88. there are a few boards that adafruit sells that use the tiny85 in order to be really small, but the 88 is physically the same size as the atmega328 on a bog-standard arduino so you'd think they would have just gone with that if they were prototyping that way?

then you'd at least have 2k of ram and a UART

Sapozhnik
Jan 2, 2005

Nap Ghost

Poopernickel posted:

in tyool 2017 my employer is going into production on a brand new product, designs started from scratch in 2015

what did they pick to drive their analog knobs, leds, and buttons? an attiny88 featuring:
- 512 bytes of ram
- SPI controller with no FIFO and a shared data register between transmit and receive
- no UART
- obsolete toolchain
- 8MHz clock speed
- two PWM channels (and the board has 4 user-facing LEDs)
- saves maybe 30 cents versus an equivalent m0, on a product that will cost several hundreds of dollars

also none of the LEDs are on either of the PWM pins

wish I had a hot tub time machine so I could go back and bunch that designer right in the dick

greybeard hardware engineers are assholes

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Poopernickel posted:

in tyool 2017 my employer is going into production on a brand new product, designs started from scratch in 2015

what did they pick to drive their analog knobs, leds, and buttons? an attiny88 featuring:
- 512 bytes of ram
- SPI controller with no FIFO and a shared data register between transmit and receive
- no UART
- obsolete toolchain
- 8MHz clock speed
- two PWM channels (and the board has 4 user-facing LEDs)
- saves maybe 30 cents versus an equivalent m0, on a product that will cost several hundreds of dollars

also none of the LEDs are on either of the PWM pins

wish I had a hot tub time machine so I could go back and bunch that designer right in the dick

but it doesn't actually need any more than that, why back in my day...

Sagebrush
Feb 26, 2012

if they were true greybeards they'd be complaining that you weren't building your own oscillators for the PWM and doing the buttons with analog comparators

Bloody
Mar 3, 2013

theyre prob the sorta ee that mumbles "you need a microcontroller? here, we always use this one" and slap down a piece of trash that went eol a decade ago but digikey still has thousands

Bloody
Mar 3, 2013

see also: msp430 users

Sapozhnik
Jan 2, 2005

Nap Ghost
microcontrollers is chips with "not my problem" inside

hobbesmaster
Jan 28, 2008

Bloody posted:

see also: msp430 users

have you tried fram

Bloody
Mar 3, 2013

Sapozhnik posted:

microcontrollers is chips with "not my problem" inside

Bloody
Mar 3, 2013

hobbesmaster posted:

have you tried fram

nope and i also always forget the use case for it even though i think its come up in this thread like 3 times at least

hobbesmaster
Jan 28, 2008

it's ram you don't lose when going to the lowest power mode

and you don't burn through its rw cycles like flash

Adbot
ADBOT LOVES YOU

longview
Dec 25, 2006

heh.
i don't think my workplace can even blink a LED let alone PWM it without a $200+ FPGA

but then that's what happens when you have a ton of FPGA devs on staff

hobbesmaster posted:

have you tried fram

we use cypress I2C fram in a work project since it's got fast and infinite writes. good for storing things like circular log buffers.

  • Locked thread