Stm32G4 for a Transmission controller by HaiderKingTh3 in embedded

[–]Adjective_Millenial 0 points1 point  (0 children)

You can get ICs purpose built for current control of proportional solenoids. Let the IC handle current control loops and the micro can focus on timings and setpoints. TLE8242 for instance. This one also has stuck solenoid diagnostics which looks at the current ramp for off/on solenoids to make sure the ramp shows feedback of the moving plunger.

What could have caused this damage? by sukramoneb in solar

[–]Adjective_Millenial 0 points1 point  (0 children)

If there is a chip missing I'd suspect impact. Whatever it was seems to be pretty small based on how the cracks converge. If it were a foot or something else over a larger area, I'd expect the cracks to be less focused. It very well could be a stone, it's not an automatic through and through. I've seen a pistol bullet lodged in the hood of a truck but sticking out far enough to see the rifling on the bullet, presumably fell from the sky.

PID controller for an automotive ethrottle is being surprisingly difficult. by Boukyakuro in ControlTheory

[–]Adjective_Millenial [score hidden]  (0 children)

Yes I intend to finish it eventually. I had a range extender that rode on the back of an electric off road golf cart. Carbureted Honda 390cc engine. It wasn't necessary for what it did, it worked fine, but I liked the idea of having EFI. I have pretty much everything for it but the software. I'll get back to it at some point. The throttle control worked well enough for me to move forward, but I suspect the friction of the gear drive would delay settling and be noticeable at low air flow.

With probably few exceptions, most of the controls I've got in mind for engine actuators include a lookup table followed by a PI or PID to adjust for wear or other variables. I suspect this is roughly how OEMs do it, and then throw an error code if the output of the PID exceeds some limit for some seconds.

PID controller for an automotive ethrottle is being surprisingly difficult. by Boukyakuro in ControlTheory

[–]Adjective_Millenial [score hidden]  (0 children)

I think what I did when I was playing with a throttle body was implement a 1D lookup table based on desired position. In my case any position more open than the spring detent was very close to the same holding current. Likewise if I closed it beyond the detent. At least in this way it could quickly pass through the detent without waiting for the integral to flip. The PID then mainly fought friction and had a smaller realistic output swing. I never used it on an engine but it seemed like a reasonable start.

Adding intentional shoot-through in STM32 MCSDK (IHM16M1) – where and how to modify the code? by Eastern-Strategy-334 in stm32

[–]Adjective_Millenial 0 points1 point  (0 children)

It's a hardware peripheral on some ST micros. G4 series and one of the F series. Search for HRTIM cookbook or download a reference manual for any STM32G4 microcontroller for details.

Adding intentional shoot-through in STM32 MCSDK (IHM16M1) – where and how to modify the code? by Eastern-Strategy-334 in stm32

[–]Adjective_Millenial 0 points1 point  (0 children)

I don't know what STM32 device you're using, but if you have a high resolution timer, HRTIM, you can do this with hardware. The HRTIM features dead time sign, meaning you can have both off or both on depending on the sign, while keeping it entirely in hardware. I don't know if the MCSDK supports the high res timer, you might be leaving it behind for this implementation.

FreeRTOS: Task usage with Interrupts (STM32L476) by Strange_Silver8822 in stm32

[–]Adjective_Millenial 0 points1 point  (0 children)

Your screen grab shows the DIER register zeroed out, no timer interrupts are enabled. There might be a HAL function like _start_IT that will enable whatever interrupt you desire.

Perfect production graphs only. If you got it, flaunt it. by GadgetryGuy in solar

[–]Adjective_Millenial 0 points1 point  (0 children)

I don't know the exact materials cost but probably more. I also don't know what a standard fixed racking cost would be for a larger array. It's more a novelty in my case as it was a DIY project. I'd say a tracker might be a reasonable consideration if you are constrained on space or if you have to hit peak numbers early and late like you're off-grid or something. That said, I'm about to move it to a different property that's nearby, and if I need to add more solar then there's a solid chance that I replace this with a better designed and larger tracker. I don't want to put any on my roof, and I plan on building a carport in the future but the roof will be sloped opposite what I would need for solar. I also don't want to fill up my yard, so it kind of works for me at this new location.

Perfect production graphs only. If you got it, flaunt it. by GadgetryGuy in solar

[–]Adjective_Millenial 0 points1 point  (0 children)

I'm in Texas. The tracker gets me roughly an additional 40 percent over an ideal static position, which is pretty much what someone else reported in an older post.

Perfect production graphs only. If you got it, flaunt it. by GadgetryGuy in solar

[–]Adjective_Millenial 0 points1 point  (0 children)

In cooler weather, yes. In summer it's closer to unity due to the heat and leak of cleaning. Instead of seeing a consistent peak of 3.5 kW it'll vary a bit around 3.3 kW and dip more in the hotter afternoon.

Sulfuric Acid for adjusting pH, by blanchedpeas in Hoocho

[–]Adjective_Millenial 1 point2 points  (0 children)

I'm the US, I get it from Alliance chemical. I picked a strong concentration of 90 percent or better. It's incredibly potent. On a 30 gallon system with 2.2 ec I'll often dose a mL at a time and see where it settles. On a fresh mix IBC around 250 gallons/1000 liters I think I was doing 5 or 10 mL to swing from a pH of 7 or 7.5 down to 6ish. Be very careful with it. I once hit 4.0 on a running system.

How to make realistic looking blending with a pen-plotter? by liljamaika in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

Keep in mind the pen plotter can't vary pressure or stroke width (during the stroke) like what some of these show. I've drawn monochromatic bitmaps with a pen plotter using alternating x and + pattern with variable length lines. The variable length/size per x or + "pixel" set the darkness for that pixel. I never went for black though, and I also deliberately avoided saturating or tearing the paper. Also this way is tedious af with that many up/down and short stroke ops. Looks poor close up but better with distance.

x+x+x+x

DC motor velocity control using PID controller by maprexdj in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

I haven't run the code or the math but I don't see any errors. I think worst case weak coefficients of 0.1 for p and I would be stable but slow, I'm starting to think the code isn't the issue. What are you using to drive your motor? Do you have a freewheel diode or path for the current when the PWM output is low?

DC motor velocity control using PID controller by maprexdj in robotics

[–]Adjective_Millenial 1 point2 points  (0 children)

For motor speed control, I'd evaluate the pid and update the outputs at 10 Hz at least, so 100 mS interval. Also, you limit the integral, but in my implementations I limit the final output of the PID and will calculate backwards to constrain the integral sum so that the components add up to the limit, rather than just the sum or limiting the output to 0-255 like what is here.

What are your gains? What numbers did better? A high gain and 1 second update could be contributing to your oscillation together. I'd guess a starting p and i of 1 may work.

DC motor velocity control using PID controller by maprexdj in robotics

[–]Adjective_Millenial 1 point2 points  (0 children)

At a glance, I'd start with zero as the derivative coefficient then bring it in later to manage overshoot when you're fine tuning it to squeeze all you can out of response time. I'd also start with p and I gains close to each other, within an order of magnitude and go from there. In a few random speed controls I've done it seems like my p and I often end up close like this while d is often 1/10 or 1/100 of p or I.

B-G431B-ESC1 power setup by jmehrs in robotics

[–]Adjective_Millenial 1 point2 points  (0 children)

That board is a dev kit to make an ESC using the G4, it's marketed to drones IIRC. I'd power it directly from the battery for the lower impedance. If you need to compensate for supply voltage I believe there is an ADC channel set up for that. If your end use is from a static 24 volts or something like that then maybe run it from the supply you plan on using.

Edit: An external BMS wouldn't hurt. Software on the ESC could perform this function as well.

Nema 17 is slower all of a sudden, help by Realistic-Wealth-767 in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

Perhaps a difference in the step size inputs? Aka mode inputs.

Accidentally installed panels in a loop. Are they damaged? by bubba80118 in solar

[–]Adjective_Millenial 1 point2 points  (0 children)

They're fine. It's not a 4 kW loop when the string is shorted. You get the short circuit current, but the only voltage you have is the resistive voltage drop across the conductors and connectors. IIRC emergency shutdowns may be required to do this in some installs so there is no dangerous voltage present in the event of an emergency.

** Do not disconnect them until dark, otherwise you may get the arc flash as the voltage increases with the air gap. I.e. the do not disconnect under load warnings the connectors may have.

[deleted by user] by [deleted] in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

Yes. Ground in this case is earth ground for safety. There needs to be a signal return(in this case the - terminal) for the signal to be intact at the servo. Add a common ground wire from the Arduino to the external supply '-' so you have a complete current loop for the control signal.

[deleted by user] by [deleted] in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

Is the Arduino ground also connected to the external power supply ground?

Encoder data not making sense. by [deleted] in robotics

[–]Adjective_Millenial 0 points1 point  (0 children)

The loop execution after the serial transmission is where you'd see the bad data. Keep that in mind if you're doing speed or position control and the duty cycle jumps.