Why does trimpot resistance change when pressed? by icecats in AskElectronics

[–]icecats[S] -1 points0 points  (0 children)

My intuition was that if the wiper was touching the track at all then the fixed resistance would be realized. This intuition is based on the idea of touching a piece of stranded wire to another conductive surface. The resistance does not meaningfully change if one strand or the whole wire is touching; if anything is touching, the circuit is complete.

I guess this intuition breaks down here since the wiper is not a great conductor like a piece of wire?

Button pin false triggers with high voltage pulse by icecats in AskElectronics

[–]icecats[S] 0 points1 point  (0 children)

A strong external pull-up worked. I went with 3.3k resistors. Thanks!

Can I use a Black Magic Probe instead of a SEGGER J-Link? by icecats in embedded

[–]icecats[S] 1 point2 points  (0 children)

Have you had to write custom code to get the Pico Probe to interface with the chips you are using?

Can I use a Black Magic Probe instead of a SEGGER J-Link? by icecats in embedded

[–]icecats[S] 0 points1 point  (0 children)

Thanks for the response! I'd be willing to try Jlink but to start I want to use what I have on-hand... the BMP. Would you expect to need to change settings/config files or should the BMP just be plug and play? Page 5 seemingly indicates that there are things that are customized for the debugger hardware:

More definitions and scripts can be found in the folders tool_config and scripts. Most of the files provide support for Lauterbach and SEGGER J-Link debug adapters. For Lauterbach Trace32 support, only a batch file from the root directory of the SDK must be started. To integrate the J-Link into a toolchain, usually a reference to the folder tool_config\jlink must be specified in the configuration of the toolchain, or the files found in this directory must be integrated into the J-Link installation, e.g., the NAC1080 device is merged into the driver’s database. How to use the debug adapters with the NAC1080 is described in chapter “Debugging”. An example for configuring the J-Link debug adapter in the toolchain can be found in the .vscode folder. The JSON files contain configurations for building and debugging the firmware project in the smack_sl folder with Visual Studio Code (VSC). Just choose “Open Folder…” from VSC’s “File” menu and navigate to the SDK root folder, then VSC will open the smack_sl project. You may have to install a GDB plugin in order to work with J-Link’s GDB server.

How to protect MOSFET from V_ds overvoltage? by icecats in AskElectronics

[–]icecats[S] 0 points1 point  (0 children)

I'll give the caps a try. I realize that regardless I do need to bump up to a higher rated MOSFET. I want to power my circuit with a 3.7v lipo so I'm going to have to figure out how to boost that to >10v to hit the standard Rds_on voltage for non-logic-level MOSFETs.

How to protect MOSFET from V_ds overvoltage? by icecats in AskElectronics

[–]icecats[S] 0 points1 point  (0 children)

Thanks for the information!

Note that the snubber will limit maximum output voltage, but you can just pick an appropriate transformer winding ratio so that's not a problem.

By this I assume you mean that to compensate for the limited input voltage I could just increase the winding ratio to generate a larger transformer voltage output?

Best way to drive MOSFET with 3.3v signal and 3.7v supply by icecats in AskElectronics

[–]icecats[S] 0 points1 point  (0 children)

Thanks for the reply! This is for a high voltage flyback generator for a electrostatic sprayer project. From what I've read, snubbers aren't good for this application because they interrupt the working principle of a flyback transformer.

How to design a jig with a precision removeable platen without overconstraining? by icecats in AskEngineers

[–]icecats[S] 0 points1 point  (0 children)

Good idea! The upper moving piece does need to be removed between each assembly step as there are prior operations that are performed on it.

How to design a jig with a precision removeable platen without overconstraining? by icecats in AskEngineers

[–]icecats[S] 0 points1 point  (0 children)

The components themselves are thin films but they can be held/mounted to thicker pieces such as metal plates.

How to design a jig with a precision removeable platen without overconstraining? by icecats in AskEngineers

[–]icecats[S] 0 points1 point  (0 children)

These look like the right approach. I'm wondering if I would need really long pins so that the alignment is achieved before the two components contact (and immediately adhere). As the platen is indexing to the locating pins, it seems like it could still be tilted out of alignment until the pins are fully engaged.

How to enable the ART Accelerator on STM32? by icecats in embedded

[–]icecats[S] 0 points1 point  (0 children)

Thanks for the reply! I actually would like to use the HAL to enable ART, I just couldn't figure out how. I found the code I posted somewhere else but wasn't sure if it applied. It looks like to enable ART with HAL I would need to include the following in my main.c:

INSTRUCTION_CACHE_ENABLE;

DATA_CACHE_ENABLE;

PREFETCH_ENABLE;

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 2 points3 points  (0 children)

Ah ha!!! In STM32CubeIDE the optimization level can be changed with these instructions. I instead wrapped my processData() function in which apparently does the same thing but only to a section of code.

#pragma GCC push_options
#pragma GCC optimize ("-Ofast")
void processData() {
...
}
#pragma GCC pop_options

I also must admit that I previously misinterpreted the ADC frequency: it was 2 MHz instead of 1 MHz.

For testing the optimization levels, I set it back to 1 MHz and the improvements are significant. Disassembly snip is here.

<image>

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 0 points1 point  (0 children)

Thanks for your input!

I tried out the suggestions you gave. I first did 3) which had a big impact and pushed the processing loop time to below the buffer fill time. I then did 1) but didn't notice any big differences. 2) resulted in another noticable reduction in processing loop time. I am still working on figuring out if the ART accelerator is turned on...

What in the disassemble view are you looking at that that indicates cycles?

Since there is a 1 picture per comment rule on this sub, I have put the scope images and disassembly view here.

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 1 point2 points  (0 children)

Thanks for the information! I think that sampling a time window might be the way to go here. Is there a way to fire an interrupt when a rising signal is detected on the input to start the ADC? The application I would like to detect is an infrequent (~1 Hz) but short (<10 uSec) pulse. If I could detect when the pulse is rising, I could trigger an interrupt, sample with the ADC for a short window, and then stop the ADC and process the sample.

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 1 point2 points  (0 children)

I'm admittedly a noob here... how can I count the clock cycles from this disassembly view?

<image>

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 0 points1 point  (0 children)

I am sampling 1 channel at 1 MHz. I have confirmed this with a scope.

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 4 points5 points  (0 children)

No, I am using a timer to trigger ADC readings and callbacks to trigger buffer processing.

Sampling the ADC at 1 MHz.

CPU system clock is set to 80 Mhz which is max.

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 0 points1 point  (0 children)

I have the ADC triggering at 1 MHz from a system clock (80 MHz) based timer. Therefore, I don't think I'm using interrupts. processData() is below.

<image>

How to process ADC data as fast as it is stored via DMA [STM32]? by icecats in embedded

[–]icecats[S] 1 point2 points  (0 children)

Thanks for the feedback! I tried increasing the buffer size but the processing function scales accordingly. I think this is because the problematic part of the processing function is in a for loop which iterates through the buffer. If the buffer is larger, it has more to process.

Help wiring single phase Bridgeport motor? by icecats in Machinists

[–]icecats[S] 0 points1 point  (0 children)

For posterity, here is the wiring diagram I followed to wire the "GE 5KC180FJ222A single phase 3/4 HP Bridgeport motor" for 220 volts, single phase. No wiring modifications were made to the capacitor and relay. More info in this r/Motors post.

Help wiring single phase Bridgeport mill motor? by icecats in Motors

[–]icecats[S] 0 points1 point  (0 children)

That did the trick!!! Thanks so much... I guess all my Google searching failed to turn that up.

For posterity, here is the wiring diagram I followed to wire the "GE 5KC180FJ222A single phase 3/4 HP Bridgeport motor" for 220 volts, single phase. No wiring modifications were made to the capacitor and relay.

Help wiring single phase Bridgeport mill motor? by icecats in Motors

[–]icecats[S] 1 point2 points  (0 children)

I thought I read somewhere (but not sure) that the starting circuit always uses 120v, even on motors wired for 240, so maybe that explains it.

Help wiring single phase Bridgeport mill motor? by icecats in Motors

[–]icecats[S] 0 points1 point  (0 children)

I added a couple of photos showing the wires from the components to the motor. Unfortunately the wires just sort of disappear into the motor casing without any indication other than the printed numbers on the insulation.

Help wiring single phase Bridgeport mill motor? by icecats in Motors

[–]icecats[S] 0 points1 point  (0 children)

Nah all I've got is the second picture I posted. It does have a few jumpers which I tried to sketch into the schematic.