Does anyone know what might of caused this to happen? I can't seem to find a wiring fault it ran for a while then stopped connecting over usb. I'm starting to think my code is hammering it too hard. Any ideas would be great before I blow another board.
Got too hot, going by the apparent raised bump on the device.
I'd suspect the off-screen wiring.
Yeah, probably over-voltage...
Is there anything higher than 5V? Or are there inductors? Inductors (including relay coils) can generate a high-voltage kick-back when they are turned-off.
No... The little brain is normally running at full-speed and when you think it's paused it's usually running Nops (no-operation = do-nothing commands) or otherwise running-fast and doing nothing useful. The exception is if it's sleeping.
So look a lot harder for the wiring fault.
I'm starting to think my code is hammering it too hard.
So you think that code alone can make the processor 'explode' ??????
Must have used the HCF command.
I always thought that the CF happened before the H so I could never understand that instruction.
That wire at or near Vin looks like its has a high VAC rating.
A connection to Vin is not needed if powering the board through USB.
Thanks guys, that's actually it once id pulled it out. No wiring attached. Only 5v running through this part of the circuit, which controls some 5v ->12v mosfet boards and a 5v 4ch relay board. Its designed to power a gauge cluster from an mx5 for a driving sim. It's been working successfully untill this but I'm talking around 2-3 days with new code slowly adding functionality. The gauges are powered by 2 tb6612 motor controllers which ran off the same 5v circuit (motor and logic power). That was probably a bad move but it seemed to run fine.
While messing about with the code and serial input data (activating the modules) the gauges started to stutter. I assumed id just introduced a bug in the code so reverted back. However things only got slower and worse.
At this point I was considering that perhaps the arduino wasn't getting enough power so plugged in a 12v supply to the jack. The system behaved much the same untill it didn't and now we're here...
Part of me thinks DVDdoug is right on this as the issues seemed to start on getting the final relays powered up (They have optocouplers though). I've tested the current draw of the relays and mosfets at 280ma so that should be ok. I don't dare power up the next board with the motor controllers attached in case I repeat the frying process.
So Relays?, Motor? Or Power Supply? Maybe the 12v in the cluster grounds through the gauges? Its a real mystery at the moment. Especially as it ran happily for some time.
I know its crazy to suggest the code but it was seemingly so closely linked to updates being made. It was getting continuous serial data for commands.
you still haven't addressed what is plugged into which pin on the arduino mega.
My thoughts is that he "accidentally" bled some 12V to the mcu and fried it. That bump does not look healthy.
One of my Arduino Due mysteriously died as the voltage regulator seem to have been fried (?). How it did that, I don't know. I might try and power it via external 3v3 regulator.
Oh sure,
Gauges pwm (2xtb6612) are 4,5 and 10,11
Directional pins 34,35,36,37 and 38,39,40,41
Mosfets are a mixture of digital and pwm 4 pwm and 8 digital 6,7,8,9 and 22-29.
Relays are on 30-33
I can run the motors on 12v so i feel i may as well, worth a power up without the supply connected to monitor them i guess and see if any voltage bleeds through.
directional pins?
relays?
You are using external boards. Mind if you take picture of them?
I feel like it's the mofet board.
Make a proper schematic and post it here. People will give suggestions on stuff like separating the power supplies for the motors, relays etc., protecting Arduino pins and whathaveyou.
For now, there's enough that might have gone wrong given the nature of the components you've mentioned.
Yeah fair point, I'll get a schematic drawn up tomorrow and post it for now heres the components:
2x Motor contoroller
https://www.ebay.co.uk/itm/Adafruit-2448-TB6612-1-2A-DC-Stepper-Solenoid-Motor-Driver-Breakout-Board-/124948951266?mkcid=16&mkevt=1&_trksid=p2349624.m46890.l6249&mkrid=710-127635-2958-0
4x Mosfet
Youmile 2PACK 4 Channel MOSFET Module Four Channel 4 Route MOSFET Button IRF540 V2.0 + MOSFET Switch Module for Arduino DC Motor Drive Dimmer Relay Board https://www.amazon.co.uk/dp/B07YDFJT93/ref=cm_sw_r_apan_i_2EV27Z4F60687ZT54V8E?_encoding=UTF8&psc=1
1x Relay board
(In next post due to limits)
kwmobile 4 Channel Relay Module - 5V Relay Board for Arduino Raspberry Pi with Optocoupler - Pack of 3 https://www.amazon.co.uk/dp/B01H2D2RXA/ref=cm_sw_r_apan_i_DZREJG1ASMHEM0JHMA4X?_encoding=UTF8&psc=1
12v overheated the tiny 7805 linear regulator on the card allowing full voltage into the Arduino IO's and that, as they say, was that.
Sounds likely which card do you mean?
You mean on the arduino when i plugged the 12v supply in?
Or back feeding through the gauge?
Adafruit 2448, TB6612.
However it shouldn't since it have separate driver and logic voltages. And the little MOSFET is there for reverse-polarity protection, if you have read the datasheet ...
HOWEVER, if you mess up the connection, heh heh heh ...
But then again, you only used 5V so there should be no proble....
If you set a pin as output and feed 5V in to it, the pin will sink as much current as the internal FET allows it to (and rapidly overheat and breakdown).
Supplying is slightly different. If you set a pin as output and ground it, the internal FET will try to deliver as much current as possible (while also overheats and potentially breakdown)
Also, there is a "peak power output" of entire packages (e.g. the Mega) and if you exceed this value you might damage internal power rails. I feel like you might have broke one/two by driving the relays or some other stuff.
Looking at the picture (of the mega) it seems like you have fried maybe the pin 30-40 (extended digital header). What you refer to as "direction pins" are worth questioning.
What are they?
Also the MOSFET board. I am having massive question over how does it achieve voltage isolation (sort of) and what is the IC in the middle doing
The relay shield looks really nice.
Stuff
I can't understand why these power components keep getting smaller and smaller. There's no way it will NOT go to 100 degrees when driving a motor it's like just asking for trouble.
In a professional environment you sort of ... just .. don't. You will go buy H-bridge of various size power and voltage ratings and you hook them to one or maybe two microcontroller.
In fairness i was also concerned/intrigued about the mosfet boards but tested them first and they seemed not to cause issues. The tb6612s I've used on projects with actual motors at 7-12v with no issues but this is a bit of a different setup.
The direction pins i reference go to the ain pins on the tb6612 and control the direction. The speed is controlled by the pwm pin. Now whats different here is the motor.
Air core gauges dont operate the same way. Its almost like a stepper motor in that engaging each "step" moves the gauge a quarter turn.
You then reduce the voltage to get the positions between. Its a push/pull from the coils using cosines to get that to a linear value (speed/rpm) .
I wonder if having this driven the same 5v is causing the issue or the motor controllers cant do this constantly fail and kick out more voltage down the logic pins. So do i just chuck some bigger motor controllers at it or would running them at 12v reduce the current and hopefully the prospect of failure?
I dont know if they are 12v or 5v however on testing they ran on both with less whine at 5v