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

0 Members and 1 Guest are viewing this topic.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #225 on: August 25, 2019, 06:21:20 am »
I also struggle with this question of logic: " If Arduino is for artists and non technical people, why would any experienced embedded engineer consider the Arduino ecosystem to be anything but a curiosity, a small entertainment" ?


Because getting results is fast!  See my 5 minutes from zero to sine wave output using AD9833 library a few posts back.  Literally, less than 5 minutes from downloading library and example code to working sine wave and that time is used to run the interconnects.

The goal is getting the sine wave, not advancing the leading edge of technology.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Why Arduino users so agressive?
« Reply #226 on: August 25, 2019, 07:36:58 am »
I also struggle with this question of logic: " If Arduino is for artists and non technical people, why would any experienced embedded engineer consider the Arduino ecosystem to be anything but a curiosity, a small entertainment" ?


Because getting results is fast!  See my 5 minutes from zero to sine wave output using AD9833 library a few posts back.  Literally, less than 5 minutes from downloading library and example code to working sine wave and that time is used to run the interconnects.

The goal is getting the sine wave, not advancing the leading edge of technology.

I did read your AD9833 post with interest (as I read all your posts with interest) and I also read NorthGuy's followup which said in part "It is simple SPI interface, with only 4 registers. You just set 28-bit frequency and 12-bit phase register. That's all. See, I already know how to set the phase, and you're yet to figure how to use your library. Reading datasheet has put me way ahead of where you are with the library."

Perhaps it's not the best example because getting a sine wave takes me about 5 seconds after I turn on my old PM5314 Philips 1 - 20 MHZ  function generator.

If you had claimed "Because getting results can be fast!" I couldn't really argue that point, because sure, getting the Arduino Blinky is as fast as the getting the Forth Blinky. Both only take seconds to upload to the chip.

Although you get a complete operating system on your chip with Forth in that time, as well as a blinky, Arduino Blinky is still mega fast. The Arduino Java IDE is kinda cool, the whole thing has a look of easy use about it.

My Forth IDE looks a lot less polished. https://mecrisp-stellaris-folkdoc.sourceforge.io/modern-forth-development-environment.html#a-modern-forth-ide

Unfortunately Arduino is not always fast getting results, especially in instances when where no library is available, such as the LMT-01 two wire (not Dallas 2 wire) temperature sensor from Ti.

Unbelievably I see Ti have even included Arduino example code in their official training webpage ... words fail me.

https://training.ti.com/how-interface-lmt01-temperature-sensor-arduino

I did however find a Arduino user very frustrated in Apr 06, 2018, when trying to get his LMT-01 sensor going. There is no [solved] followup to that thread.

https://arduino.stackexchange.com/questions/51588/lmt01-temperature-sensor-code-does-not-run-need-help

"So to repeat myself only Pin2 is attached with the LMT01 to the Arduino. Why doesn't this &!#^-thing work, it compiled and uploaded correctly. If I had a debugger on this software, moving one line at a time I could fix it myself"
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Why Arduino users so agressive?
« Reply #227 on: August 25, 2019, 08:14:33 am »
I don't think arduino users are aggressive. Maybe a bit blind to using anything else. I find the forum moderators more protective though. For heavens sake don't criticize the library documentation even if others agree that it's bad, you will get banned! I do use it from time to time when i need a one off that designing a PCB for is not feasible. But every time i use it I get unexplained odities. Last one was that one of the PWM outputs would stop working when i wrote a value to one of the others, the forum could not help other than to demand to see my code wich was silly and the problem was very simple and as I explained it code was not neccessary. Having already been banned before for being critical I just abandoned my attempt at pointing out a bug and just fixed it by rewriting to the offending channel every time i wrote to the other one to mask the problem.

The arduino is claimed to be for beginers but the level of knowledge the forum expects you to have is not beginner.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #228 on: August 25, 2019, 10:02:44 am »
I find the forum moderators more protective though. For heavens sake don't criticize the library documentation even if others agree that it's bad, you will get banned!

It seems a thing for kids, where mods have much bias, and a thing that is granted, that's not a place for adults.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #229 on: August 25, 2019, 10:11:51 am »
I also struggle with this question of logic: " If Arduino is for artists and non technical people, why would any experienced embedded engineer consider the Arduino ecosystem to be anything but a curiosity, a small entertainment" ?

Because getting results is fast!

This is what my colleagues think. And I do think the same.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Why Arduino users so agressive?
« Reply #230 on: August 25, 2019, 10:15:34 am »
horses for courses. I have used the arduino for a test item at work and a one off for a customer of mine. If you are making one that can be achieved with an arduino why not? why design a specific PCB. Of course you are free to just program the boards as you please.
 

Offline AG7CK

  • Regular Contributor
  • *
  • Posts: 131
  • Country: th
Re: Why Arduino users so agressive?
« Reply #231 on: August 25, 2019, 11:01:18 am »

...

What we want to know is whether the microcontroller can directly drive a single HPIB device like a scope, power supply, or printer, so that you can replace those expensive ($100+) real usb-HPIB interfaces with something like a $5 Arduino Micro clone.  As a hack for hobbyists, or to add “unbudgeted” connectivity to old lab equipment, perhaps.

...


This is indeed the question. And there is empirical evidence that Arduino works. Not only one implementation, but several projects. Used by tens or hundreds of people. A quick search will reveal this. Fanboyz of other uC boards or chips are of course free to use or fail with whatever they want.

And "old lab equipment" includes HP3458A - an 8.5 DMM costing some 9k USD or thereabout new, and 3-6k or so used. Even if it today is sold branded Keysight 3458A, it has not changed much in 20+ years, and if you want to talk to it you "must" use GPIB. Volt-nuts and other precision measurement geeks do generally not want to waste money on shamefully overpriced adapters. So some of these world class meters transfer data to the PC via an eBay Arduino clone.

Apart from the 48 mA value mentioned earlier, it might be useful to learn that "VIH = 3.4 volts typical, 2.4 volts minimum"  and "All lines in the GPIB are tri-state except for ‘SQR’, ‘NRFD’, and ‘NDAC’ which are open-collector. The standard bus termination is a 3K resistor connected to 5 volts in series with a 6.2K resistor to ground - all values having a 5% tolerance." For electrically sound reliability reasons it is stated that "No more than 15 device loads connected to each bus, with no less than two-thirds powered on".

Sources:

http://www.hit.bme.hu/~papay/edu/GPIB/tutor.htm
http://www.interfacebus.com/Design_Connector_GPIB.html

Interesting  :blah:
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Why-must-two-thirds-of-the-instruments-on-a-GPIB-bus-be-on/td-p/760500?profile.language=en
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #232 on: August 25, 2019, 03:17:48 pm »

I did read your AD9833 post with interest (as I read all your posts with interest) and I also read NorthGuy's followup which said in part "It is simple SPI interface, with only 4 registers. You just set 28-bit frequency and 12-bit phase register. That's all. See, I already know how to set the phase, and you're yet to figure how to use your library. Reading datasheet has put me way ahead of where you are with the library."

You seem to be making a couple of assumptions that are probably incorrect.  I did read the datasheet and know very well how to write the code.  I also read the App Note - did you find that?  It details the calculations and provides the proper values for a 400 Hz sine wave.  Kind of handy... I also read over the library code and there were no surprises and, of course, the application itself just makes a couple of library calls.  Over and done.

Quote
Perhaps it's not the best example because getting a sine wave takes me about 5 seconds after I turn on my old PM5314 Philips 1 - 20 MHZ  function generator.
I could do the same with my 80 MHz Siglent but the application for this gadget is a flight instrument, not a boxcar. 
Quote
If you had claimed "Because getting results can be fast!" I couldn't really argue that point, because sure, getting the Arduino Blinky is as fast as the getting the Forth Blinky. Both only take seconds to upload to the chip.
Why keep bringing up Forth?  It brings nothing to the Arduino topic and even less to the AD9833 sub-topic.  I wrote an entire celestial navigation program for the HP48GX calculator about 20 years ago.  The HP RPL programming language is a lot like Forth.  It worked well.  But I'm not going to do it again!

As to why people can't get particular pieces of hardware to work, well, some people should be polishing ball bearings instead of writing code.  Sometimes it is actually necessary to read the datasheet but when it runs over 1000 pages, it's going to be a slog.  The only way to approach it is one peripheral at a time.  To be fair, this isn't a game for the test gear challenged.  Without a logic analyzer and/or modern DSO, things will be very difficult.  You can't fix what you can't see.

In the end, I'm lazy, not stupid.  I can write the code if need be but if it already exists, why not save a bunch of time?

What's to happen with my AD9833 gadget(s)?  I'll toss them in a drawer and, maybe, pull them out some day.  This exercise was for proof of concept, not production.  Chances are good I will never use them for anything practical.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Why Arduino users so agressive?
« Reply #233 on: August 25, 2019, 04:12:57 pm »
What we want to know is whether the microcontroller can directly drive a single HPIB device like a scope, power supply, or printer, so that you can replace those expensive ($100+) real usb-HPIB interfaces with something like a $5 Arduino Micro clone.  As a hack for hobbyists, or to add “unbudgeted” connectivity to old lab equipment, perhaps.

https://sigrok.org/wiki/Prologix_GPIB-USB
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #234 on: August 25, 2019, 04:28:39 pm »
I did read the datasheet and know very well how to write the code.  I also read the App Note - did you find that?  It details the calculations and provides the proper values for a 400 Hz sine wave.  Kind of handy... I also read over the library code and there were no surprises and, of course, the application itself just makes a couple of library calls.  Over and done.

How could all that take you 5 minutes?


 
The following users thanked this post: sokoloff, techman-001

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Why Arduino users so agressive?
« Reply #235 on: August 25, 2019, 04:36:05 pm »
Why keep bringing up Forth?

Well, I agree this looks sometimes out of place, and I told him so in another topic (I probably got blacklisted  ;D ).

That said and to be fair (I try to be), some other people keep bringing up Arduino in threads where the OP never asked anything about it, which can be every bit as annoying.

It brings nothing to the Arduino topic

To be fair again, and I'm not defending his cause, but I think he mentioned Forth to show that there were other options than Arduino that could get you the same level of ease of development than the Arduino ecosystem. Whether this is really true, and true in all cases, is debatable.

Point is, pretty much anyone convinced of the greatness of some tool they're using a lot (or even exclusively) will tend to promote it relentlessly. As someone else here said, that's not specifically the Arduino users who are aggressive, that's just all zealots really.

I wrote an entire celestial navigation program for the HP48GX calculator about 20 years ago.  The HP RPL programming language is a lot like Forth.  It worked well.  But I'm not going to do it again!

As much as I like RPN for instant calculation, I personally wouldn't consider it for a programming language beyond very simple tasks, just because that's pretty much unreadable after a while compared to many other kinds of notation. Of course we're not all the same, and some people may be "hardwired" to find this actually more readable. Maybe.

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #236 on: August 25, 2019, 05:30:12 pm »

Unfortunately Arduino is not always fast getting results, especially in instances when where no library is available, such as the LMT-01 two wire (not Dallas 2 wire) temperature sensor from Ti.

Unbelievably I see Ti have even included Arduino example code in their official training webpage ... words fail me.

https://training.ti.com/how-interface-lmt01-temperature-sensor-arduino

I did however find a Arduino user very frustrated in Apr 06, 2018, when trying to get his LMT-01 sensor going. There is no [solved] followup to that thread.

https://arduino.stackexchange.com/questions/51588/lmt01-temperature-sensor-code-does-not-run-need-help

"So to repeat myself only Pin2 is attached with the LMT01 to the Arduino. Why doesn't this &!#^-thing work, it compiled and uploaded correctly. If I had a debugger on this software, moving one line at a time I could fix it myself"

Well, he clearly didn't do his homework.  Pin 2 is not acceptable, the input must be on AIN1 to use TI's recommended analog comparator approach.

From the datasheet, you know this is a pulse counting operation and you can pretty well guess the code will use interrupts so we're out of the Arduino libraries and into the AVR Libc libraries.  And, necessarily, there is an order of magnitude more experience required.  But that's the cool part of the Arduino and AVR Libc, you can get down in the dirt if you need to.  In fact, you can blow off the Arduino libraries altogether and just use AVR Libc.  Same board, same bootloader, same crappy IDE...

The same kind of code is required on any platform and I still don't see where it would be faster to implement the LMT01 with something like STM32F446 because it doesn't even have a comparator.  Considering the slow edges and available voltage (from current) span, a Schmidt Trigger would seem to be a minimum requirement but maybe with care a pin change interrupt can work.

It isn't going to be nearly as fast to write the code for the '446 (or whatever) as it is for the Arduino.  The total AVR Libc stuff required was one line of code to setup the analog comparator and a one line interrupt handler.  Now, true, they have to be the right lines of code...  I have nothing for or against the '446, it's just the first datasheet that Google returned.  And I like the ST products, I have several of their boards and I really like the ones that are mbed compatible.

Interrupts are going to be beyond many Arduino users but that doesn't get better for them on any other platform and the fact that they chose a pulse counting sensor was their first mistake.  If you can't find a library, don't buy the sensor!  Unless you can write it yourself, of course.

It was nice of TI to create the tutorial and provide the code.  I wonder why they did that?  Maybe because the Arduino is so popular?  You can bet there was a business reason for producing it.
« Last Edit: August 25, 2019, 05:31:53 pm by rstofer »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #237 on: August 25, 2019, 05:47:48 pm »
I did read the datasheet and know very well how to write the code.  I also read the App Note - did you find that?  It details the calculations and provides the proper values for a 400 Hz sine wave.  Kind of handy... I also read over the library code and there were no surprises and, of course, the application itself just makes a couple of library calls.  Over and done.

How could all that take you 5 minutes?


Nothing else to do while I waited for the delivery.  It was boring...

In the case of the library and the AD9833, none of the datasheet information is necessary to get a sine wave.  Sure, I read it over but nothing I read was necessary for using the device other than the pinout and that was shown on the silkscreen of the demo board.  I didn't need to know there are multiple phase and frequency registers, I didn't need to know 2^28, I didn't even need to know that the crystal was 25 MHz although that could come in handy if I were generating high frequency signals.  But given that there are 62,500 clocks in one 400 Hz cycle, I don't imagine I am going to be short on samples.  The information was "nice to know" but not necessarily "need to know".

All of the above applies to getting a simple output.  Clearly there is more to it than that but the API provides a number of functions for changing frequency and phase, incrementing or decrementing either and so on.  It's all laid out in the code and the comments are pretty good.

But, pretty much, it's plug and play.  Five wires and out comes a sine wave.  Other approaches would have the programmer still reading through the index of the datasheet to find the SPI peripheral, and the power control register and the clock control register and whatever other predicates apply.  Oh, wait, you mean the SPI gadget isn't powered up by default?  What do you mean I have to turn on the clock?  How fast can the SPI bus run and how do I set the clock divider?

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #238 on: August 25, 2019, 05:58:39 pm »
As much as I like RPN for instant calculation, I personally wouldn't consider it for a programming language beyond very simple tasks, just because that's pretty much unreadable after a while compared to many other kinds of notation. Of course we're not all the same, and some people may be "hardwired" to find this actually more readable. Maybe.

RPN is useful at the keyboard but RPL is the internal programming language and it is somewhat more expansive.  Things like selectable menus are written in RPL as is the application user interface.  I think I was still using Windows 3.1 when I wrote the celestial stuff.  Pretty sure the code is long gone!

I have been using RPN since the early '70s and my HP48GX calculator is right next to my PC keyboard.  I have a lot of other calculators but the GX is, by far, my favorite.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Why Arduino users so agressive?
« Reply #239 on: August 25, 2019, 07:08:55 pm »
RPN is useful at the keyboard but RPL is the internal programming language and it is somewhat more expansive.

I know. I've written quite a few utilities in RPL at the time. I meant RPN as in what it means: a notation. RPL uses RPN as a notation, like Forth. It makes a program kinda hard to read after you've written it. AFAIR, the only addition in RPL that made things a bit easier is the ability to store parameters in an ordered fashion in variables with the '->' symbol (old memories so, hoping I remember that right), so that was kind of a "workaround" in some cases to make things a bit clearer than just completely relying on manipulating the stack (which is obviously powerful but hard to read and manipulate once your program grows).

RPN is very practical for calculation entry in calculators, because it minimizes keystrokes and avoids the potential pitfalls of not getting the parentheses right.
In a programming language, it makes the parsing and execution extremely fast and simple, but I personally think it gets unreadable really quick.

I have been using RPN since the early '70s and my HP48GX calculator is right next to my PC keyboard.  I have a lot of other calculators but the GX is, by far, my favorite.

I still have a HP48G+. Like it (although I use it less and less). I have also owned a 28S before that. I use many other tools now on computer or phone/tablet, but if I was still using a real calculator on a regular basis, I would consider buying a DM42 (SwissMicros)...
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #240 on: August 25, 2019, 07:47:07 pm »
Sure, I read it over but nothing I read was necessary for using the device other than the pinout and that was shown on the silkscreen of the demo board.

<snip>

But, pretty much, it's plug and play.  Five wires and out comes a sine wave.  Other approaches would have the programmer still reading through the index of the datasheet to find the SPI peripheral, and the power control register and the clock control register and whatever other predicates apply.  Oh, wait, you mean the SPI gadget isn't powered up by default?  What do you mean I have to turn on the clock?  How fast can the SPI bus run and how do I set the clock divider?

See. You have looked at the AD9833 datasheet, also the app note, the library comments, and possibly datasheets of other similar DDS devices. This wasn't necessary. Nobody made you to. Nobody paid you to. You did this work voluntarily, at your own free will. And, by your own words, it was nice to know.

However, when it comes to looking at the SPI chapter for the MCU (which is not that dissimilar from looking at the AD9833 datasheet) you regard this as a hard work where every hour is as bad as losing $100. But may be it's nice to know too? May be if you did that, you would find it useful, as it gives you power to write your own code. And this power alone may save you hours when you move beyond the single sine wave to synchronizing multiple devices.

Of course, this is you who decides, but choosing to look at the AD9833 docs and totally despising SPI docs is not very rational. It is not clear why other people would want to follow your approach.
« Last Edit: August 25, 2019, 08:05:18 pm by NorthGuy »
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Why Arduino users so agressive?
« Reply #241 on: August 25, 2019, 08:02:34 pm »

I did read your AD9833 post with interest (as I read all your posts with interest) and I also read NorthGuy's followup which said in part "It is simple SPI interface, with only 4 registers. You just set 28-bit frequency and 12-bit phase register. That's all. See, I already know how to set the phase, and you're yet to figure how to use your library. Reading datasheet has put me way ahead of where you are with the library."

You seem to be making a couple of assumptions that are probably incorrect.  I did read the datasheet and know very well how to write the code.  I also read the App Note - did you find that?  It details the calculations and provides the proper values for a 400 Hz sine wave.  Kind of handy... I also read over the library code and there were no surprises and, of course, the application itself just makes a couple of library calls.  Over and done.

Quote
Perhaps it's not the best example because getting a sine wave takes me about 5 seconds after I turn on my old PM5314 Philips 1 - 20 MHZ  function generator.
I could do the same with my 80 MHz Siglent but the application for this gadget is a flight instrument, not a boxcar. 
Quote

If you had claimed "Because getting results can be fast!" I couldn't really argue that point, because sure, getting the Arduino Blinky is as fast as the getting the Forth Blinky. Both only take seconds to upload to the chip.
Why keep bringing up Forth?  It brings nothing to the Arduino topic and even less to the AD9833 sub-topic.  I wrote an entire celestial navigation program for the HP48GX calculator about 20 years ago.  The HP RPL programming language is a lot like Forth.  It worked well.  But I'm not going to do it again!

As to why people can't get particular pieces of hardware to work, well, some people should be polishing ball bearings instead of writing code.  Sometimes it is actually necessary to read the datasheet but when it runs over 1000 pages, it's going to be a slog.  The only way to approach it is one peripheral at a time.  To be fair, this isn't a game for the test gear challenged.  Without a logic analyzer and/or modern DSO, things will be very difficult.  You can't fix what you can't see.

In the end, I'm lazy, not stupid.  I can write the code if need be but if it already exists, why not save a bunch of time?

What's to happen with my AD9833 gadget(s)?  I'll toss them in a drawer and, maybe, pull them out some day.  This exercise was for proof of concept, not production.  Chances are good I will never use them for anything practical.

You're putting Arduino into FLIGHT INSTRUMENTS ? Well at least if anyone wants some Arduno gear for free they will only have to wait for it to crash land in their back yard. Ok, ok, I know you said "This exercise was for proof of concept, not production." but you might as well have just drawn a nicely colored picture because we both know that has as much chance of going into a flight instrument as anything Arduino.

I keep bringing up Forth because the topic is "Why Arduino users so aggressive?" ... you're not feeling aggressive because I'm suggesting that something else is better than Arduino are you ?  ;)

And as to the AD9833 sub-topic, of course Forth is 100% relevant. Forth is  perfect for such projects even if you can't see it thru those Arduino colored glasses you're wearing.

In my world it's 100% vital to read the datasheets and it has never been a "slog" for me. I've always loved electronics and datasheets but now I see a whole sub culture of people who don't love electronics, they hate datasheets, they hate taking more than five minutes to code anything and they're proud of it.

I agree that electronics is probably not for these people. However along comes Arduino and sells them the idea that electronics IS for them. Now we have a massive 'community' of people who should never have gone near a soldering iron infesting the Internet with plaintive cries for help because they are utterly lost and alone.

That's not my fault, it's your fault for suggesting to these people that Arduino is so wonderful, just 'load a library' and it's all done in 5 minutes so they still have time to catch today's hour long episode of "Dr Phill" on tv.

Even tho you know what you're doing, you read the data sheet, you read and understood the premade Arduino code, then you used the Arduino code that someone else wrote. How incredibly convenient you didn't have any problems with sharing resources in the MCU for YOUR PART OF THE PROJECT, or want to use multitasking or something DIFFERENT from a "off the rack" solution.

To me that's like reading about the latest strawberry flavoured icecream, driving to the shop and buying some, then giving it to someone else to eat.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #242 on: August 25, 2019, 08:03:05 pm »
I still have a HP48G+. Like it (although I use it less and less). I have also owned a 28S before that. I use many other tools now on computer or phone/tablet, but if I was still using a real calculator on a regular basis, I would consider buying a DM42 (SwissMicros)...

I had read about the DM42 quite some time back and had given it some consideration.  Probably just to support the effort, I already have calculators.  I see where they are still having keyboard problems as of August 2019.  I can wait...

However, the DM42 led to Free42 which led to a very capable calculator being installed on my cell phone.  Now to find the manuals...
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Why Arduino users so agressive?
« Reply #243 on: August 25, 2019, 08:10:16 pm »
Why keep bringing up Forth?

Well, I agree this looks sometimes out of place, and I told him so in another topic (I probably got blacklisted  ;D ).


Not by me. I may disagree with you now and again but you're experienced and intelligent, and say it as you see it. I enjoy reading your posts.

If I wanted to be in a community where everyone thought alike, like clones of each other, I'd be an Arduino user ;-)
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #244 on: August 25, 2019, 08:25:13 pm »

You're putting Arduino into FLIGHT INSTRUMENTS ? Well at least if anyone wants some Arduno gear for free they will only have to wait for it to crash land in their back yard. Ok, ok, I know you said "This exercise was for proof of concept, not production." but you might as well have just drawn a nicely colored picture because we both know that has as much chance of going into a flight instrument as anything Arduino.


Way back in this thread I posted a link to a thread in Projects forum where the OP wants to drive a real ADI (Attitude Director Indicator) from the digital outputs of a hobby grade flight simulator.  It turns out that the ADI needs 3 400 Hz signals to rotate the ball.  He wasn't clear (to me) on all the details but, at a minimum, the 3 signals need to be amplitude modulated.  The amplitude apparently determines the angle of rotation for the ball.  It is not clear to me whether there needs to be 120 degree phase shifts.  Doesn't matter, the AD9833 will do that.

The proposed alternative was the typical sin() look-up table which quickly gets out of hand if a reasonable number of samples are considered.  Think about 400 Hz and 1024 samples:  That's 409,600 timer interrupts per second if that is the approached used to feed the DAC.  Plus the possibility of handling the phase shifting if that is required.  Not even a remote possibility for an ATmega328 and unlikely on most other platforms as well.  In any event, since amplitude modulation is likely the only requirement, first generate a baseline 400 Hz sine wave and then use 3 analog multipliers with the Y inputs fed from DACs controlled by the Arduino in response to changes in the digital values thrown off by the flight simulator.  The amplitude won't change often but there are extra points if the motion is smooth and accurate.  Offloading the sine wave generation leaves a lot of time for the Arduino to receive and interpret the data stream.

Seems simple enough, once the 400 Hz issue is resolved.  Done!  Proof of concept complete.  The rest is just details.

ADI:

https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/VMS_Artificial_Horizon.jpg/184px-VMS_Artificial_Horizon.jpg
https://worldofaircraftdesign.files.wordpress.com/2012/06/attitude-director-indicator.jpg
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4425
  • Country: dk
Re: Why Arduino users so agressive?
« Reply #245 on: August 25, 2019, 08:42:59 pm »

You're putting Arduino into FLIGHT INSTRUMENTS ? Well at least if anyone wants some Arduno gear for free they will only have to wait for it to crash land in their back yard. Ok, ok, I know you said "This exercise was for proof of concept, not production." but you might as well have just drawn a nicely colored picture because we both know that has as much chance of going into a flight instrument as anything Arduino.

..
The proposed alternative was the typical sin() look-up table which quickly gets out of hand if a reasonable number of samples are considered.  Think about 400 Hz and 1024 samples:  That's 409,600 timer interrupts per second if that is the approached used to feed the DAC. 
...

a +400khz sample rate for a 400Hz sine wave is silly, a few kHz will do. You step through the table at a rate that makes 400Hz at your sample rate, just like the AD9833 does





 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #246 on: August 25, 2019, 08:56:13 pm »
In my world it's 100% vital to read the datasheets and it has never been a "slog" for me. I've always loved electronics and datasheets but now I see a whole sub culture of people who don't love electronics, they hate datasheets, they hate taking more than five minutes to code anything and they're proud of it.

I agree that electronics is probably not for these people. However along comes Arduino and sells them the idea that electronics IS for them. Now we have a massive 'community' of people who should never have gone near a soldering iron infesting the Internet with plaintive cries for help because they are utterly lost and alone.

That's not my fault, it's your fault for suggesting to these people that Arduino is so wonderful, just 'load a library' and it's all done in 5 minutes so they still have time to catch today's hour long episode of "Dr Phill" on tv.


So, rather than help them accomplish their goals we should just tell them they are too stupid to ever understand electronics and they should walk away?  Nonsense!  If I have time, I'll provide what help I can.

Quote
Even tho you know what you're doing, you read the data sheet, you read and understood the premade Arduino code, then you used the Arduino code that someone else wrote. How incredibly convenient you didn't have any problems with sharing resources in the MCU for YOUR PART OF THE PROJECT, or want to use multitasking or something DIFFERENT from a "off the rack" solution.

To me that's like reading about the latest strawberry flavoured icecream, driving to the shop and buying some, then giving it to someone else to eat.

You seem to think that I just blow off the technical stuff.  No!  I just skip over it when I can.  I just focus on where to spend time.  If all I want is a 400 Hz sine wave, why spend time on it?  Why reinvent the wheel that somebody has already produced.  It's 'proof of concept', not production.  Get in, get it done, move on!

Had the library not worked, and it doesn't when I try to use it with the Teensy 4.0 (32 bit ARM Cortex M7) then I would need to put in a little more time figuring out why the SPI doesn't work.  But the OP wants to use an Arduino and I don't care enough about the AD9833 to write a library for the ARM so the project is complete.

Even if the OP uses an Arduino Nano dedicated to driving the ADI with no other functions, at $5 each, that's a bargain.  Get in, get the ADI to work and move on to the next instrument.  In fact, I would gang all of the Nanos together on an RS485 bus so each Nano could pick off the part it was interested in and skip over the rest.  That could be a very workable scheme.

I did something similar about 10 years back when I was using a bigger AVR chip (ATmega128?) using HID to talk to the Microsoft Flight Simulator.  All of my indicators were seven segment but today I would use those small LCD screens and have a CPU dedicated to each instrument.  Maybe all of them would work as HID devices or maybe I would have a 'director' that handled the HID and sent the results over RS485.  But I'm not working on that any more...
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #247 on: August 25, 2019, 09:04:35 pm »
a +400khz sample rate for a 400Hz sine wave is silly, a few kHz will do. You step through the table at a rate that makes 400Hz at your sample rate, just like the AD9833 does

Will it?  Are you sure?  The ball needs to rotate smoothly and I don't know if 10 or 20 samples per waveform will be smooth or not.

The AD9833 sin() ROM uses 12 address bits (4096 steps) and a 10 bit DAC (back to 1024 steps).
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4425
  • Country: dk
Re: Why Arduino users so agressive?
« Reply #248 on: August 25, 2019, 09:29:01 pm »
a +400khz sample rate for a 400Hz sine wave is silly, a few kHz will do. You step through the table at a rate that makes 400Hz at your sample rate, just like the AD9833 does

Will it?  Are you sure?  The ball needs to rotate smoothly and I don't know if 10 or 20 samples per waveform will be smooth or not.

The AD9833 sin() ROM uses 12 address bits (4096 steps) and a 10 bit DAC (back to 1024 steps).

the 1024 steps is in amplitude, the AD9833 is meant for making 0-12.5MHz with a 25MHz sample rate, at that rate the input to the sin()
ROM will only change every ~15 samples to make 400Hz


44.1kHz is good enough for audio







 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why Arduino users so agressive?
« Reply #249 on: August 25, 2019, 09:31:35 pm »
Even tho you know what you're doing, you read the data sheet, you read and understood the premade Arduino code, then you used the Arduino code that someone else wrote. How incredibly convenient you didn't have any problems with sharing resources in the MCU for YOUR PART OF THE PROJECT, or want to use multitasking or something DIFFERENT from a "off the rack" solution.

You want multitasking?  How about FreeRTOS on Arduino?
https://create.arduino.cc/projecthub/feilipu/using-freertos-multi-tasking-in-arduino-ebc3cc

It looks like the memory utilization isn't truly horrible in the Mega at just 3%

Complete, from bare metal, projects will take longer.  They may be beyond the abilities of most Arduino users but they are certainly doable with AVR Libc.  Don't like AVR Libc?  Write your own!  It's all workable on the Arduino plaltform even if the only Arduino left in the project is the board and chip.  You can get as far down in the weeds as you want.

Personally, I'll build on the work of others.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf