Gregg - I tried setting CURRENT_SAMPLE_MAX to as low as 10 and CURRENT_SAMPLE_SMOOTHING up to .05. The hardware protection in the shield is still what kicks in when I do the "quarter test". I found this in the Features section of the Pololu user guide: "Output short-to-ground and short-to-Vcc protection" as well as "Over-current limiting via internal PWM". With the settings back to their original values I also tried simulating running into a reverse loop and the hardware protection kicked in before the software. I don't have an auto-reverser to test but I suspect the hardware protection might kick in faster than an AR. I may be able to borrow an AR from the club this weekend and test that theory.
Is there any thought of adding support for a 16x2 LCD shield? I imagine this would probably require trimming some pins and wiring jumpers from other ports on a Mega. With that, a potentiometer, and a keypad, it seems it could be a complete compact standalone solution. Also, on eBay, I'm seeing small WiFi boards (not full shields, but things along these lines: http://www.ebay.com/itm/2Pcs-ESP826...914863?hash=item487237f3ef:g:zmoAAOSwAL9Uhqjb ). Would something like this be usable for the WiThrottle WiFi connection, or is a full WiFi shield the best option? Also, with the Engine Driver app, I don't think there is any way to program. Would this be compensated for somehow, or would one have to plug into a computer to program decoders? It's OK if I'm way off on this stuff, I'm just trying to figure this stuff out, and getting ready to order parts soon! Andrew
Hmm... this could be a different problem. With a CURRENT_SAMPLE_MAX of only 10, the system should turn off as soon as you operate a train. Can you verify that the system is actually reading the current correctly? Issuing a <c> command should return the main track current in the form <a CURRENT>. Issue it a few times without a train on the tracks and then again while a train is running. There should be a noticeable difference. If not, this implies the current is not being read properly. If it does appear to be working, then I guess the Pololu must have a really sensitive short-circuit detection mechanism (and I'll need to add some code to read the SF signal to monitor for a short in the software --- first need to figure out the best pin to map it to, and will probably implement using a hardware interrupt driven by that pin going low).
I would expect the small WiFi boards are usable.... they're just harder to hook up. The nice thing about a Shield is the way it just snaps on.
Last few lines of the listing.....may or may not be a issue..... Connect RX or TX on 5V Arduino will destroy this module. You must use a logic level converter, or a 3.3V Arduino The 3.3V supply on the Arduino Uno has inadequate current capability to power this module. You must provide a separate, higher 3.3V supply(about 300mA or better) The ESP8225 module is very new on the market and support and documentation for it is currently very limited. Kevin
That's the wrong part number its a ESP-8266 the link was for a older version -05 . Look for ESP-8266-12 version -12 they are common, you can get a 3.3v to 5v bi directional level converter for around $2 US the Arduino's do not have enough power to run them at 3.3v so i would suggest a dc -dc buck converter to power it. There is tons of documentation for them if you search for the right part number. Or you can get the shield version that has done all that for you. http://www.ebay.com/itm/ESP8266-ESP...143422?hash=item1c5ced5abe:g:kiwAAOSwiwVWTHMw
When I was doing the "quarter test" I did not have a train on the track. I don't know that the software is reading the current correctly, but previously I had checked out the current monitor that TwinDad included in the JMRI interface and saw it register a change when I really ramped up the speed on a loco. Note that I am running HO which is why I opted for the Pololu. Ultimately I am attempting to build a 5amp base station. Also note that I am using a 19.5vdc power supply. The track voltage I read coming from my small Bachmann system is 18.1v. I can try a 15vdc supply instead if you think that would have an impact. Life is going to be in the way of further testing for a day or two. I will report back as soon as I can.
So am I correct in understanding this shield can run off power from the Arduino without an external supply, or does it still need some power supply? Andrew
Nice to know the JMRI current monitor "works". I still need to make sure I'm representing the value returned correctly. I don't know whether it is some absolute number (millivolts? milliamps?), or a % of full scale thing, or what... if it is a % of full scale, then I will need a way to set the meaning of "full scale" so that the output value is meaningful (or just show it as a %, I guess). How is the value returned by the <a CURRENT> response to be interpreted?
Quick update on the DCC++ specific driver/interface shield. First prototype boards have been ordered. I expect them in about a week and then I can build and test them. If all goes well, I'll send one to Gregg and one to TwinDad to test on their setups. Once I get a green light from them, I'll look into producing a limited run of boards initially. Unless I get a big demand, then I'll probably do a pre-order and then base my numbers on how many orders come in about a week's time. I have not set price yet. I won't be able to compete with the cheap driver boards on eBay, but this will be specific to DCC++. Labeled terminal blocks for power, main track, programming track and eight (8) I/O control pins. I have also added on the requested on-board voltage regulator, eliminating the need for USB and external power to the system. With the on-board regulator, you'll only need to supply external voltage. USB power will only be present if you need to be connected to a computer for JMRI/Controller. There are also jumpers for configuring the board for an Uno or Mega. No more jumper wires, cutting traces, ect. This is meant to be a true plug n' play shield for DCC++. Here is what the final board will be:
Nice, Is it possible to have a separate circuit breaker logic set on either the board or through the DCCpp program so that when a short happens on either the Main or Prog track that it not shut off the power to the other track? And then after xx seconds automatically test, reset and run so that if the short was an anomaly the power would continue? Or should we leave that to separate in line off the self circuit breaker kit available now in stores.... Thanks, Kevin
Jason, that looks great! I'm looking forward to playing with it. Not sure if I asked before, but what is the current limit on the 5V regulator? Will it be enough to also run a WiFi shield?
Friends, Today arrive my Polulo Dual MC33926 Motor Driver Shield for Arduino. Any specific instruction to assembly it for DCC++? Is it possible someone place one photo of this assembled shield on this forum? Regards
I think the document on Gregg's github site is wonderfully clear when it comes to the physical wiring. The last two diagrams are for the Pololu - one if you are using an Uno and the other if you are using a Mega. You also have to adjust the DCC++ code for the Pololu - see w8one's Wiki page, step 16.
It appears in the pic's to have it own voltage regulator onboard, and it is a shield for the Arduino UNO.
A question for the gurus, my first 5 Megas, 2 Pololus and a Huzzah C3300 WiFi shield arrived. In addition to the nice headers that mikegillow installed is there anything special that I need to be aware of? Planning JMRI/USB to the Mega with WiThrottle direct thru WiFi Huzzah. Second Pololu further down the network for additional power districts. Will build this network one board at a time. The learning curve is starting to ramp up! Dave
Thanks! The regulator I picked out is 9V at 1A. There is also an 800 mA variant, but as long as I can source the 1A part, I'll use that. The cost difference was negligible.
Based one what Gregg has told me about DCC++ monitoring the current lines of the drivers, I'm going to assume letting DCC++ handle this is the best method. Of course, you can always add off-board protection for additional caution.
Guys, The Polulo Dual MC33926 Motor Driver Shield came with problem. One output did not pass on test. No leds on with <1> input, and also they did not blink with <D> input. The other side is OK. I will try to send back to Polulo. Some mistake on this assembly , I will thanks a lot. Regards.