Тёмный

Teaching Feeders To Speak RS-485! 

Stephen Hawes
Подписаться 50 тыс.
Просмотров 22 тыс.
50% 1

With some firmware updates and a new feeder floor, we've got the feeders talking to the motherboard over RS-485! They're set receive commands all gosh-darn day long. Thank goodness for electrical standards.
Thank you so much to PCBWay for sponsoring this video!
www.pcbway.com/project/member...
Check out my Patreon!
/ stephenhawes
Join the STR Discord Server!:
discordapp.com/invite/TCwy6De
Index Pick and Place Github Repo:
github.com/sphawes/index
These are all the tools I use:
kit.co/stephentherobot/my-mak...
Follow:
Twitch bit.ly/32q4pDG
Instagram bit.ly/2FrreOJ
Twitter bit.ly/2FArY3G

Наука

Опубликовано:

 

13 ноя 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 203   
@fpvcoder9200
@fpvcoder9200 3 года назад
You can use dip switches. Probably the easiest and quickest.
@hoppelx
@hoppelx 3 года назад
but... LEDs....
@TheRadProd
@TheRadProd 3 года назад
I had the same idea!
@jdwg5
@jdwg5 3 года назад
That's exactly what I was thinking!
@ushiocheng
@ushiocheng 3 года назад
Also can use solder joints (those solder pads that is intentionally close so you can bridge it use a drop of solder) ~no cost, reliable, etc.
@iakanoe
@iakanoe 3 года назад
I immediately thought of that
@canadianavenger
@canadianavenger 3 года назад
You almost got the RS485 signalling explanation correct. The voltages are never the same, it is a differential signal. If you measure across the two outputs, one line is always positive and the other is always negative, you will never read 0 across the two outputs unless the driver is disabled. To communicate, they just swap their relative states depending on if it's a 1 or a 0 being sent, effectively creating an AC signal.
@shaunmoneil
@shaunmoneil 3 года назад
That's what I came here for! Mark is a>b, space is a
@blakecarpenter9069
@blakecarpenter9069 3 года назад
Don't worry too much about resistor strapping. It is a time honored method. Use 1% resistors. They are not a big cost adder at all. On your ADC reading - do a 256 x oversample average and between that and 1% resistors - there is no issue there for 32 channels. Dip Switches are also pretty prevalent out there if a bit kludgy and IO intensive. More IO = more wire = more connections that will fail. Bottom line is you already have a working method that can be improved in software and with 1% resistors so why reinvent the wheel :) Nice work as usual.
@dannyarnold9823
@dannyarnold9823 3 года назад
I second that 1% is the easiest answer but you would be best to add temperature compensation by adding a reference thermometer.
@petermuller608
@petermuller608 3 года назад
But they either add a huge number of different components to your bom or you need quite a lot of space to be able to combine resistors
@jirkasvitil2762
@jirkasvitil2762 2 года назад
@@dannyarnold9823 i don't think that this will have any significant effect on voltage divider. Keep in mind that he is creating voltage divider and temperature is affecting both resistors. Only thing important is the difference in resistance between the resistors not the acctual value
@mikeselectricstuff
@mikeselectricstuff 3 года назад
Don't over-think the protocol - all you need to tell it is to feed and how many units of 2mm ( 0402s and smaller have 2 parts per index). This makes decoding trivial, and you don't need to worry about frame synchronisation. One thing to bear in mind is that all the other feeders will see any reply bytes as it's a shared bus. I'd suggest , where always has bit 7 clear and , always has bit 7 set. this makes decoding trivial with no need fo framing timeouts. would be a special value for status returns, so other feeders don't respond, and return values always have bit 7 set. Probably easiest to always return a status byte to simplify things. You don't generally need to know when the feed has completed, so you can return status immediately rather than waiting for the feed to finish, but you probably also want a null command that returns a status telling you if it's still moving, e.g. for manual indexing & setup.
@badesalz0815
@badesalz0815 3 года назад
Or, as an alternative, just use Modbus RTU with some opensource implementation? Sure, lots of processing overhead, but speed should not be an issue in this case. Could be an easy way out?
@petermuller608
@petermuller608 3 года назад
Why wouldn't you need to know when the feed is completed? You can pick up the part only after the feed is done
@simonbaxter8001
@simonbaxter8001 2 года назад
@@petermuller608 Totally agree. In a control system you need to know when the command has been 'actioned', not just when it has been 'received'.
@Kawka1122
@Kawka1122 2 года назад
@@petermuller608 it can know it by use of SCIENCE!
@asronome
@asronome 2 года назад
You could use the chaining as the addressing system: each feeder passes the message on to the next but decrements the ID by 1. If it receives ID 0 it feeds. That way you don't have to set addresses at all, they are just based on the order they are chained in
@bouni8506
@bouni8506 3 года назад
Use DS2411 (OneWire ID chip) ! They are in a SOT-23 package, they are cheep and you need just one pin of the connector to get the their ID
@petermuller608
@petermuller608 3 года назад
Those are _really_ expensive since they are used for DRM. An EEPROM would me much cheaper. He could even add an MCU to each slot (not just feeder) and it would still be cheaper :D
@electronerd
@electronerd 3 года назад
@@petermuller608 Not *that* expensive, $1.32 in single quantities at Mouser
@petermuller608
@petermuller608 3 года назад
@@electronerd that's quite expensive ;) eeproms cost USD ~0,1 and ARM MCUs cost USD ~0,9, also in single quantities. Nevertheless you are not wrong. You won't have hundreds of feeders so the price difference does not matter that much in the end
@electronerd
@electronerd 3 года назад
@@petermuller608 Yeah I guess it depends a lot on how many you're building whether $1 is a lot or a little
@RussellNelson
@RussellNelson 2 года назад
@@electronerd Yes, they are expensive AND nice because they have the globally unique ID you need.
@martylawson1638
@martylawson1638 3 года назад
For auto-ID you can run a wire "north" and "south" to the adjacent feeders with the feeders on the end looped back to the controller. To ID the controller holds one of it's North ID pin high. One feeder will see it's South pin go high, that is feeder 0 and it sends a serial message that says "I'm feeder 0" before pulling it's North pin high which triggers the next feeder to say "I'm feeder 1" and so on. When the controller see's it's south pin go high, every feeder has reported in. This does require dummy jumpers in every empty slot. Alternatively, you can get hexadecimal rotary switches that will give you a 4-bit binary number depending on rotation. 2 of them gives an easy to set 256 entry address space.
@Graham_Wideman
@Graham_Wideman 3 года назад
Along with identifying which slot is occupied by which feeder, it would be good to have a way to associate an id to each feeder, and the component type to the feeder. That way, when you load up feeders they don't need to go into the same slots as previously. You would even be able to PnP boards with more different components than you have feeder slots for, that require swapping feeders in and out, without worrying about accidentally loading the wrong components into the wrong slot. You might even create a separate single-slot "prep station" with your "floor" connector and a barcode reader to read the barcode off the component reel, and program that info into the feeder.
@wesleymays1931
@wesleymays1931 3 года назад
The reason for the fifth pin on the feeder floor makes sense now: An ID for each feeder
@claudiu7909
@claudiu7909 3 года назад
I think reading the id from the connector board instead of setting the individual address of the feeder is the better approach. Less hassle when inserting new feeders or changing them. As other people said, you can use 1% resistors and they should be precise enough. Also, I just had an idea. You could also place a capacitors on some boards. Have a voltage divider and a capacitor to GND. If you pull the line low and than measure the voltage, you should see the voltage raising fast (if no cap) or slow (with cap). This way you can identify the board that have a cap and those that don't. If you use the presence of the cap as part of the address, you can get away with only 16 voltage dividers.
@RussellNelson
@RussellNelson 2 года назад
This is a year and a half ago, but the easiest way to enumerate devices in a chain is to have them echo the RS-485 signal down the line. When they receive the first command ("Identify Yourself"), they send something back to the controller, and mark themselves as #1. When they receive the next command, if it's not addressed to #1, just echo it to the next device in the chain.
@LucasHartmann
@LucasHartmann 3 года назад
With no changes on feeder or motherboard, but an extra wire on the daisy chain: Have one resistor connected to the left slot and a pull up, feeder analog pin to the center. Ground the "left" resistor on the first slot. The lowest analog voltage is first slot. Make the identified analog pin output ground, then the second slot will have the lowest voltage. Repeat.
@crazor01
@crazor01 3 года назад
Great idea!
@ikocheratcr
@ikocheratcr 3 года назад
Very good idea. Makes all modules the same, and no changes in the current feeder.
@UntrackedEndorphins
@UntrackedEndorphins 3 года назад
Hey I have a few comments to help you on the next revision, I worked on something similar where I used RS485 for communication and needed addressing as well. For the addresses I used a 5 dip switch and read it as a binary (1, 2, 4, 8, 16) input, which gave me 32 addresses and worked great. Another thing is RS485 needs termination resistors, so at the end (and sometimes beginning) of the chain it's recommendable to put a 120 ohm resistor in parallel to A & B. Putting a resistor on each RS485 transceiver will usually overload the circuit causing errors, so it is not recommended.
@TehTub
@TehTub 3 года назад
Not gonna lie. Watching you progress through this project is awesome. Keep it up.
@olivervoss3196
@olivervoss3196 3 года назад
Literally every time I get a notification that you uploaded a new video, I drop everything I'm doing rn and watch your video with the same enthusiasm as you bring to the game Thank you so much for being as you are and enlightening my day ^^
@Stinktierchen
@Stinktierchen 2 года назад
I love doing stuff myself too... this project looks like you have never left this room for ages to accomplish that task.. daaammn Respect
@CandyGramForMongo_
@CandyGramForMongo_ 3 года назад
So you have implemented 60’s digital communication. I love it!
@AnthonyClay
@AnthonyClay 3 года назад
FYI, encoding the position into the slot itself is (imo) always the most elegant solution. Makes the feeders themselves cheaper, meaning you can have more of them. Not having to program a slot manually means less room for human error, which is a primary goal (or should be) of any automation/machine design.
@davidosterberg
@davidosterberg 3 года назад
Can’t believe you “only” have 16k subscribers. Don’t get me wrong 16k is a lot of people. But I think you deserve so much more. Oh well, it will come.
@goodi2k7
@goodi2k7 3 года назад
How it's usually done in the industry is that every feeder has a unique ID. That way you can plug it into any slot in the pick and place and the machine can figure out from which slot to get the correct part. Sometimes there is even all necessary information about the part stored on the feeder itself so you can just use the same feeder on different machines without any additional setup.
@NavinF
@NavinF 3 года назад
Those machines likely have a separate serial connection from the controller to each feeder. He does not. All his feeder IO pins are electrically in parallel. That's why he needs the feeder to know what slot it's in
@DEADB33F
@DEADB33F 3 года назад
If the edge connector were double-sided then you'd have five extra pins which could carry the slot address allowing 32 slots (technically 64, as you also have one spare pin on the other side as well). I do like the idea of not having to set the slot address on the feeder itself though. Having the feeder know where it is automatically is infinitely 'cooler'. --- Even if using resistors & voltage dividers won't allow for 32 feeders it should still work for a smaller number of feeders no problems.... If you have enough IO on your mainboard then I guess you could have multiple RS485 interfaces, then each bank of feeders would connect to a different interface (eg. 16 feeders on each side of the machine, each bank talking to the mainboard on a separate RS485 bus).
@PolarisLP
@PolarisLP 3 года назад
If you want to reduce the ID stuff to just 1 pin you could send a square wave signal to the first board e.g. 100khz and device it by 2 on every boatd. The feeder can easily measure that and detect its position. You can use a simple D Flip Flop to devide by 2.
@martylawson1638
@martylawson1638 3 года назад
Nice, this is simple enough to put on the connector board in place of the resistor divider. There are some tiny single gate SOT-6 logic chips that would be perfect for this. Digikey 296-9851-1-ND or 1727-6019-1-ND for example.
@ikocheratcr
@ikocheratcr 3 года назад
This frequency stuff will not fly. If the first node receives a 100kHz signal, and output a divided by 2 one (50kHz), then the last node will get a 100kHz/(2^31) signal, ie 0.0465 Hz, Identification will take too much time ~21s. This idea could work for
@martylawson1638
@martylawson1638 3 года назад
@@ikocheratcr Good point. The chips I linked would be happy with a signal well into the MHz range, but you're still waiting for 2^31 cycles. which will be a several minute period for the last feeder. A 3/4 or 4/5 divider would help a lot, but also balloon the circuit complexity. Could do two chains of 16 using frequencies that divide distinctly. ( i.e. 66KHz and 100KHz) Wonder how simple a pulse eating circuit can be made? (i.e. send out 32 pulses, and each feeder gets one less pulse as the boards eat the first pulse they see)
@alexandrubabaian8364
@alexandrubabaian8364 3 года назад
Nice project. The thing with assigning IDs can be done in a little different way. You can assing ID's from the master node. You can send on a bus messages like "If you don't have an ID yet, then your ID is 1. Save it in nonvolatile memory." Slave responds "OK, done. I have ID 1" Then master sends the next message "If you don't have an ID, then your ID is 2. Save it in nonvolatile memory" Anyhow you will install the feeders sequentially and there is no time when you install at the same time 2 non initialized feeders. Therefore each feeder will get the next address assigned by master. If you don't like to rely on power on reset as a condition to read the ID, then you can assign the next ID's based on the sensors combination. For example "Whoeven on the bus has the button 1 pressed - save ID 1 ". In such a way you would just have to install all feeders and then go once on each feeder and press "button 1" to assign it the next address generated by master. This solution would allow you quite easyly to add new nodes even dynamically.
@macbirdie
@macbirdie 3 года назад
Lead instrument's notes in the background music synced perfectly with the LEDs lighting up at 8:42. 🤯
@bjarkeistruppedersen8213
@bjarkeistruppedersen8213 3 года назад
May I suggest two small 7 segment displays on the feeder to show which position it has detected it is inserted into. Would be handy both for troubleshooting and for locating a specific feeder.
@randycarter2001
@randycarter2001 3 года назад
My plan was to put a $3, 0.91" OLED display on the feeder. 4 push buttons and the feeder now has a UI. Much more functionality for setting variables like sprocket holes per part, fine tuning the stop position, setting address etc.
@petermuller608
@petermuller608 3 года назад
That does add quite a lot of complexity to the feeder. If you need to configure it I would use EEPROM on the feeder. You already have SWD anyway
@randycarter2001
@randycarter2001 3 года назад
@@petermuller608 Having a UI for setting up the feeder allows setting parameters on the fly without having a separate PC. All you need is a spare power source, no programing adapter, no programing software, no 2nd PC, etc. Just put the tape in hit a few buttons and you're done.
@Roobotics
@Roobotics 3 года назад
If you stay with analog ID's, something interesting you could do, is stack all the feeders in series somehow with a termination point, then if they all use the same resistance it would ratio out automagically. Using 3 feeders as an example, it would stack three 10k resistances in series, then divide that out across the voltage range for ADC stuff. Adding a feeder and setting the termination points would change the ratio. Some more thought needs to be put into this, but I think it has some merit in not requiring any manual address fiddling. Else the dip switch idea is pretty solid.
@uint16_t
@uint16_t 3 года назад
Love your enthusiasm and cheerful excitement!! Also your video got great production and educational value.
@bytesizedengineering
@bytesizedengineering 3 года назад
Looking awesome! Great job Stephen!
@makingwithsteve
@makingwithsteve 3 года назад
Have to say that watching your videos makes me want to learn electronics. I have no idea how to do any of what you've done in this pick and place series but good lord is your enthusiasm addictive and motivating. Keep up the good work!
@OM222O
@OM222O 3 года назад
I might be late to this but simplest solution would be using a shift register. If you have lets say 32 feeders, you need a 32 bit shif register that has a single active bit. You start at position 1, send a command over RS-485 containing the ID which is 1 here. The feeder that sees the active bit, takes up that ID. Then you shift the active bit to position 2 and then you send the ID (2) over serial again. Let me know if the description is not clear or if you want to get in touch to discuss this.
@justaddjeff1988
@justaddjeff1988 2 года назад
Gold star for using RS485.
@juliankandlhofer7553
@juliankandlhofer7553 3 года назад
I've just recently come across your channel and I have to say that I'm really excited about what you are doing. I would use dip switches either on the feeder floor or on the feeders themselves. much more reliable than using an analog voltage. also makes it much easier to see and adjust the adresses if needed. Some suggestions for the communication protocol: * add a protocol version. that way you could have multiple versions of the feeders installed without having to change the firmware on the motherboard every time. the feeder could send a little hello message with its version number so that the motherboard can detect what features it supports if you expand that in the future. * maybe add a confirmation response once the feeder is done moving the tape so that the pnp doesn't try to pick up a part if the feeder isn't done moving yet. love what you do. keep it up 👍👍
@RussellNelson
@RussellNelson 2 года назад
No dip switches. Never.
@juliankandlhofer7553
@juliankandlhofer7553 2 года назад
@@RussellNelson why? Genuinely curious
@RussellNelson
@RussellNelson 2 года назад
@@juliankandlhofer7553 First, because they are a pain to set. If they aren't a pain to set, then they're easy to change. Second, because you only need to make one misteak once and you've lost whenever you might have saved by using DIP switches rather than a programmatic id scheme which will *always* set a unique id. For example, he has a sensor on the wheel, right? So when you get everything connected, just go down the row spinning the wheel a bit. OR have a bit of software which goes through the BOM and tells you to twiddle the wheel a bit for each part. Then the system not only has put a unique id on each feeder, but it also knows which part is in which feeder.
@staticinteger
@staticinteger 3 года назад
So epic! This is coming along nicely!!!
@ushiocheng
@ushiocheng 3 года назад
just add solder joints (those solder pads that is intentionally close so you can bridge it use a drop of solder) to the connector PCB, which means 1. you just need to label the connector board to not mess things up and 2. the mainboard can automatically recognize which slot the feeder is in now. Also, another idea is to make the feeder send out a "info" package so that the mainboard does not only know which slot it is in but also knows what component is in it. "info": {"slot": 0xA, "componentID":"0BA09974-A295-48E6-88AA-E55757EFE139"} and you can connect this uid with a component and its info in a database or something and when you change what component is in a feeder, you can make some small contraption for it, that should be quick, maybe feeder can receive a RS-485 package telling it to change its component id
@shivam000
@shivam000 3 года назад
my excitement is also same when something works the way you expect it to be.
@gestaltlabart
@gestaltlabart 3 года назад
identify via shifting ... each feeder gets a data in and a data-out port, you put in a bunch of signals, every feeder drops one impulse and chains the others trough, -> count of signals is id. and consider modbus rtu as protocol
@DEADB33F
@DEADB33F 3 года назад
That doesn't work if not all consecutive slots are occupied though.
@akhileshkumar8753
@akhileshkumar8753 3 года назад
Awesome work ☺️👌 All best buddy 🤩🎉🎉🎉
@ogurezzz
@ogurezzz 3 года назад
And again... SPI DaisyChain will always give you exact feeder positions based on number of bit. ;) Also it is possible to make firmware to know what max number of feeders you made for your PnP (scalable design)
@jimamos8960
@jimamos8960 3 года назад
Late to view this... more great work, Stephen! After reading all the commentary I'm leaning where most others are leaning with the DIP-switch-based ID scheme. Unsure where you upper-end would be with address limits, but minimum 5-bit me thinks. The "daisy-chained-relative" voltage suggestion with the additional bus wire was also a slick potential solution. Looking forward to your next update!!
@AlexMadinger
@AlexMadinger 3 года назад
Great frickn work!!
@RomanShteringarts
@RomanShteringarts 3 года назад
Maybe it'll be a good idea to use shift register (74hc165d for example) or counter, to identify feeder placing. It will take 3 pins of feeder controller to talk to shift register, and you have 8 bits of its parallel input pins to make the position code.
@savagesarethebest7251
@savagesarethebest7251 2 года назад
That is a really good and cheap idea, just push a bunch of ID down the line and have each feeder read the local shift register and then they know in what order they are placed.
@lucianchapar
@lucianchapar 3 года назад
Would DIP switches be useful for setting the feeder identity?
@ibraheemrodrigues861
@ibraheemrodrigues861 3 года назад
I second this, I've seen it used alot on devices that need to be addressed like this. Also seems to be the simplest solution - no need for extra LEDs etc, just one new component connected to a few IO pins. Alternatively just have some jumper pads that you bridge with solder to represent the bits.
@juliankandlhofer7553
@juliankandlhofer7553 3 года назад
thats what i was thinking if you have enugh io ports available. a 4 pin dip switch for 16 adresses shoud probably be plenty and would make it possible to see what id the different feeders have.
@stephen_hawes
@stephen_hawes 3 года назад
OOH that's way simpler than clicking through addresses. Thanks for the idea!
@azyfloof
@azyfloof 3 года назад
@@stephen_hawes You can even get 4 bit switches which are like tiny pots, and you dial in a hex value :D they have the same footprint and pinout as a 4 bit dip switch
@JLK89
@JLK89 3 года назад
@@azyfloof I've done this as well. I actually connected resistors to the 4 'bits' of the hex selector switch so it gives you 16 analog levels. In this case though, I would just give each feeder (or each bay) a tiny d-flip-flop and string those together so you can digitally select the bays.
@etmax1
@etmax1 3 года назад
You can buy lovely little rotary DIP switches that let you adjust the setting with a screwdriver. They come in 8/10 and 16 position so with 2 x 10 position you can do 99 feeders RELIABLY. Also you should have an optical detector that detects the hole in the tape if a part is missing.
@vtrandal
@vtrandal 3 года назад
Absolutely awesome. Anything you can do to fully automate the feeder-motherboard setup will pay dividends. Otherwise, the setup will become labor intensive with many feeds to configure for large BOMs.
@russwilliams8274
@russwilliams8274 3 года назад
Auto-configuring is definitely the way to go... it completely excludes an entire class of position-doesn't-match-ID errors, which are probably more likely to occur than misidentification via the resistors. You can still display the detected ID on the feeder, because more LEDs = more awesomeness.
@AJMansfield1
@AJMansfield1 3 года назад
Also, instead of setting the addresses, you could just use some type of universally-unique ID system - the STM32 you're using probably has a unique ID burned into one of the system registers somewhere.
@phirenz
@phirenz 3 года назад
We don't really care about the ID of the feeder. We want to know which slot it's plugged into so the pickup head can physically locate it.
@twilmer34
@twilmer34 3 года назад
You can use computer vision and the built in eeprom of the atmega. To intially program have only one feeder or one new feeder connected. Program the address as a "broadcast" to the one which is not programmed. Read in a qr code from the feeder label. Keep all in a text file and read in the qr codes with computer vision when the feeder are installed
@fredo514
@fredo514 3 года назад
Straps (pull-ups and down, you can use a 3 pad footprint to save space) are the easiest way, you need only 5 for 32 addresses. Or Dip switch if you want it to be configurable. You can add a shift register to save pins on the micro. 1-wire eeproms are also easy. Outside of the box: you could have self locate by sensing their neighbours. A single GPIO per side is enough. The right-most feeder could identify that it’s touching the edge through his right pin. It would then advertise its position (1 in this case) and then set its left pin. The next feeder would sense the change on his right pin and know that it’s next and advertise its position (2), and so on. Of course this is assuming that all feeders are touching. I don’t know if it’s a viable idea, but it’s neat.
@RussellNelson
@RussellNelson 2 года назад
The second paragraph yes, the first paragraph no.
@ChunkySteveo
@ChunkySteveo 3 года назад
Awesome video as always Stephen!! +1 for the dip switches method, although using high quality resistors sounds cool too.
@RussellNelson
@RussellNelson 2 года назад
Never DIP switches. The first time you accidentally set two to the same value, you will curse your decision.
@ChunkySteveo
@ChunkySteveo 2 года назад
@@RussellNelson you need to catch up with his videos Russell! I think they have moved on to EEPROM memory chips and boards you can program with some button presses. Pretty cool stuff!!
@RussellNelson
@RussellNelson 2 года назад
@@ChunkySteveo I started with the video where he's showing the passive feeders that users have created. Even better!!
@ChunkySteveo
@ChunkySteveo 2 года назад
@@RussellNelson ahh yes! Those look amazing with the nozzle and the spool sprockets!!
@erfanmahmud3041
@erfanmahmud3041 3 года назад
I am following you from a long time. You are really an enthusiastic guy. want to see the last of your PNP. looking forward to that.
@scottmaltby3224
@scottmaltby3224 3 года назад
Reminds me of old analog CCTV PTZ Dome cameras. They use RS485 for control and had a small 5 or 8 way Dipswitch block so you could set the address on each camera. Combination of the dipswitches could set the ID from 1- 255
@RussellNelson
@RussellNelson 2 года назад
Do. Not. Use. DIP. Switches. To. Set. An. Id.
@dominikwurster2220
@dominikwurster2220 3 года назад
It would be great if the feeders has fixed id´s. The feeders ID is labeled on this feeder with an QR-Code or DataMatrix-Code. If you add a new SMD-Reel on this feeder you scan first the feeders ID and second the value-code of the reel. In this moment the SMD-Part/Reel get married with this feeder by the software. Now it doesn´t matters on what position the feeder is pluged in. Now the software automatically knows on what position is located the right part. This of course assumes that the positions of the feeders can still be recognized. It doesn't matter whether this is done with a voltage divider or a 1-wire chip etc. So you could use a second feeder with e.g. 1k resistor before the first feeder runs empty with the 1k resistors ;) This way, mix-ups of components during assembly can also be minimized ;)
@matthewsimmons6831
@matthewsimmons6831 3 года назад
A long time ago I worked on an SMT line, using mydata and Yamaha pick and place machines. Our Yamaha's were 'old' and each program fixed the BOM components to set feeder locations. The mydata had feeders with barcode and an ID chip. An operator could register a suitable combo of component and feeder, put it anywhere on the machine and it would pick it from there. Setup was a breeze since the stockroom barcode every reel, and two scans (even when machine was running) and the pair is registered. Others have mentioned that you could use either 1wire type protocols, or some thing that affects the chain so each slot behaves different. If number of contacts doesn't matter (the gold fingers) just have a few for a set of low or high bits, and bridge pads with solder. Or could manually set machine with triplet of component 1 is on feeder 2 at location xy.
@NoelAbdilla
@NoelAbdilla 3 года назад
Nice job man, love the build and vids. As many people said I would go for the DIP switches which act as a bit represent. So 4 DIPs will give you a total of 16 combinations, 5 -> 32 etc. May I suggest one last thing to take into consideration, in the software you said you write 2F to make feeder 2 go forward, I would try and make it 02F, that way if you'll have over 9 feeders you'll be ready and set to go.
@RussellNelson
@RussellNelson 2 года назад
Do not use DIP switches to set the ID. The first time you set two devices to the same ID, you will curse your decision and everyone who suggested it to you.
@TrevorPeac0ck
@TrevorPeac0ck 3 года назад
There are unique id chips, eeproms, combined ID/eeprom chips. They come in I2C and 1-wire (eg Microchip 24AA02UID or AT21CS11) You could use those, and have a programming "feeder" that you insert in sequence to identify each slot to the controller. It could either write the eeprom, or report the ID to the controller, which remembers each slots unique ID in a lookup table. Not super elegant though If you can add a 5th wire to your JST jumpers, and add the smallest possible micro to each slot "floor". you could come up with a 1-wire programming solution. inspired by the way WS2811B uses its input/output pins: * each "floor" has an output pin connected to an input pin on the next slot. The first slot gets its input from the controller, the last slot is left disconnected * each "floor" has a 1 wire digital pin that outputs to the feeder * On startup the controller sends a "1" packet to the "in" of the first slot "floor". The first slot remembers its position as 1. * The first slot adds 1 to its ID and sends it to slot 2 * The second slot remembers its id as 2, then adds one and sends that to the 3rd slot.. and so on * Once initialized, each slot sends its ID packet to the feeder a few times a second. When the feeder starts up, it listens for its ID from the slot floor board That solution requires the smallest/cheapest 6/8 pin micro you can get (6-pin attiny4 ?), with 1 input and 2 output pins (or maybe 1 output pin, you might be able to use the same pin out to the feeder and out to the next slot) I also wonder if its worth considering adding a boot-loader to the feeders so they can be bulk re-programmed with new firmware over RS485. Not worth worrying about for the slot "floor" boards, the code is simple enough you shouldn't have to change it.
@zodak9999b
@zodak9999b 3 года назад
In my projects that need it, I mostly use a few 2-pin headers to set addressing.
@louisdavies5367
@louisdavies5367 3 года назад
Nice work as ever! I'd stick with the resistors, maybe do some tolerance analysis on the worst case you could get from adjacent resistor dividers. I think you would be surprised especially with 1% resistors! I think you will easily be able to stick with it for 32 slots as I believe you have 12 or more ADC bits right? So at least 4096 numbers representing voltages. 4096/32=128 different numbers to mean 1 slot! Also as suggested maybe add a capacitor either at the divider or at the input of your ADC (or both) to increase the voltage stability :)
@NavinF
@NavinF 3 года назад
You're limited by the resistor's thermal coefficient, not the ADC resolution. A warm resistor will appear to be be 1 slot higher. (I assume he has taken this into account)
@quitoso88
@quitoso88 3 года назад
I did a project with NFC eprom/sram chip you can flash settings with your mobile phone. It's not cheap because you also need antena or pcb antena space. But it can store quite alot of settings. The NFC transponder + Molex antena was close to 3.5€. It could fit this project.
@nathanielbrough990
@nathanielbrough990 3 года назад
You could use the 96bit unique id that is directly programmed into every stm32. Means no extra hardware.
@OddlyIncredible
@OddlyIncredible 3 года назад
Somehow I missed this video - subbed and belled so that shouldn't be a thing any more - so I'm late to the party, but I would use the feeder's other PCB with another five fingers and selectively power or ground them slot-side to provide an ID. That would make 32 slots (or more by adding more fingers) trivial to implement at the cost of requiring the backside PCB actually do something aside from acting as a structural component. Connecting the feeder's two PCBs could be handled with a short interconnect cable and matching socket.
@kenjewell3889
@kenjewell3889 3 года назад
You should consider Modbus RTU
@blazehenot2536
@blazehenot2536 3 года назад
You could use a potentiometer on the feeder floor so you can tune for in accuracy while still allowing quick swap functionality
@natman151
@natman151 3 года назад
Have a line of unpopulated pads on the board connected to IO pins like you would a dipswitch. Then solder in zero ohm link resistors to encode the ID of each one onto the PCB. It's cheap
@andreaswagner468
@andreaswagner468 3 года назад
STAY with the analog voltage that's good enough BUT add a cap like 100nF in parallel to block noise
@iliya-malecki
@iliya-malecki 3 года назад
An idea!!!! Considering you probably will change out feeders way, way more frequently than the feeder floors (ideally you dont change them out at all), i think you can just program the floors to hold the addresses. EEPROM would be obviously an overkill, but setting manually some logic gates with buttons would do the trick
@dermothannan9594
@dermothannan9594 3 года назад
Really enjoy the channel, content and enthusiasm. Great project. I appreciate resistance maybe non-ideal.. but what about a digital pot.. MCP41010.
@GJToken
@GJToken 3 года назад
As far as led readout, a simple single figure 8 segmet display (on the feeder itself) could easily readout 1 through 9 with maybe a pad for a second if you plan on doing more than that
@jht9242
@jht9242 3 года назад
For the ID system. You could have jumper pads, one for +5V, one for GND, and one for connecting to the circuit. then manually hardcode the id in binary using solder bridges. You could make an array of 5*3 pads to enter the id, and you'd have a cheap easy to use, and most importantly digital identification system.
@RussellNelson
@RussellNelson 2 года назад
No. This is worse than DIP switches, which are already worse than everything else.
@DJ-Sellout
@DJ-Sellout 3 года назад
The feeder knows where it is
@joflo5950
@joflo5950 3 года назад
Hey Stephen, I love this project! It gave me an idea for one of my own, where I'd like to use the same kind of connectors using those spring loaded contacts you used. However, I was unable to find them. Where did you get them?
@richardlighthouse5328
@richardlighthouse5328 3 года назад
the board that the feeders connect to could have hard-wired 5 bit ID that goes through the connector to the stm32
@niclash
@niclash 3 года назад
I am doing this (well 8bits in my case), and using PCIexpress connectors mounted on a bus to simplify manufacturing. Then the feeder is responsible to "know" what component is mounted, so that OpenPnp can query all RS-485 addresses for "what component is in this position?"
@KarlMiller
@KarlMiller 3 года назад
Bob is indeed your uncle!
@Haellsigh
@Haellsigh 3 года назад
About the protocol, if you're ever in need of something more complex, I suggest using something like github.com/nanopb/nanopb. It's really easy to use and allows you to send a struct of data and decode it automatically through any physical mean.
@jirkasvitil2762
@jirkasvitil2762 2 года назад
Easiest are jumpers. Important is number of bits you wanna use. I think microcontroller is big overkill
@yasirhassan8557
@yasirhassan8557 3 года назад
4:02 best way for ID will be 64kB eeprom, where you can add additional parameters other then ID also. DIP switches are also good but bulky.
@RussellNelson
@RussellNelson 2 года назад
DIP switches are not good. They are bad.
@jonathanfulcher602
@jonathanfulcher602 3 года назад
Why not use voltage drop to your advantage have the first feeder hooked up to 5V and run a single extra cable to each feeder floor and have a resistor inline. The last feeder hookes up to GND an then you have a presice and equal voltage drop on each feeder.
@atc1441
@atc1441 3 года назад
At 4:25 you solder an 0 and an 10k resistor in, isnt the 10k resistor only drawing power in that aragement and not very usefull? As it will be allways fully pull low?
@Chrisknot94
@Chrisknot94 3 года назад
I'm wondering... could the downwardfacing camera be used to detect an LED on a feeder? Like a fiducial? Because if that worked it would open doors for all kinds of fun stuff: Have your feeders all next to each other on an extrusion, use some kinds of pogo pins or springloaded sth to connect the feeders to a pcb next to the extrusion. we need a starting point: a position where always a feeder is placed. The feeders' leds light up and send their id over the bus, camera recognizes the one below it and can correct for misalignment, the feeder sends its information (tape width maybe set by a resistorvalue or dip switch) and the camera knows how much further to move to be on top of the next feeder. All the other unidentified feeders light up and send their ids over the bus one after the other until the one currently under the camera lights up. Camera corrects for misalignment and repeat. If one reel runs out, pop in a new feeder with new tape in it's place, have the cam correct it for misalignment with the led and off you go! As for bus ID and communication I'd say look at i2c: If I remember correctly a device pulls a line low just before it uses it to send data, eliminizing collisions. Maybe that's sth you can copy: mainboard sends a broadcast, feeders wait a randomized fraction of a second before one of them pulls that line down and responds, MB ack, then repeat until all the feeders have made themselves known. That's pretty much how dhcp works and successfully for years now
@diggraph
@diggraph 3 года назад
Hi Stephen, What is the Digikey part number of the 5 pin spring connectors you use? The look useful.
@bigjj135
@bigjj135 3 года назад
I worry about the number of insertions the edge connector will survive... Commercial ones are often only rated for a few hundred insertions. I did a lot of research on this topic and I switched to pogo pins.
@taftse
@taftse 3 года назад
Is there a chip similar to the sw2812b chips used in the addressable LED pixels that could be used to automatically detect how far along the string it is ?
@smartieoncomputer
@smartieoncomputer 3 года назад
Each feeder's controller may have a unique ID programmed when manufactured. Could you use that to uniquely address a feeder? That way, no need for dip switches. Then you'd only need to enumerate all possible addresses or program a mechanism that allows for the readers to report their ID when they power up? This way, if you move a feeder from say, slot 1 to slot 4, the PnP would know that the feeder has moved and thus, where the SMT parts are now located. As for identifying which slot the feeder is on, each feeder bed could have a simple logic circuit that for each pulse from the PnP, will enable a signal on the first feeder bed, then the next pulse will enable signal on the next feeder bed in the chain, etc... This process can be paired with a command to the feeder to check if that slot is active, and report back which slot it's in. As for that little bit of logic. look at a Johnson Counter digital logic design, it's simply daisy chained flip-flops.
@BrodieFairhall
@BrodieFairhall 3 года назад
Almost every industrial device I've encountered that uses RS-485 for comms uses dip switches for addressing, I'm not sure how many feeders you'd like to limit it to, but I've seen RS-485 runs with up to 255 drops so having 8 switches wouldn't be too crazy.
@RussellNelson
@RussellNelson 2 года назад
Yes, and DIP switches suck for this purpose. We have better ways of addressing devices.
@xxportalxx.
@xxportalxx. 3 года назад
I'm not sure changing the id system is necessary, just make the divisions wide enough to accept the resistors tolerance. Not to mention since there's only a handful of fixed slots it's easy enough to verify your resistors values manually if need be, but that shouldn't even be necessary if you set the ranges appropriately.
@SparkyLabs
@SparkyLabs 2 года назад
no that is not how RS485 works, that is CAN bus you described.
@MrBlakBunny
@MrBlakBunny 3 года назад
I would look at placing dip switches on the fingers themselves, but then would have to look at a controller on the finger mounting...and then it just becomes complicated
@jasongoldenberg973
@jasongoldenberg973 3 года назад
Yes dip switches or two rotary selection wheels
@hansdietrich83
@hansdietrich83 3 года назад
Don't forget to make the pc spit out an error if no feeder is in the slot or is not responding
@jamess1787
@jamess1787 3 года назад
What are you running on your laptop? DWM? Rat Poison? I'm intrigued Uncle Bob!
@Davedarko
@Davedarko 3 года назад
5:00 I sometimes skip the 8, too :)
@evilconcarne444
@evilconcarne444 3 года назад
Have you ever considered tutorials/RU-vid how to videos? I'm by no means an electrical engineer and PCBs/current structures blow my mind. I'd love to get better with them but I'm not sure how.
@ogurezzz
@ogurezzz 3 года назад
Did you think aboud IDC connectors (f and m) for your bus boards? No wires are needed.
@mastermoarman
@mastermoarman 3 года назад
how about adding dipswitches to the feeder or the connector?
@MrFujinko
@MrFujinko 3 года назад
rigol gang! you got my like
@ShaneBurrell1
@ShaneBurrell1 3 года назад
If you want the position on the machine to do the ID, the easy way is to use 2 pins on the MCU on the feeder and a 4017 on the rail. Basically a pulse counter. The feeder MCU does pulse count against the 4017 Johnson Counter to get its id. The only limit would be how many 4017's you want to string together.
@crazor01
@crazor01 3 года назад
Could you elaborate on that? I'm not familiar with the 4017, but by looking at the datasheet, it wasn't immediately clear on what you're trying to do here...
@ShaneBurrell1
@ShaneBurrell1 3 года назад
@@crazor01 If you wanted the rail position to determine the ID using a 4017 at the rail would allow 2 pins to communicate with the feeder as to what ID it should be. The 4017 can be configured as a pulse counter. You use two pins on the MCU, one as input one as output. One pin tries to drive the pin high the other checks to see if it went high. The 4017 bumps the count up and can be statically configured via resistors. This method is used a lot with keyboards, keypads, etc to keep the pin count down on the MCU.
@crazor01
@crazor01 3 года назад
@@ShaneBurrell1 Ah okay I get it now. Nice idea!
@BlaiseBarrette
@BlaiseBarrette 3 года назад
Have you looked at grbl_esp32? Wouldn’t it be the better choice than Marlin?
@kugelimgesicht88
@kugelimgesicht88 2 года назад
Would't that be a perfect place for some CAN-Bus ? :D
@jasonpettiaux6952
@jasonpettiaux6952 2 года назад
If they are connected to each other anyway, couldn't you let the order of the feeders define the address of the piece in software in the set-up when you switch it on ? Like the first action is that they communicate the position starting at 0 (from the controller) and ending at the last bit forwarding their address +1 to the next feeder.
@TheShorterboy
@TheShorterboy 3 года назад
whats the part number of the spring connector
@DanBowkley
@DanBowkley 3 года назад
Five tiny little switches on the feeder which interface with five tiny holes (or places where a hole would be) on the mount. Or five spring fingers vs five possibly grounded pads. It's digital, practically bulletproof, and stupid simple. For that matter, five slot photodetectors vs five holes.
@RussellNelson
@RussellNelson 2 года назад
The first time you set the switches incorrectly, you will learn that you have made a mistake. Auto-config or go home.
@DanBowkley
@DanBowkley 2 года назад
@@RussellNelson The switches would be set by the holes in the frame. Basically the feeder learns its address by braille.
@RussellNelson
@RussellNelson 2 года назад
@@DanBowkley Oh! Yes, you are correct, this would work very well. Or ... have a 2D barcode on the feeder which gets read by the camera. Same idea.
Далее
PnP Feeder Addressing: 1-Wire to the Rescue!
16:57
Просмотров 54 тыс.
Wait for the BOWLING BALL! 👀
00:38
Просмотров 21 млн
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Просмотров 3,6 млн
HYDRAULIC PRESS VS ARMOR, USA AND RUSSIA
10:16
Просмотров 117 тыс.
PnP Calibration with Computer Vision!
16:39
Просмотров 44 тыс.
The Return of the Feeder
13:55
Просмотров 19 тыс.
Custom PnP Controller: The Final Chapter
14:54
Просмотров 41 тыс.
Using Circuit Boards Incorrectly
13:01
Просмотров 60 тыс.
Feeders just got a whole lot smaller
14:44
Просмотров 62 тыс.
Switching the Index PnP to FreeCAD!
14:07
Просмотров 40 тыс.
I Built a Sun Tracking Solar Charger
14:15
Просмотров 91 тыс.
Vacuum Sensors Are My Nemesis
12:45
Просмотров 19 тыс.
turn any toaster oven into a reflow oven!
17:24
Просмотров 62 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 4,4 млн
$1 vs $100,000 Slow Motion Camera!
0:44
Просмотров 27 млн