Author Topic: Why Arduino users so agressive?  (Read 11702 times)

0 Members and 1 Guest are viewing this topic.

Offline ogden

  • Super Contributor
  • ***
  • Posts: 2667
  • Country: lv
Re: Why Arduino users so agressive?
« Reply #175 on: August 23, 2019, 10:02:10 pm »
Langwadt covered the output side; he covered the input side. Both directions covered
His initial explanation did not cover input. I was first to mention 5V-tolerant I/O's. For those (Arduino users/preachers) who do not know that most IO's of that stm32 MCU are 5V-tolerant, telling that 3.3V->5V (output direction) logic level compatibility is all what's needed to connect 3.3V IC to 5V bidirectional bus is outright wrong. Is this clear now? Can we end this? Now? :=\
« Last Edit: August 23, 2019, 10:05:21 pm by ogden »
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 3615
  • Country: us
Re: Why Arduino users so agressive?
« Reply #176 on: August 23, 2019, 10:10:59 pm »
Oh ok. Your previous post confused me.

A simple "ok, thanks" to Langwadt's post would have been more clear to me. Personally, I just assumed the micro was 5V tolerant and that he and Techman knew that. But yeah, that could be a problem.

Anyhow Langwadt was not incorrect/incomplete in his first post. The quote he refuted/corrected was the claim you could not DRIVE a GPIB bus from STM32.
« Last Edit: August 23, 2019, 10:22:39 pm by KL27x »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 1833
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #177 on: August 23, 2019, 10:51:24 pm »
For my simple experiment, all I want to do is get two signals generated and then prove that I can shift the phase of one with respect to the other.

To synchronize several chips you need to take them out of reset synchronously which requires to send an SPI command to all the chips being reset at the same time (wouldn't it be better to select a DDS with a reset pin?). So, they must be on the same SPI bus with different chip select pins. To figure that out you would need to read the datasheet. The library wouldn't help you with that, would it? Thus, you would have to read the datasheet anyway. After you have read it, you already know how to deal with the device (which is very simple BTW). So, you're ready to go. Few lines of code and you're done. Instead, you suggest:

- figure out how to use the library
- bring 363 lines of mostly useless code into your project (risking bugs and/or restrictions)

Doesn't seem like something helpful. Rather, a lot of extra work which could have been avoided and unwarranted bloat.

 
The following users thanked this post: newbrain

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 6618
  • Country: us
Re: Why Arduino users so agressive?
« Reply #178 on: August 23, 2019, 11:48:38 pm »
To synchronize digitally seems problematic for the chip.  However, zero crossings could be measured and a digital solution would apply the necessary corrections.  This is a lot of work

One solution is to generate just one 400 Hz signal and use analog phase shifting to get the 3 phases (if, and when, it is determined that there even needs to be phase shifting).  There would need to be some output op amps (adjustable but fixed gain) to restore the voltage level before the signal goes into the analog multiplier to modulate the voltage followed by some kind of driver circuit to drive the transformers required to step the voltage up to around 100V.  The analog end is pretty straightforward.  Three DACs forming one input of each multiplier.  The flight simulator provides the x,y and z angles, the Arduino eats the data and sets up the 3 amplitude DACs, the AD9833 is set just once without regard to phase angle, analog takes over.

In some cases, analog is a better way to go.

The AD9833 library works as near as I can tell without having the actual boards.  They will be here Sunday.


 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 2667
  • Country: lv
Re: Why Arduino users so agressive?
« Reply #179 on: August 24, 2019, 12:25:42 am »
To synchronize digitally seems problematic for the chip.

AD9833 is simplest DDS you can get (from AD), with all the consequences. AD9832 is what you would want to use in multi-channel operation, those have phase register selection pins.
 

Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #180 on: August 24, 2019, 12:31:56 am »
If I had your outlook, I'd say "I'm a slave to oxygen, if I can't get enough I'll die" or "I'm a slave to water" or "I'm a slave to gravity" . I just don't bother with any of these thoughts.

You never know the value of water until the well is dry.

I'm an Australian and in many places in our country one is a few days away from death if the water runs out, but we don't let it worry us, we take water with us, and if we screw up we die.

Such is life.

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 1833
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #181 on: August 24, 2019, 12:37:29 am »
To synchronize digitally seems problematic for the chip.  However, zero crossings could be measured and a digital solution would apply the necessary corrections.  This is a lot of work.

What's wrong with releasing all the chips from reset by the same SPI command sent simultaneously to all the chips?
 

Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #182 on: August 24, 2019, 12:41:08 am »
Excellent tenets to live by !

Do you plan to start following them any time soon ?
Not quite the clever response I was hoping for but I was probably expecting too much. Start following them and you may even find an employer willing to suffer you again!

I try my best, but some people are never satisfied.

At age 65 I hardly need a new employer, but if the thought helps you to feel good about yourself, fantasize away.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 6618
  • Country: us
Re: Why Arduino users so agressive?
« Reply #183 on: August 24, 2019, 12:44:54 am »
To synchronize digitally seems problematic for the chip.  However, zero crossings could be measured and a digital solution would apply the necessary corrections.  This is a lot of work.

What's wrong with releasing all the chips from reset by the same SPI command sent simultaneously to all the chips?

Absolutely nothing wrong with that approach, once it is known to work.  It should work (plus or minus a clock or two).  That seems to be suggested in the datasheet and mentioned in the library comments.  I was going to try it with just two boards mostly because that is all they had.  There were others I could have chosen.

If the reset approach works, the analog end of this project gets a lot simpler.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 6618
  • Country: us
Re: Why Arduino users so agressive?
« Reply #184 on: August 24, 2019, 12:56:17 am »
To synchronize digitally seems problematic for the chip.

AD9833 is simplest DDS you can get (from AD), with all the consequences. AD9832 is what you would want to use in multi-channel operation, those have phase register selection pins./
Thanks for that!  I'll take a look at the datasheet.

I don't see a low dollar demo board, the kit from AD comes to over $150 (2 boards).  I'm not that curious...

If this were a real project, I would just build a board but, again, if I can't do it in 5 wires and a single statement change in an Arduino program (to change from 1000 Hz to 400 Hz), I'm not going to mess with it.

 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 1833
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #185 on: August 24, 2019, 01:05:19 am »
It should work (plus or minus a clock or two).

Data sheet says it goes out of reset in 7 or 8 MCLK clocks after the SPI command, so should be within one clock. It all depends on the relationship between MCLK and SPI clock. If you manage to synchronize MCLK and SPI clocks, you should be able to be clock accurate. 25 MHz for MCLK means 40 ns period, so small delays should be negligible.

The best way to synchronize the clocks is to simply clock the MCU with the same MCLK clock. Now you only need to make sure that the MCU you use can be clocked with an external 25 MHz clock. And then you can get everything synchronized to the same clock edge of MCLK.

 

Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #186 on: August 24, 2019, 01:14:31 am »
Quote
I will use anything which best fit my requirements.
This is something I have heard repeated many times. But it is not very practical. Most people will gravitate towards a tool that is already in the toolbox. If you are going to do the programming, yourself, you start with what you know. It is not like sorting through a list of specs and choosing the cheapest one that meets parameters, then buying it, designing the PCB, and then just figuring out how to program the micro as an afterthought. You might do that sort of search, but then you'll compare it to what you already know.

You also consider time/work to use it. Until you cross a certain threshhold of cost/inconvenience, you might continue using what you already have available, regarding knowledge. I use some PIC that cost more than STM32 (or TI device, or Renesas, or...) in volume, and where the cheaper device should work absolutely fine. I'm sure you do, too. You still avoid answering this question.

Some people are still hoarding logic chips, because that's what they know. Why don't they just use FPGA and/or microcontrollers? (Yeh, I know they can occasionally be quite handy when fixing or modifying stuff; so a raaco drawer filled with every variety can be useful, sure. Live and let live).

Microcontrollers are by their very nature a multitool. You don't need to use the exact best one for every use. You can drive a variety of different screws with any one of them.

I flatten an occasional board with a hand plane. It's not cuz I don't know jointers and power planers exist. It's not cuz I like the workout. It's because I don't do very much of this, and this is just one part of a much bigger process of "making stuff," which requires a lot of other tools and space. If I needed to do a lot of this task, I might buy a jointer and a power planer. AFTER acquiring these tools, even if I have just one board to flatten a year, I would do it the easy way. In the same way, Techman will probably use an STM32 for many things I would do with a PIC. If and when I ever learned how to use an STM32, I would do the same. You call it lazy, if you want. Everyone does it. You do too.

You took the words right out of my fingers!

I also have heard the same mantra "I will use anything which best fit my requirements" thousands of times, and it's true for all of us in different ways.

If a hammer is all that someone has in their toolbox, then it's a hammer which "best fits their requirements".

Another classic ...  they keep rolling of your fingers ! "Microcontrollers are by their very nature a multitool. You don't need to use the exact best one for every use. You can drive a variety of different screws with any one of them."

The Arduino fans here keep insisting than I'm here to sell STM32 while ignoring the fact that my toolbox currently contains MSP430's, PIC18x and PIC24x. It has at times also contained National PACE, SC\MP, 6800, 6802, 6805, 68HC11, Z80, 6502, 65F11, 8085, PIC16C/F84, MEGA16, MEGA32 and MEGA128.

You're right I would most probably use a STM32 but I also have a couple of hundred, very useful PIC's in SMT flat pack packages, all running the excellent FlashForth and waiting to be used. They're utterly reliable, robust, fast, and Forth is very portable between chips, (which I probably shouldn't have said because now I'll have the C fanboys here flaming me).



Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #187 on: August 24, 2019, 01:30:55 am »
But the point of the library is that the OP on the other thread doesn't even know how to code in C much less understand the machinations of SPI.  For a first approximation, he won't need to know much coding.

Why not? Is it noble to die without knowing how to code?

And if he's going to learn, why not to start from basics? That's how they do it in college, and it works well, at least it used to.

Ignorance is bliss. If you and all your friends think alike and believe the Earth is flat, not knowing any science that may cause doubt and conflict in your mind makes it so much easier and satisfying to burn a 'round earth heretic' at the stake. Everyone brings marshmellows and a good time is had by all minus one.

(not you personally of course, someone like you would probably be the guy they're burning).

As odd as it seems to you and I, many people don't want to learn about the technology they use.

Offline ogden

  • Super Contributor
  • ***
  • Posts: 2667
  • Country: lv
Re: Why Arduino users so agressive?
« Reply #188 on: August 24, 2019, 07:36:42 am »
I don't see a low dollar demo board, the kit from AD comes to over $150 (2 boards).  I'm not that curious...

Oh. Not "hobby-friendly" at all. BTW popular AD9850 have phase pin as well. Yes, for 400Hz it is overkill (125MHz clock) and cost more, but it is up-to you to decide.
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: nl
Re: Why Arduino users so agressive?
« Reply #189 on: August 24, 2019, 11:02:39 am »
The agression spreads toward PIC users now also.
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1325
  • Country: us
Re: Why Arduino users so agressive?
« Reply #190 on: August 24, 2019, 11:32:25 am »
Personally, I just assumed the micro was 5V tolerant and that he and Techman knew that. But yeah, that could be a problem.

Anyhow Langwadt was not incorrect/incomplete in his first post. The quote he refuted/corrected was the claim you could not DRIVE a GPIB bus from STM32.
I don't have (nor want to have) a dog in this fight, but is it really driving the GPIB bus to spec, or is it driving it to "works on my bench today with 3 devices connected"?

"Works on my bench today" is perfectly sufficient for a lot of use cases (I'm sure we've all done it), but it's hard to argue that it's a full drop-in replacement.
 

Offline legacy

  • Super Contributor
  • ***
  • Posts: 4346
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #191 on: August 24, 2019, 11:37:14 am »
Ignorance is bliss. If you and all your friends think alike and believe the Earth is flat, not knowing any science that may cause doubt and conflict

I never believed the Coriolis effect was something real until I sat down a rotating platform at the luna park with my girlfriend. The game was simple: two persons sit down each one on the opposite side of a rotating platform, and on a turn, each one tries to launch a balloon to the partner, who has to catch the balloon to win the game, but the Coriolis effect makes the gameplay harder than how you would believe because if you sit down on a rotating platform, the trajectory that you see is curved.

Now, I belive it  ;D
 

Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #192 on: August 24, 2019, 12:09:53 pm »
Personally, I just assumed the micro was 5V tolerant and that he and Techman knew that. But yeah, that could be a problem.

Anyhow Langwadt was not incorrect/incomplete in his first post. The quote he refuted/corrected was the claim you could not DRIVE a GPIB bus from STM32.
I don't have (nor want to have) a dog in this fight, but is it really driving the GPIB bus to spec, or is it driving it to "works on my bench today with 3 devices connected"?

"Works on my bench today" is perfectly sufficient for a lot of use cases (I'm sure we've all done it), but it's hard to argue that it's a full drop-in replacement.

The actual start of this thread began when RHB wrote " Using a modern 3.3 V MCU and $5 in driver chips to do what a $5 MCU board will do is fairly silly unless you *really* need something the modern MCU does."

I asked "Please explain why a $0.45 STM32L053 needs $5 in driver chips and a $5 (Arduino)  MCU board does not ? "

RHB responded " Because GPIB is 5 V TTL logic and the STM32 will not *drive* 5 V logic unless you add GPIB bus drivers.  The ATMEGA line will. "

langwadt responded "VIh min for TTL is only about 2V, 3.3V will the drive TTL just fine"

Which is correct. The STM32 can read and write to TTL on many, (but not all GPIOS).

It all went pear shaped from there, many respondents weren't interested in specs, they weren't even interested in reading the thread to actually find out what was said, all they were interested in was having their say, just like RHB and I :)

This is a general chat forum not a EE design department, so words like "spec" rarely come up, rarely get answered and generally no one really cares. "Works on the bench" is usually plenty good enough.

Possibly RHB was trying to communicate that his "$5 MCU board" was actually a $5 GPIB driver board with a ATMEGA" and that detail was lost.

Nevertheless a STM32 can read and drive TTL, and with a GPIP driver chipset, also talk GPIB, possibly on a "$5 MCU board" as well.

It was a lot of debating about nothing really, but fun was had by most in the usual Internet way. There was no prize for being right, no penalty for being wrong and most posters are anonymous.

Offline techman-001

  • Frequent Contributor
  • **
  • Posts: 515
  • Country: au
  • Electronics technician for the last 47 years
Re: Why Arduino users so agressive?
« Reply #193 on: August 24, 2019, 12:15:42 pm »
Ignorance is bliss. If you and all your friends think alike and believe the Earth is flat, not knowing any science that may cause doubt and conflict

I never believed the Coriolis effect was something real until I sat down a rotating platform at the luna park with my girlfriend. The game was simple: two persons sit down each one on the opposite side of a rotating platform, and on a turn, each one tries to launch a balloon to the partner, who has to catch the balloon to win the game, but the Coriolis effect makes the gameplay harder than how you would believe because if you sit down on a rotating platform, the trajectory that you see is curved.

Now, I belive it  ;D

I always wondered why spaceships using a rotating living area weren't a  more popular concept because they seem like a great way to provide artificial gravity on long trips like those to Mars.

Seems the Coriolis effect is a real PITA in these cases also!

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 5736
  • Country: nl
Re: Why Arduino users so agressive?
« Reply #194 on: August 24, 2019, 12:23:55 pm »
Ignorance is bliss. If you and all your friends think alike and believe the Earth is flat, not knowing any science that may cause doubt and conflict

I never believed the Coriolis effect was something real until I sat down a rotating platform at the luna park with my girlfriend. The game was simple: two persons sit down each one on the opposite side of a rotating platform, and on a turn, each one tries to launch a balloon to the partner, who has to catch the balloon to win the game, but the Coriolis effect makes the gameplay harder than how you would believe because if you sit down on a rotating platform, the trajectory that you see is curved.

Now, I belive it  ;D

I always wondered why spaceships using a rotating living area weren't a  more popular concept because they seem like a great way to provide artificial gravity on long trips like those to Mars.

Seems the Coriolis effect is a real PITA in these cases also!
I always wondered what those ballbearings would cost and how you can get them to stay greased for a decade or so the flight takes in vacuum.
 

Offline ucanel

  • Regular Contributor
  • *
  • Posts: 51
  • Country: tr
Re: Why Arduino users so agressive?
« Reply #195 on: August 24, 2019, 02:55:33 pm »
...
I always wondered why spaceships using a rotating living area weren't a  more popular concept because they seem like a great way to provide artificial gravity on long trips like those to Mars.

Seems the Coriolis effect is a real PITA in these cases also!

Some deep good videos about that concept:

https://youtu.be/gTDlSORhI-k

https://youtu.be/b3D7QlMVa5s
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3713
  • Country: fr
 

Offline newbrain

  • Frequent Contributor
  • **
  • Posts: 774
  • Country: se
Re: Why Arduino users so agressive?
« Reply #197 on: August 24, 2019, 05:20:24 pm »
For my simple experiment, all I want to do is get two signals generated and then prove that I can shift the phase of one with respect to the other.

To synchronize several chips you need to take them out of reset synchronously which requires to send an SPI command to all the chips being reset at the same time (wouldn't it be better to select a DDS with a reset pin?). So, they must be on the same SPI bus with different chip select pins. To figure that out you would need to read the datasheet. The library wouldn't help you with that, would it? Thus, you would have to read the datasheet anyway. After you have read it, you already know how to deal with the device (which is very simple BTW). So, you're ready to go. Few lines of code and you're done. Instead, you suggest:

- figure out how to use the library
- bring 363 lines of mostly useless code into your project (risking bugs and/or restrictions)

Doesn't seem like something helpful. Rather, a lot of extra work which could have been avoided and unwarranted bloat.
QFT.

Just by chance, I've recently built a little function (for very few functions...) generator based on the AD9834 (that has reset, frequency and phase select pins but is otherwise very similar to AD9833) and an STM32F072 - so I feel pretty much in topic  ;D

The driver to set frequency, phase and various control options is about 60 lines of very sparse C - add 3 dB when including a dual DAC driver for amplitude and offset.

I'm sure the time I spent coding it is comparable to the time it would have taken me to find and understand the library.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline Canis Dirus Leidy

  • Regular Contributor
  • *
  • Posts: 135
  • Country: ru
Re: Why Arduino users so agressive?
« Reply #198 on: August 24, 2019, 05:34:36 pm »
Everything is already stolen writen before us (in my very rough translation):

Quote
Aduino isn't a problem. Program speed isn't a problem, and "young programmers" isn't a problem too.

The problem is that programmers try to write programs for real devices ignoring real world. And in the end, they have to wrap the wires with foil and put iron plates to deal with interference. Or use 7805 as level translator to interface 12V tachometer signal with Atmega.

And then, when it turns out that the program that works perfectly in the simulator is buggy and crashes in real hardware, crying starts on all forums that Arduino is shit, microcontrollers are shit and they need to be soldered, electronics is shit, because you need to solder and nothing is clear.

Specifically for Arduino the trouble is that it, like microcomputers at one time, drastically lowered the threshold for entering the ecosystem, and there rushed "housewives" who didn't want to learn nuances. All what they want is just push button/insert wire/type "digitalWrite" - and everything perfectly worked.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 3615
  • Country: us
Re: Why Arduino users so agressive?
« Reply #199 on: August 24, 2019, 06:53:31 pm »
^All of these same mistakes are also made by people using top of the line, modern microcontrollers and professional IDE and compilers.


Quote
I don't have (nor want to have) a dog in this fight, but is it really driving the GPIB bus to spec, or is it driving it to "works on my bench today with 3 devices connected"? 

"Works on my bench today" is perfectly sufficient for a lot of use cases (I'm sure we've all done it), but it's hard to argue that it's a full drop-in replacement.

It depends what GPIB specifications are. As long as Vih is being met with 0.4V of extra margin for noise immunity on the other end, it's fine, it meets spec, and it is not a hack... as far as the output side of things.
So it depends on the specs of GPIB. How long cable it is supposed to work across, what gauge/resistance of wiring is the minimum recommended, and possibly how many are supposed to be daisy chained. If that other stuff isn't well defined, then even 5V output will fail at some point.

Add the fact that the logic levels aren't symmetrical to begin with. There is only 0.8V margin on the low side. Even at 3.3V, there's nominal 1.3 margin on the high side. So 3.3V output might work just as well as 5V (if Vil is what is violated, first). I suppose it depends what is the output impedance of the driver high vs low, and what is the amount of current drain caused by the input pins on the bus when high signal vs low signal, if that is asymmetrical, and if you have enough inputs connected for that to even matter.

Input side is another story.
Probably most important thing to check is to see what STM32 considers digital low input. CMOS spec, I think it's 0.5V, which is less than 0.8V. It doesn't mean STM32 is that sloppy/insensitive, just that is could be and still meet CMOS compatability spec. So proper low for TTL, at 0.7V, might not be low enough for STM32. In practice, any given device usually have a smaller/tighter "indeterminate window" than what is allowed by the protocol. That transition of high and transition of low just has to be within the window of that protocol. So in a way, no, this isn't necessarily equivalent to a proper TTL level interface. That is not inherently guaranteed, anyhow, by simple virtue that STM is CMOS compatible. But if 0.8V is recognized by STM as  digital input low, which is fairly likely, it will more than likely work fine all the way to most demanding of GPIB specs.

So it would be left to you to determine if your specific CMOS device actually meets TTL specification of ViL 0.8V or not.
« Last Edit: August 24, 2019, 07:48:54 pm by KL27x »
 
The following users thanked this post: techman-001


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf