Open queenidog opened 3 days ago
Thanks for your question.
What does the sketch hc4067_performance do?
It gives an indication of the time used by a call to setChannel() function.
It measures the time when setchannel changes the channel and when it is called without changing the channel.
The code is straightforward. Numbers are either channels or microseconds.
The reason I’m interested is that I’m having some issues with a 4067 reading 16 signals from linear Hall sensors. The readings from the A/D (shown on monitor screen) from the NANO are all over the place, even with no magnets present. Yet the voltage from each sensor, measured going into the mux, is steady as a rock). So the mux appears to not be properly capturing the data, or it’s the A/D in the Nano. More testing is required (I’ll eliminate the mux and take single readings), but the mux is highly suspect. Noise is not an issue, nor are stray magnetic fields.
So it’s a case of good data in, garbage data out.
From: Rob Tillaart @.> Sent: November 10, 2024 3:39 PM To: RobTillaart/HC4067 @.> Cc: queenidog @.>; Author @.> Subject: Re: [RobTillaart/HC4067] what does sketch do? (Issue #9)
Thanks for your question.
What does the sketch hc4067_performance do?
It gives an indication of the time used by a call to setChannel() function.
It measures the time when setchannel changes the channel and when it is called without changing the channel.
The code is straightforward. Numbers are either channels or microseconds.
— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HC4067/issues/9#issuecomment-2466865393 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX2FNMCZUO7M4LWTR3CXULZ76Y47AVCNFSM6AAAAABRQPKNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWHA3DKMZZGM . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ADX2FNNIRXRVDEI3SP255WDZ76Y47A5CNFSM6AAAAABRQPKNGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUTBFQPC.gif Message ID: @. @.> >
What voltages do you see / use? Have you checked the datasheet if these are within operational range?
I had 6.5 volts on the Hall sensors but this was too much for the mux which is rated at 6 volts. (The sensors have a bigger range than the mux). Knocking it down to 6 volts on the sensors made a quite significant change. Other changes I made (using concentrators on the magnets) were not needed anymore to get good values.
I have 5x16 unit sensor boards and two types of magnet orientation (north and south poles) to test before I am “home free”.
Thanks for your reply.
From: Rob Tillaart @.> Sent: November 11, 2024 11:33 AM To: RobTillaart/HC4067 @.> Cc: queenidog @.>; Author @.> Subject: Re: [RobTillaart/HC4067] what does sketch do? (Issue #9)
What voltages do you see / use? Have you checked the datasheet if these are within operational range?
— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HC4067/issues/9#issuecomment-2468452776 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX2FNPPKAAYBL6I5YA3G3D2ADEZBAVCNFSM6AAAAABRQPKNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGQ2TENZXGY . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ADX2FNOWY2EDY5X7WL6MTST2ADEZBA5CNFSM6AAAAABRQPKNGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUTEGM2Q.gif Message ID: @. @.> >
@queenidog So the problem is solved?
It might be. Good results on board #1, 4 more to test. Also waiting for some different magnets and gauss meter to test them, to try and get the values as close as possible.
I’ll let you know, if you wish.
Bob
Indian Harbour, NS
Canada
From: Rob Tillaart @.> Sent: November 11, 2024 4:26 PM To: RobTillaart/HC4067 @.> Cc: queenidog @.>; Mention @.> Subject: Re: [RobTillaart/HC4067] what does sketch do? (Issue #9)
@queenidog https://github.com/queenidog So the problem is solved?
— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HC4067/issues/9#issuecomment-2468965925 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX2FNNNTCMTEYENGNEN7FD2AEHG7AVCNFSM6AAAAABRQPKNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYHE3DKOJSGU . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ADX2FNNNYHAGCGBLCS7ZPF32AEHG7A5CNFSM6AAAAABRQPKNGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUTFFXCK.gif Message ID: @. @.> >
Yes, please let me know, as it might also help other people finding this topic.
Okay, all testing done of my 5x16 position Hall sensor boards.
I had been fighting with this for some time, getting spurious readings that made no sense. I’m using AH49E analog Hall sensors with a CD4067 multiplexer, and Arduino Nano. The boards are custom made by myself.
Specs for the Hall sensors was max 8V, with recommended 6.5 volts. Knowing that more voltage would make the sensors more sensitive, I chose 6.5 volts, feeding them from a separate power supply. The mux is rated at 7 volts absolute max with 6 volts typical. I SHOULD have been okay, but as soon as I dropped the voltage on the Hall sensors to 6 Volts, all my values came into line. Even when I only had 6.1 volt on the sensors, it was too much.
I have North pole magnets that drive the voltage down, and South pole magnets drive the voltage higher. I was looking for a big differential so I could determine what magnet (N or S) was over a sensor. Before the “fix”, the numbers would be all over the place (see left screenprint below) , but now they are steady (right screenprint).
So…bottom line, reducing sensor voltage to 6.0 volts from 6.5, (which was still on “spec”) and keeping all the rest the same, I went from spurious incomprehensible data to clear data. I chased this for quite awhile because I had no idea what the Gauss value was of my magnets. . I used different muxes, different Nanos, worked on decoupling, reducing noise, changing delays in the program. Any slight variation in the good data output is due likely to mismatched magnets and/or off-axis positioning, but I can handle that.
Oh…the program I had been using was storing the values in an array, then printing the array out. The new data is from “real-time”, no data storage, values. For the array program I was reading the values anywhere from once in each loop to 10 times in each loop. Didn’t help.
These values for North pole magnets are INCORRECT These values for the same pieces are CORRECT
Top board with white chess pieces, magnets are south pole Board at botoom shows the
Hall sensors.
Cheers,
Bob Found
From: Rob Tillaart @.> Sent: November 11, 2024 10:47 PM To: RobTillaart/HC4067 @.> Cc: queenidog @.>; Mention @.> Subject: Re: [RobTillaart/HC4067] what does sketch do? (Issue #9)
Yes, please let me know, as it might also help other people finding this topic.
— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HC4067/issues/9#issuecomment-2469482037 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX2FNLV3MMXI4Y4OZZBNQL2AFT35AVCNFSM6AAAAABRQPKNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRZGQ4DEMBTG4 . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ADX2FNPBRKEMHZCDAN4VVT32AFT35A5CNFSM6AAAAABRQPKNGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUTGFHDK.gif Message ID: @. @.> >
Thanks for this informative feedback, appreciated
The screen prints are missing in your post, is it possible to post them again?
Here they are. First print is bad data from 6.5 volt P/S on sensors, second (lower more consistent voltages) are with 6.0 volt on sensors. Bottom photo is setup. If these photos don’t appear, I can make them as file attachments instead of putting in text.
From: Rob Tillaart @.> Sent: November 14, 2024 5:30 AM To: RobTillaart/HC4067 @.> Cc: queenidog @.>; Mention @.> Subject: Re: [RobTillaart/HC4067] what does sketch do? (Issue #9)
The screen prints are missing in your post, is it possible to post them again?
— Reply to this email directly, view it on GitHub https://github.com/RobTillaart/HC4067/issues/9#issuecomment-2475834804 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADX2FNIMN2ZA6UEGHND72GL2ARURRAVCNFSM6AAAAABRQPKNGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVHAZTIOBQGQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ADX2FNMXEWNS7NM6DCGNHYL2ARURRA5CNFSM6AAAAABRQPKNGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUTSI63I.gif Message ID: @. @.> >
If these photos don’t appear, I can make them as file attachments instead of putting in text.
no images look with your browser to - https://github.com/RobTillaart/HC4067/issues/9
Please attach them.
What does the sketch hc4067_performance do? What's the objective? You don't state it and there are no comments in the sketch at all. I ran it and get numbers from 16 to 32. What are they? In the sketch it says to set channel (10) but in the monitor display shows SetChannel 4. So what is going on? Please explain. Sketch MAY be useful if I know what it does.