

 |
| DIY Headlight Controller module using Arduino NANO microcontroller (Page 2/3) |
|
WalkerTexan
|
MAR 20, 04:44 PM
|
|
I purposely made the circuit and code very simple so that those less familiar with electronics could use it if they wished and still understand it. I definitely could have made it more robust (MSEE with 35+ years experience, now retired) but chose simplicity and low cost instead. And the failure of the original module was definitely the FETs. The second side was intermittent with signs of major overheating because it was driving both motors. I've seen FET failures as the root cause often in my career as a Test Equipment designer and RCA expert on high-reliability redundant systens. Feel free to redesign it for your needs; consider this a working starting point. I wasn't looking for endless, meaningless critique because there are a multitude of ways to do this. I was simply sharing my fix with the community.
I analyzed the old one with my oscilloscope and a schematic I found to determine all of the operational characteristics.
Both of my HL assemblies were bad so I had to rebuild those first. That's when I found the modified wiring and the module issue. One had a shaft that had broken loose from the tri-lobe that drives the pins and luckily red threadlocker came to the rescue.
As to keeping the doors open with only parking lights, my 85 did that but the switch in my 87 doesn't allow that so I didn't consider it. Wasn't aware that 87-88 would still do that because I actually missed that feature. Maybe my switch was changed out by the previous owner? Who knows.
As to protecting the relays I ran lots of tests on my bench with long wires running to one assembly as a load with the door in place and determined it should be ok. Long term, we'll see but so far so good the last 6 months. The current surge from the motors can certainly be high but extremely short duration which is why I set the trip point so high; I had some rare trigger events as I increased the value until I got reliable operation. I padded the value a little more to account for cold operation. I didn't use the car during the Snowmaggedon we recently had in TX 😀
I calculated and MEASURED the quiescent current while running from the car battery with both the original module and my design so the battery draining issue is moot. Sleep mode of the Arduino wasn't an issue so I didn't bother.
Having read many of the ogre's posts I'm well aware that he doesn't like anything. I now fully understand 2 Peter 2:16.
|
|
|
WalkerTexan
|
MAR 20, 05:03 PM
|
|
FYI the old Buick Opel GT probably had the simplest popup HL design: cables connected to a console mounted lever. It is said you could identify the owner of an Opel GT by well developed right forearm muscles.
The very first popup headlights were on the Cord 810. They used small cranks on each side of the dashboard. You had to reach all the way to the passenger side to crank open the right one. Glad Pontiac didn't use that approach...except under the hood.[This message has been edited by WalkerTexan (edited 03-20-2021).]
|
|
|
tomsablon
|
MAR 20, 09:17 PM
|
|
|
walker texan, maybe a motor on the little manual knob with an end switch to turn on the headlights when the ignition is on. Get rid of everything else.
|
|
|
WalkerTexan
|
MAR 20, 11:36 PM
|
|
tomsablon, there you go! Or install a couple of reversible cordless power drills...
At least they aren't vacuum operated like the Corvettes of the late 60's and early 70's. Those worked great when they worked and were a nightmare to figure out when a leak occurred.
|
|
|
theogre
|
MAR 21, 12:31 AM
|
|
More people w/o a clue making crap statements... Big surprise... Not. TP post like he's some type of "Expert" yet posted junk programing and an iffy "module" at best. The Big Problem is Many will think is Great and use it and then be looking for Battery Leaches...
I have little care for things can hurt others. In this case killing the battery leaving them stranded and making people replacing an increasing price part of a car. Battery Prices have gone Up Every Year since Obama shutdown last primary lead smelter as Used lead goes up in $ and harder to get. Then add a lot of "scrap" is sold to China and others. Then add U.S. Battery Manufacturing is drying up fast. (Johnson Control Sold battery div then new owner closed many or all of U.S. battery plants.) Then add whatever problems like virus panic as excuse to hike prices more. Just replace a Fiero battery last month and even at WM is pushing $100 for Maxx battery. Most others are well above that for the cheapest batteries w/ little warranty.
I posted in other threads that many could build an Arduino "HL Module" But Not programed or wiring like above and hope battery doesn't die and need replacement often.
Again, Wiring and Programing needs to use Sleep Modes and Interrupts and above Nano wiring can't do that... Proof? Even ignoring Programing, View this and compare the two... His schematic has enough data to show can't just reprogram. Ignore "black boxes" connect to pins 7 8 & 9.
 | | CLICK FOR FULL SIZE |
Ogre notes on Original image from: https://tropicalengineer.com/
Can make this w/ DIP chip on UNO R3 and "burn" it to run on the Internal 8mhz clock. Then plug into Perf board or whatever. That alone saves power, space and wiring vs Nano used above Polling the HL switches constantly. 7805 & ACS712 uses power too but ACS712 can "sleep" under MCU controlling power to them. MCU pins can source ~ 20ma while ACS712 uses 10-13 ma each.
| quote | Originally posted by pmbrunelle: I think that Ogre recognizes those who have gone off the deep end into the world of auto modification... and does not attempt to save those lost souls.
I don't think he has commented in my project thread either. |
|
Yes, There are many threads I ignore. When I need a Horror Show, I'll just watch "The Car" (Apparently is on Netflix this month) or read "Christine" again. King movies stink but most stories and books are OK.
|
|
|
Dennis LaGrua
|
MAR 21, 05:43 AM
|
|
I won't comment on the use of a microcontroller based module for headlight motor control but it should be known that replacement headlight motor control modules have been reproduced and are still available. The Corvette module is exactly the same as the Fieros. As for the Gen 1 motors, you can construct the isolation relay from a std DPDT relay and a few diodes.------------------ " THE BLACK PARALYZER" -87GT 3800SC Series III engine, custom ZZP /Frozen Boost Intercooler setup, 3.4" Pulley, Northstar TB, LS1 MAF, 3" Spintech/Hedman Exhaust, P-log Manifold, Autolite 104's, MSD wires, Custom CAI, 4T65eHD w. custom axles, Champion Radiator, S10 Brake Booster, HP Tuners VCM Suite. "THE COLUSSUS" 87GT - ALL OUT 3.4L Turbocharged engine, Garrett Hybrid Turbo, MSD ign., modified TH125H " ON THE LOOSE WITHOUT THE JUICE "
|
|
|
Tony Santucci
|
MAR 22, 05:07 PM
|
|
Cool project. I'm just a lowly auto tech, so it's way above my paygrade.
Anyone else read the Ogre's posts in a Russian accent?
|
|
|
Tony Santucci
|
MAR 22, 05:21 PM
|
|
| quote | Originally posted by Dennis LaGrua:
I won't comment on the use of a microcontroller based module for headlight motor control but it should be known that replacement headlight motor control modules have been reproduced and are still available. The Corvette module is exactly the same as the Fieros. As for the Gen 1 motors, you can construct the isolation relay from a std DPDT relay and a few diodes.
|
|
Ah yes. The GM parts bin thing. That's why the Fiero was not the car it should have been from day one. GM Execs: "You need to use crap we already have" Fiero Team: "COME ON MAN!"
|
|
|
Chris Eddy
|
MAR 22, 06:53 PM
|
|
Walker Texan, I admire your pinache, we do not have the luxury of making the car showroom original.. and sometimes must make do. I appreciate Ogres' quest for safety.. but as the cars age, there will be more and more compromises until we decide to dip them in amber and put them on the mantle. If you want to keep your work going into the embedded, sleep, and interrupt world, let me know and I will help you.. if you want to keep going, I want to assist. In order to keep things moving at 60 miles per hour, we will have to work together..
|
|
|
WalkerTexan
|
MAR 23, 09:46 PM
|
|
I wasn't going to post anything more on this because, let's face it, any time a egotistical jerk gets involved then any statement just feeds their ego. No way to get anywhere with that kind of jerk. So this will be my last post on the subject. No doubt the ego of the jerk will force another diatribe. If I stated the sky is blue on a sunny day he would HAVE to state that it is really azure. That is the nature of this kind of a__hat. And sad for the rest of us to have to tolerate bad behavior.
I felt it necessary to make this post because some very well-intentioned people have made "offers" to help me with this because they are under the wrong impression that need help with this. I Thank you kindly for your offers but frankly nothing could be farther from the truth. I welcome, and received some very good suggestions, one of which I have implemented as an improvement. The jerk's derogatory remarks consist of not just trashing my design but trashing my abilities and he could not be more wrong. Trashing my software and hardware skills that I suspect leave his in the dust. To be fair I don't know him so who knows, maybe he's really Bill Gates and Steve Wozniak writing together. Trashing me to boost his fragile ego is no excuse.
I stated that I was an expert in Test Equipment design and Root Cause Analysis because it is true. I stated that because that is why I determined the failure of my GM module as caused by the FET. The jerk just used that to make derogatory comments about experts. Sorry, that is uncalled for and incredibly rude and obnoxious. Until now I would never disrespect someone in an open forum and I have always expected the same from others but in this case an a__hat is an a__hat. For all I know he's an expert in something yet I would never disrespect him on his abilities or knowledge...until now. Shame I can't get the same respect.
So, here we go. He vents his spleen, so I can vent mine. If you make it to the end you'll find some good info.
1. Lead acid batteries self-discharge at a minimum rate of 5% per month and quite often 10% or more during severe ambient temperatures and only worsen with age. That's just a fact. The current my original design draws is less than the current drawn from the GM module. The reality is that if you don't DRIVE the car you are ruining the battery. If you aren't driving it on average once a week you are slowly killing the battery anyway and my circuit isn't going to make that any worse. If you are driving it then it is moot. If you disconnect the battery and only drive it once every couple of months you are ruining the battery. If you want to save the battery, drive the car or keep a trickle charger on it. The rest of his argument on the battery/wiring is pointless. Good grief, you do more DAMAGE to the car not driving it because the oil is become more acidic as it sits in the pan than if when driven. Wiring oxidizes worse when NO CURRENT is present; that's been proven by defense contractors/military for years because even a small current moves charges that negate some effects of oxidation even through the insulation which is porous to oxygen. Leaving a circuit unpowered, such as not driving, can affect the wiring more than using it. Contacts are even more susceptible because the wiping action of using switches and relays keeps them cleaner as well as passing current through them. I've done a LOT of HAST tests over the years where the results are different based on whether the unit under test was in operation or not. SO IF YOU WANT TO PROTECT YOUR BATTERY AND CAR THEN DRIVE IT AT LEAST SEVERAL TIMES A MONT. The current of my circuit won't change anything.
2. Polling of the switch in my design causing damage is absolute nonsense. Polling of the signals by the microcontroller is just that; the signals to the micro. The switch is in steady-state and there is a level-shifting buffer transistor between the switch and micro. The circuit isn't applying any current to the switch, the SWITCH is applying current tot he circuit in a steady state because the switch is HOT at ALL TIMES by GM's design. When the switch is in the off position it provides current to the GM module at all times. It is not fluctuating in any way. Polling has not negative outcome because the switch isn't even affected.
3. I could have designed this in many different ways. I have some Microchip 18F series microcontrollers sitting on my desk at a cost of less than $1 each that are more powerful than the AVR based Arduino and draw a tenth of the current. I could have used hall effect sensors from Honeywell that I also have that require 3uA to operate. I could have used an FPGA for this. All of those approaches, while making it very robust and low-power, would drive the cost or complexity above the abilities of many hobbyists. The whole point of this was to provide a simple design so the average Fiero owner could get a module for low cost. My design is easily built for less than $20 because all of the programming tools are free and none of the components are surface mount, like the hall effect sensors. I can solder tiny pitch devices, most hobbyists are nervous about doing that.
4. I didn't use "automobile" grade components simple because it isn't really necessary. The ACS714 is the auto version of the ACS712 yet it is only available in surface mount and I don't know of a cheap module available for it. Maybe there is now, I haven't looked in a while. The point is this design was intended to be in the front compartment where it is a lot cooler than the passenger compartment. Most auto grade components are designed to handle engine bay temperatures which will not be experienced in the front even though the radiator is nearby. The passenger compartment gets hotter because glass lets in light but is actually a reasonably good heat insulator. This lets the interior heat up with sunlight and retains the heat because glass is so good at insulating. The only reason it doesn't work as well as fiberglass is because the glass has to be quite thick to get a similar R factor. Point is, unless your car is black you probably aren't getting temperature anywhere NEAR the limit of the commercial grade parts I used, even in Texas. When it comes to cold, my friend in Minnesota doesn't drive his classic car in snow/ice/frigid temperatures because of road salt and possible damage to wrecks so I assume no one else is really concerned about driving in those conditions with my module design. Hey, if you're in Alaska, feel free to substitute better parts.
5. Claims that the Arduino NANO isn't up to the task is just nonsense. I have a whole suite of Arduinos that I've used on various projects and I like them because they are so easy to use. Most of my projects are for other people who ask me to design something for them and they want to understand it. I personally use Microchip parts for my own stuff and write the code in assembly because I like assembly. This project was an exception.
6. The Arduino NANO is often $5 or less. Hard to beat that. I chose it because people could buy several and not worry about damaging it while learning to use it.
7. The jerk seems to think I don't know anything about sleep modes, interrupts or power strategies. He would be absolutely and incredibly mistaken and I don't appreciate him implying I'm some idiot. Heck, one of my first projects out of college was on a team developing an 8080 based system for low-power management on some military equipment that ran from a small NiCd pack that actually required self-modifying code because large amounts of flash memory were not military specified parts back when the Fiero was first introduced. I KNOW what the hell sleep mode is. And interrupts. And low-power operation. I can also perform Tensor math because of my robotics experience and can convert from Geodetic to Geocentic positioning required for advanced navigation systems because I worked in that industry for decades. I am actually a retired Rocket Scientist where I was developing embedded test hardware, firmware and high-level software so I don't need you trying to "school" me on basic microcontroller technology. Just because you don't like it doesn't make it bad.
Still with me? OK. I was pleased to receive some input on my design and possible improvements despite the fact that mine original design has worked great for months and WITHOUT EVER NEEDING A JUMP START OR CHARGER. I usually drive it one day a week because I have antique plates on it and Texas doesn't allow for it to be my daily driver. I have my Veloster Turbo for that 
Despite his crappy attitude and insults the idea of using an interrupt and power down modes had already occurred to me; I just didn't bother when I saw how much current the GM module used. Interrupts do tend to confuse neophytes, as do things like pointers in C. I went and made a new version that uses an interrupt and places the NANO in low-power mode. Simple mod, mainly because I already had it on the board and just wasn't using it. I made a new version of the code for it.
The interesting comment I received was the idea of using the Headlight switch to power the module and having a delay at turn-off so that the headlights could be lowered. I honestly didn't think about that because I was trying to mimic the GM module. I thought that was a brilliant observation. It took all of a minute to design in my head and another 10 minutes to implement it in hardware and maybe 10 minutes total to modifty the code. Works great. It's in my car now and it draws less than 1mA when the switch is off.
THAT'S what this forum is about! Not trying to humiliate people and push your weight around while proclaiming "I'm just helping because you're so stupid".
OK, so in the repository you will find three versions:
A: My original version which works fine. B: My interrupt and low power version if you want to use it or learn from it for a different project C: My power relay version which I recommend. Can't beat it for low power. Plus it is cool. I forget who suggested it but Kudos to you!
For the record, my designs are protected by the GPL as stated in the Arduino Repository. You may use it or modify it as you wish as long as I am given credit for the original concept and design, including hardware and software. I have been asked if it could be made and sold and my opinion on that is yes if you so desire provided ALL liability for use falls on you as the provider/seller. These designs are provided AS IS and with no warranty either expressed of implied.
Have fun. I won't be reading any more posts on this subject simply because I don't wish to continue the crap that the jerk does. Life is too short. I've rarely posted anyway, just read posts and his have always bothered me because he is so rude and unprofessional.
Thanks for listening, Michael
Here's the link for all three designs
|
|

 |
|