• Electrical Engineering V3
    3,104 replies, posted
[QUOTE=Richy19;49096826]What are some good practices for programming arduino? Am I OK to use classes? Should I avoid new/delete...[/QUOTE] [sp]The best way to program for arduino is to buy an avr programmer and don't use arduino[/sp] There is no such thing as new and delete on microcontrollers/arduino, as there is no operating system to allocate memory. Generally you should just use it like C as much as possible.
Come on now. Arduino isn't terrible. Right now I use a combination of arduino IDE for the libraries and an AVR burner to program the chips without having to wait for the bootloader. I guarantee I would have no clue how to do most of the I/O things if it wasn't for the arduino libraries. All that PORTA and PORTB stuff is jibberish.
[QUOTE=papkee;49097342]Come on now. Arduino isn't terrible. Right now I use a combination of arduino IDE for the libraries and an AVR burner to program the chips without having to wait for the bootloader. I guarantee I would have no clue how to do most of the I/O things if it wasn't for the arduino libraries. All that PORTA and PORTB stuff is jibberish.[/QUOTE] Not really jibberish, its just simple port direction/value registers. A quick look at a page in the datasheet of the tiny/mega AVR you're using tells you the values. To be fair, arduino still allows you to program all the low level DDRB/PORTB registers and assembly so it's still fair to advanced programmers but still I think the development IDE is garbage compared to just Notepad++ and direction compilation with a Notepad++ macro directed toward whatever AVR-GCC compiler arduino uses.
[QUOTE=LoneWolf_Recon;49097472]Not really jibberish, its just simple port direction/value registers. A quick look at a page in the datasheet of the tiny/mega AVR you're using tells you the values. To be fair, arduino still allows you to program all the low level DDRB/PORTB registers and assembly so it's still fair to advanced programmers but still I think the development IDE is garbage compared to just Notepad++ and direction compilation with a Notepad++ macro directed toward whatever AVR-GCC compiler arduino uses.[/QUOTE] Excuse me, but running C++ on an avr is just plain silly and unnecessary.
I was told I can't do this for some reason. 5 LEDs in series with a maximum forward voltage of 2.4v each and a 12v power supply. Why can I not do this? Also why can I not put a 1 ohm resistor in the series as well.
[QUOTE=false prophet;49097832]I was told I can't do this for some reason. 5 LEDs in series with a maximum forward voltage of 2.4v each and a 12v power supply. Why can I not do this? Also why can I not put a 1 ohm resistor in the series as well.[/QUOTE] Just try it out, LEDs are inexpensive enough.
[QUOTE=false prophet;49097832]I was told I can't do this for some reason. 5 LEDs in series with a maximum forward voltage of 2.4v each and a 12v power supply. Why can I not do this? Also why can I not put a 1 ohm resistor in the series as well.[/QUOTE] You technically can but it isn't a good idea, the reason being that the current through the LED and the voltage drop is highly unstable. [img]http://i.imgur.com/2koqxwz.png[/img] This is even worse with a high current LED since heating significantly changes the voltage drop, using a resistor or a constant current driver is always preferable.
Who's the asshole who came up with leaded fuses? Of all the parts to be soldered down I feel like a fuse, especially the primary fuse, shouldn't be one of them. Also please send help [URL="http://www.eevblog.com/forum/repair/need-eeprom-data-hp6034-60v10a-power-supply/msg797923/#msg797923"]http://www.eevblog.com/forum/repair/need-eeprom-data-hp6034-60v10a-power-supply/msg797923/#msg797923[/URL]
[QUOTE=No_Excuses;49099196]Who's the asshole who came up with leaded fuses? Of all the parts to be soldered down I feel like a fuse, especially the primary fuse, shouldn't be one of them. Also please send help [URL="http://www.eevblog.com/forum/repair/need-eeprom-data-hp6034-60v10a-power-supply/msg797923/#msg797923"]http://www.eevblog.com/forum/repair/need-eeprom-data-hp6034-60v10a-power-supply/msg797923/#msg797923[/URL][/QUOTE] If you think fuses are bad try incandescent lamps, madness.
[QUOTE=DrDevil;49097666]Excuse me, but running C++ on an avr is just plain silly and unnecessary.[/QUOTE] Honestly, I've programmed both raw AVR assembly vs AVR-GCC and performance/size wise I haven't noticed any significant hits.
[QUOTE=LoneWolf_Recon;49100133]Honestly, I've programmed both raw AVR assembly vs AVR-GCC and performance/size wise I haven't noticed any significant hits.[/QUOTE] Yeah, but C++ comes with a lot of overhead that eats both flash, rom and cpu cycles.
The only time you need to use assembly on a micro is when you need exact timing. C and C++ generally run at the same speed although C++ tends to eat more flash memory, unless you have a really specific need of a language feature it's best to stick to C.
Also relevant: my desk has been upgraded with more gear. [t]http://i.imgur.com/Pu8jVow.jpg[/t]
[QUOTE=papkee;49104326]Also relevant: my desk has been upgraded with more gear. [t]http://i.imgur.com/Pu8jVow.jpg[/t][/QUOTE] I see you're raising the bar on your radios.
[QUOTE=LoneWolf_Recon;49105686]I see you're raising the bar on your radios.[/QUOTE] Motorola for lyfe
[QUOTE=papkee;49105839]Motorola for lyfe[/QUOTE] Go Moto or go home. How's DMR treating you on that XPR6550? Pm me your DMR-MARC ID so I can add you to my MD380s contacts.
It's a brick of a radio. Very impressed with both the digital and analog performance.
I bought a broken 1500VA 1U UPS just recently. It's so fascinating inside. It has a ~10H inductor which I at first thought was an isolation transformer. It's in parallel with a capacitor and it seems like if the mains power is lost, those two oscillate at around 60Hz to provide some overlap energy while the rest of the UPS's circuitry kicks in. It's also so deceptively heavy. Just over 50lbs in a 1U formfactor... [IMG]http://i.imgur.com/iVN7VgS.jpg[/IMG]
The type of person who always identifies as an engineer on reddit is just the cringiest I simplified the concept of FPGA's for someone who is a music producer by trade, just to make ti simple. But someone decided it necessary to correct my simplified adaptation by starting with a quote of what I said then leading right into "That is [B]utter bullshit[/B]. Source: I'm an electrical engineer who [I]actually programs FPGA's[/I]" right and in good engineer on reddit form you're also being a pedant pointlessly. no one does that shit in person when you're in a lab, talking to a client, or working on research ffs
Man, nothing beats a good ol' heat gun for removing tons of components from single-sided boards. Unfortunately, the board was too dank so now my apartment reeks of super-hot plastic.:disgust:
[QUOTE=Zero-Point;49113720]Man, nothing beats a good ol' heat gun for removing tons of components from single-sided boards. Unfortunately, the board was too dank so now my apartment reeks of super-hot plastic.:disgust:[/QUOTE] I soldered shit today using the top of my JV-1080 as the surface since its the only metal surface I have. I also hotglued my other synth to the 1080 ah, rackmounts. because who gives a fuck
[QUOTE=paindoc;49113975]I soldered shit today using the top of my JV-1080 as the surface since its the only metal surface I have. I also hotglued my other synth to the 1080 ah, rackmounts. because who gives a fuck[/QUOTE] Perhaps you need to [url=http://lackrack.org/]lackmount[/url] stuff.
This UPS is sending me for a loop. I'm at the "this device never worked when it was new" stage of troubleshooting. That is, I've most likely traced something out incorrectly and my logical conclusion is that it could have never worked in the first place. Getting closer to unraveling the mystery though.
I have been plagued by a mysterious ~100MHz signal that has been coupling into all of my circuits. I had been reducing all my leads and decoupling all my supplies to no avail. My scope only has a bandwidth of 50MHz so I haven't been able to get a great look at the signal since it gets attenuated so much. I also hadn't really measured it's exact frequency as my scope is purely analog. Today I finally got a rough estimate of ~90MHz. Then I remembered I live 200 meters away from my schools 25 Killowatt radio transmitter on, wait for it, 88.1 MHz. Mystery solved but I guess I'm never getting rid of that signal :v:
[QUOTE=Dolton;49128344]I have been plagued by a mysterious ~100MHz signal that has been coupling into all of my circuits. I had been reducing all my leads and decoupling all my supplies to no avail. My scope only has a bandwidth of 50MHz so I haven't been able to get a great look at the signal since it gets attenuated so much. I also hadn't really measured it's exact frequency as my scope is purely analog. Today I finally got a rough estimate of ~90MHz. Then I remembered I live 200 meters away from my schools 25 Killowatt radio transmitter on, wait for it, 88.1 MHz. Mystery solved but I guess I'm never getting rid of that signal :v:[/QUOTE] [url=http://mri-q.com/uploads/3/2/7/4/3274160/4032171_orig.gif]There are always ways of getting rid of unwanted signals[/url].
So I spent half a day looking for a weird intermittent fault with this HP 8660C Synthesized Signal Generator... [url=http://i.imgur.com/cQUZVib.jpg][img]http://i.imgur.com/cQUZVibl.jpg[/img][/url] For fucks sake.
[QUOTE=Dolton;49128344]I have been plagued by a mysterious ~100MHz signal that has been coupling into all of my circuits. I had been reducing all my leads and decoupling all my supplies to no avail. My scope only has a bandwidth of 50MHz so I haven't been able to get a great look at the signal since it gets attenuated so much. I also hadn't really measured it's exact frequency as my scope is purely analog. Today I finally got a rough estimate of ~90MHz. Then I remembered I live 200 meters away from my schools 25 Killowatt radio transmitter on, wait for it, 88.1 MHz. Mystery solved but I guess I'm never getting rid of that signal :v:[/QUOTE] Filters are your friend.
[QUOTE=Chryseus;49128704]Filters are your friend.[/QUOTE] Even my probe leads pick it up when not connected to a circuit. I don't have any terminators but I don't think reflection is a problem. Assuming the tower radiates evenly in a sphere using an antenna with zero gain (not the case) I am surrounded by a field of 50mW / m^2 in my house. Luckily I am not doing anything near the frequencies but it's pretty funny.
[QUOTE=ddrl46;49128663]So I spent half a day looking for a weird intermittent fault with this HP 8660C Synthesized Signal Generator... [url=http://i.imgur.com/cQUZVib.jpg][img]http://i.imgur.com/cQUZVibl.jpg[/img][/url] For fucks sake.[/QUOTE] That's okay, I was fixing a spot-pinner (like a spot-welder, but it welds in special pins), found out that the switch leads weren't good so I replaced them. Still doesn't work, despite already testing everything else: Mercury relay (yup, one of those) is good, coil resistance is good and the switching part works because turning it causes the welder to activate, whether the trigger is pressed or not. So either I'm going to have to figure out what's really going on with that damn relay, or I'm going to have to ask the bosses if they'd rather replace it with a solid-state relay instead, but since that would cost money their answer is likely "Hell no". :disgust:
[QUOTE=Dolton;49128344]I have been plagued by a mysterious ~100MHz signal that has been coupling into all of my circuits. I had been reducing all my leads and decoupling all my supplies to no avail. My scope only has a bandwidth of 50MHz so I haven't been able to get a great look at the signal since it gets attenuated so much. I also hadn't really measured it's exact frequency as my scope is purely analog. Today I finally got a rough estimate of ~90MHz. Then I remembered I live 200 meters away from my schools 25 Killowatt radio transmitter on, wait for it, 88.1 MHz. Mystery solved but I guess I'm never getting rid of that signal :v:[/QUOTE] Reminds me of a story my teacher told us, he was working on an oil rig, in a panel with some very sensitive components, and everytime he'd call up the control room on his walkie, it'd crash :v:
Sorry, you need to Log In to post a reply to this thread.