lesthegrngo Posted December 29, 2019 Share Posted December 29, 2019 (edited) 0Well, it certainly keeps you entertained, building these cockpits... I got Helios and MonitorSetup Lua working, so now am going back and getting all the gauges that I made connected up. They all worked fine, but now, even though they all have identical wiring, some are now running backwards! The PCB's have the wiring etched on so I know they are not the issue Is there any way to make the gauge work in a reverse direction? Cheers Edited December 29, 2019 by lesthegrngo Link to comment Share on other sites More sharing options...
CraigS Posted December 29, 2019 Share Posted December 29, 2019 Hi Les, at the point where the wiring connects from the stepper into the easy driver board you could try swapping motor A and B round. I had to do this recently on gauges that ran anticlockwise as opposed to the more common clockwise. Sent from my SM-N975F using Tapatalk Link to comment Share on other sites More sharing options...
lesthegrngo Posted December 29, 2019 Author Share Posted December 29, 2019 Thanks Craig, but that's where I don't understand what's happened - the gauges were soldered to the PCB. I have two identical PDB's an on one of them illogically the EGT gauges turn the wrong way, even though everything in the sketch is the same as the rest bar the parameter specific details. I'm really mystified at how that occurred Cheers Link to comment Share on other sites More sharing options...
draken152 Posted December 29, 2019 Share Posted December 29, 2019 You have soldered the stepper motors to easy drivers???? If yes try to swap 0 and 65535 values in your arduino code AccelStepper stepper(AccelStepper::DRIVER, 4, 5); // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper IAS(0x344e, stepper, stepperConfig2, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, [color="Red"]0[/color], [color="red"]65535[/color], 0, stepperConfig2.maxSteps-1); [sIGPIC][/sIGPIC] Building FW190D pit ,,To Dora with love" http://forums.eagle.ru/showthread.php?t=132743 Link to comment Share on other sites More sharing options...
lesthegrngo Posted December 29, 2019 Author Share Posted December 29, 2019 (edited) Great, thanks - that did the trick. I'm suspecting that this is actually a problem with the EasyDriver boards. Since this afternoon, some that were working earlier have stopped, a couple seem to behave randomly and some seem to be more reliable. Sketches that work on one don't work on others Have a look at the original post where I erroneously posted the pictures - they are the PCB's where the Nanos, RX487 chips and EasyDrivers go. You can see they fit into predetermined sockets, all the same, and the stepper motors are soldered to the appropriate locations on the PCB's. In theory it is foolproof, but I believe that the EasyDrivers don't handle being powered up and down very well. They have a dedicated 12v supply. I have cooked a load of EasyDrivers in the past where a momentary disconnect or incautious connection has instantly ruined them. I think I will research some more robust stepper drivers, maybe the type used with CNC routers. They certainly can't be any more tricky than EasyDrivers, which seem very intolerant of any imperfection Cheers Les Edited December 29, 2019 by lesthegrngo Link to comment Share on other sites More sharing options...
lesthegrngo Posted December 31, 2019 Author Share Posted December 31, 2019 (edited) Well, here I am again after an enormously frustrating day. I finally had all 12 engine gauges working on the RS485 network, after swapping the EasyDriver boards the gauges started running the correct way, swapped a duff Nano that must have a cracked joint somewhere and was feeling pretty pleased with myself. Then it just stopped working. When you power up the gauges all do the zeroing thing, the green lights on the Nanos go on... and then nothing. I can see the TX light flashing on the Mega, but the lights on the Nanos are just a steady bright green and the gauges totally immobile. Swapped all the Max487 chips. Nothing. Swapped the Mega board... nothing. Restarted the PC.... nothing. Stripped out all the Nanos, EasyDrivers and Max487 chips bar one... nothing. The Nanos and EasyDrivers all work, I tested them using a USB sketch with the Max487 chip removed. The really frustrating point is, at one time I had everything working together perfectly, then without actually changing anything, it all stopped. Fine, if one part stopped working I could understand it, but I have swapped and tested all the parts individually that I can easily test and on their own, each works. The bits I can't check I swapped for new. I am so, so sick of how fickle this RS285 network is to set up and keep running. If it was due to poor workmanship on my part in terms of designing and building the circuits, I am at a loss how it could all work at all. After all, it is simply bits soldered together, and if it was wrong it simply wouldn't work. If it was a dry joint it would work intermittently. DSC BIOS still appears to be communicating with the Mega. It certainly communicates with the USB versions of the same sketches (and ALL the sketches were working, USB and RS285). I've tried different USB ports... nothing. Sometimes some Nano green lights go on but others don't. Sometimes they flash quickly for a few seconds ... it's the inconsistency that drives me nuts. I read and re-read Hans' great posts to try and give me some idea of what is happening, but I keep coming back to one cardinal point - it was all working! I have a shield I made for the Mega that plugs in via pin headers directly to the Mega 5V pin, GND pin, pin 2, TX pin and RX pin, and it has the master Max 487 chip (in a socket so I can swap easily for troubleshooting) which then outputs to four pin headers that take VCC / A / B / GND to the other devices. the only wires are the USB cable, the four way wire mentioned above and the 12v supply to the Stepper drivers. The Max487 chips are sited in sockets on the boards that have headers that match the pins for the Nanos and EasyDrivers (photo in first post) so are (virtually) impossible to mis-wire, and the VCC / A / B / GND supply to each Nano and Max487 chip is all via PCB tracks. It essentially a solid state circuit board, all the components plug directly in, there is no movement, no wires. I have to keep trying because I have invested so much time and effort into this. The rest of the rig is looking really great, if I do say so myself, and I have overcome some prodigious hurdles to get this far. But truth be told, there must be a more reliable way of making this work Les Edited December 31, 2019 by lesthegrngo Link to comment Share on other sites More sharing options...
Recommended Posts