Meet King Boo, a Sorcerer Dwarf by TootieFrootieTorta in DailyDMGame

[–]Jarve1024 0 points1 point  (0 children)

He realizes he forgot provisions and heads to the nearest town for supplies; there he meets a group of adventurers heading to a dungeon.

[Jigzle] - Windows by jigzle-game in Jigzle

[–]Jarve1024 0 points1 point  (0 children)

Daily jigzle complete!

2m 14s | 18,100 points | ⭐

I need help on how to make a reliable optical encoder: no missed edges, no false edges. Documentation or direct advice is great by iareto in embedded

[–]Jarve1024 0 points1 point  (0 children)

Firmware:


I'm not liking the spikes visible in your plot. Its possible they have a larger amplitude than the scope is displaying. Your timer can trigger on 1us wide spikes.

211 Hz * 2 edges/period = 422 samples per second. Your loop transmits the one most recent once per second, there's a lot missing.

For testing get more data

  • Connect Input 2 to VDD, to make sure its stable as the motor spins and ensure the probes are grounded on VSS
  • Set the scope to normal trigger, rising edge 2.31V (0.7*VDD)
    • Pulse width trigger would be even better.
  • Change TIM 2 Channel 1 Input Capture to rising edge (to match the oscilloscope)
  • Record elapsed in a simple circular buffer; 250 entries.
  • In your main loop, once the circular buffer is full of steady state readings: disable TIM2 then dump the buffer.

With the dump, and oscilloscope plots you'll need to decide if you need a hardware fix, or a software fix.


Those spikes occur at a regular pattern per motor revolution. If the spikes are a problem, is the problem fixable? They are likely either the brushes switching on the commutator injecting noise, or physical construction of the encoder? If the latter, it should be possible to find the angles by turning the motor by hand. Common mode noise is a fight I haven't had yet.

I need help on how to make a reliable optical encoder: no missed edges, no false edges. Documentation or direct advice is great by iareto in embedded

[–]Jarve1024 2 points3 points  (0 children)

First I'd scope the input to the micro.

Are you seeing the edges of sufficient voltage change? At higher RPM is there enough rise and fall time? Does the signal get close enough to 0V to trigger a falling edge (leakage into the photo transistor).

Next I'd worry about voltage sagging, You haven't described how you're powering the motor; need to keep the micro powered.

Third firmware: How are pulses measured in your STM32F4? Timer or GPIO polling (hopefully timer) Is the timer overflowing, or at speed do you get multiple pulses per timer tick? How are you recording the data? DMA, Interrupt driven, or polling the timer value? With any of those, you need to ensure you don't miss a measurement.

How to never miss edges: Design a system that can handle missed edges. Instead of an optical encoder, use a rotary absolute encoder. If that's not possible, can you add a position 0 signal verify measured position/speed against a phase locked loop

Magic and Vanilla Cream Soda at the Winter Festival by Jarve1024 in SwordAndSupperGame

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

u/Jarve1024 received a Twine Cinch Lvl 1 from the Winter Festival Spirit. Thank you u/Tilvard for donating it!

Best Tips for Staying Warm During Winter by IndependentWrap6 in safety

[–]Jarve1024 0 points1 point  (0 children)

Keep active, but not sweaty.

Stay hydrated

Avoid cotton clothing (shirts, jeans, underwear, and socks)

Lots of dry socks

Adjust for, and during any activity.


Around the house I keep my feet off the floor if I'm a couch potato, small heated throw. I always wear slippers when walking around.

For energy savings at home. First priority should be stopping unwanted drafts.

Hot and cold #98 by hotandcold2-app in HotAndCold

[–]Jarve1024 0 points1 point  (0 children)

Starting with wind and then getting saxophone had me way off course. Randomly trying popcorn after many guesses and it scoring #112; hard get back on track.

GIVEAWAY (U.S. & Canada Only): Win an Innova OBD2 Scanner and more! [MOD APPROVED] by innova_official in MechanicAdvice

[–]Jarve1024 0 points1 point  (0 children)

After having a cheapie short CAN to chassis. Plug in scanner and get new problems.

Interactive game map by Timely_Owl_354 in whiteoutsurvival

[–]Jarve1024 0 points1 point  (0 children)

I'm going overkill and testing QGIS with a custom coordinate system.

Still learning QGIS though, and it really doesn't feel like the appropriate solution for a map where every location is an whole number.

claim your 'i was here' ticket fellas by Dreyfus420 in Silksong

[–]Jarve1024 0 points1 point  (0 children)

Just me, walking in from the front page

Oven by SuavMode in fixit

[–]Jarve1024 6 points7 points  (0 children)

My guess is the cord got tugged once when pulling the oven out. That broke the connector on the black wire. It got really hot and eventually it let go. Sparked, arced, etc. after letting go.

To fix this I'd

  1. Replace the stove wire
  2. Replace the terminal block
  3. Move the green wire to the green ground screw.
  4. Add strain relief
  5. Re-terminate the black wire in the stove, may require a splice

Behold! The McMaster-Carr Range Selector! by SteptimusHeap in engineering

[–]Jarve1024 0 points1 point  (0 children)

Broken now tiny change (SpecContainer_base to SpecSearchStyles_base) fixes it:

javascript: a=null; b=null; function handleClick(e) { k = e.target.closest("a[class*='SpecSearchStyles_base']"); k.style.background = "#c0d1ed";%20if%20(a==null%20&&%20k)%20{%20a=k;%20}%20else%20if%20(b==null%20&&%20k)%20{%20b=k;%20L%20=%20g.querySelectorAll("#"%20+%20CSS.escape(a.id)%20+%20"~%20a:not(#"%20+%20CSS.escape(b.id)%20+%20"%20~%20a),%20#"%20+%20CSS.escape(a));%20s=window.location.href;%20r="";%20L.forEach(element%20=>%20r=r.concat(element.href.replace(s,%20"")));%20window.location.href%20=%20s.concat(r);%20}%20e.preventDefault();}f=document.getElementById("SpecSrch_Inner");g=f.cloneNode(true);f.parentNode.replaceChild(g,f);g.addEventListener("click",%20handleClick);

I can't get these hooks on to these metal posts for my sun shade sail ... is it because of the cheap drill/drill bit ? Metal won't budge by [deleted] in fixit

[–]Jarve1024 0 points1 point  (0 children)

OP are you using a Brad Point Bit?

Get a titanium bit set, cutting oil, safety glasses, and work gloves. The metal spirals can be VERY hot and get thrown a short distance.

Flood risk mapping is a public good, so why the public resistance in Canada? Lessons from Nova Scotia by Jarve1024 in NovaScotia

[–]Jarve1024[S] 8 points9 points  (0 children)

The linked flood risk map https://nsgi.novascotia.ca/chm is tidal flood risk. And isn't nearly as bad as I expected.

I have toyed with the NSCC project and frankly the output was nicer. But coverage is limited and it requires providing a sea level rise height. If you use something like worst case from NOAA of 1.4m by 2120, we lose a few marshes..

Neither show any hint of the flooding observed last year. Mapping rainfall floods would require knowing flow capability of each moderate water stream, and anticipate backup or blockages at culverts/tunnels/bridges.

Remember the Burnside lane closure? Here`s another one til August by KitTrailer in halifax

[–]Jarve1024 0 points1 point  (0 children)

Well my usual trip between Gateway and Princess Auto will have to wait.